站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

MarkupHandler - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.wsrp.producer
Class MarkupHandler

java.lang.Object
  extended byorg.jboss.portal.wsrp.producer.ServiceHandler
      extended byorg.jboss.portal.wsrp.producer.MarkupHandler

class MarkupHandler
extends ServiceHandler

Since:
2.4
Version:
$Revision: 5487 $
Author:
Chris Laprun

Nested Class Summary
(package private)  class MarkupHandler.MarkupRequest
          Wrapper around information needed to perform a Markup invocation.
 
Field Summary
private static java.lang.String CHARSET_SEPARATOR
           
private static java.lang.String EMPTY
           
private static java.lang.String GET_MARKUP
           
private  org.jboss.logging.Logger log
           
private static java.lang.String PBI
           
private static java.lang.String PORTLET_MODE
           
protected  WSRPProducerImpl producer
           
private static java.lang.String WINDOW_STATE
           
 
Constructor Summary
(package private) MarkupHandler(WSRPProducerImpl producer)
           
 
Method Summary
private  void checkForError(PortletInvocationResponse response)
           
private  void checkUserContext(org.jboss.portal.wsrp.core.UserContext wsrpUserContext)
           
private  InstanceContext createInstanceContext(java.lang.String portletHandle, AccessMode accessMode)
           
private  MarkupHandler.MarkupRequest createMarkupRequestFrom(MarkupType[] markupTypes, MarkupParams params, Portlet portlet)
          Returns the most appropriate information to base markup generation on based on a Portlet's specified markup types and a markup request parameters.
private  StateString createNavigationalState(java.lang.String navigationalState)
           
private  PortalContext createPortalContext(MarkupParams params, MarkupHandler.MarkupRequest markupRequest)
           
private  SecurityContext createSecurityContext(MarkupParams params, RuntimeContext runtimeContext, org.jboss.portal.wsrp.core.UserContext wsrpUserContext)
           
private  HTTPStreamInfo createStreamInfo(MarkupHandler.MarkupRequest markupRequest)
           
private  UserContext createUserContext(org.jboss.portal.wsrp.core.UserContext userContext, java.lang.String preferredLocale, java.lang.String[] supportedLocales)
           
private  WindowContext createWindowContext(java.lang.String portletHandle, RuntimeContext runtimeContext)
           
 MarkupResponse getMarkup(GetMarkup getMarkup)
           
private  java.lang.String getMatchingOrDefaultFrom(java.lang.String[] possibleValues, java.lang.String[] preferredValues, java.lang.String defaultValue)
          Retrieves the best matching value from a set of possible values based on an ordered set of preferred values or the given default value if no matching value is found.
private  java.lang.String getMatchingOrDefaultFrom(java.lang.String[] possibleValues, java.lang.String desired, java.lang.String defaultValue)
          Retrieves the matching value from a set of possible values based on a desired value or the given default one if no match can be found.
private  java.lang.String getMatchingOrFailFrom(java.lang.String[] possibleValues, java.lang.String desired, java.lang.String valueType)
          Retrieves the desired value from the set of possible values if such value exists or throw an IllegalArgumentException.
private  java.lang.String getNewStateOrNull(RenderResponse renderResult, boolean forMode)
           
 ReturnAny initCookie(InitCookie initCookie)
           
 BlockingInteractionResponse performBlockingInteraction(PerformBlockingInteraction performBlockingInteraction)
           
private  void releaseSession(java.lang.String registrationHandle, java.lang.String sessionID)
          Releases the resources associated to the specified session for the specified consumer.
 ReturnAny releaseSessions(ReleaseSessions releaseSessions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WINDOW_STATE

private static final java.lang.String WINDOW_STATE
See Also:
Constant Field Values

PORTLET_MODE

private static final java.lang.String PORTLET_MODE
See Also:
Constant Field Values

PBI

private static final java.lang.String PBI
See Also:
Constant Field Values

GET_MARKUP

private static final java.lang.String GET_MARKUP
See Also:
Constant Field Values

log

private org.jboss.logging.Logger log

EMPTY

private static final java.lang.String EMPTY
See Also:
Constant Field Values

CHARSET_SEPARATOR

private static final java.lang.String CHARSET_SEPARATOR
See Also:
Constant Field Values

producer

protected WSRPProducerImpl producer
Constructor Detail

MarkupHandler

MarkupHandler(WSRPProducerImpl producer)
Method Detail

getMarkup

public MarkupResponse getMarkup(GetMarkup getMarkup)
                         throws UnsupportedWindowStateFault,
                                InvalidCookieFault,
                                InvalidSessionFault,
                                AccessDeniedFault,
                                InconsistentParametersFault,
                                InvalidHandleFault,
                                UnsupportedLocaleFault,
                                UnsupportedModeFault,
                                OperationFailedFault,
                                MissingParametersFault,
                                InvalidUserCategoryFault,
                                InvalidRegistrationFault,
                                UnsupportedMimeTypeFault,
                                java.rmi.RemoteException
Throws:
UnsupportedWindowStateFault
InvalidCookieFault
InvalidSessionFault
AccessDeniedFault
InconsistentParametersFault
InvalidHandleFault
UnsupportedLocaleFault
UnsupportedModeFault
OperationFailedFault
MissingParametersFault
InvalidUserCategoryFault
InvalidRegistrationFault
UnsupportedMimeTypeFault
java.rmi.RemoteException

performBlockingInteraction

public BlockingInteractionResponse performBlockingInteraction(PerformBlockingInteraction performBlockingInteraction)
                                                       throws InvalidSessionFault,
                                                              UnsupportedModeFault,
                                                              UnsupportedMimeTypeFault,
                                                              OperationFailedFault,
                                                              UnsupportedWindowStateFault,
                                                              UnsupportedLocaleFault,
                                                              AccessDeniedFault,
                                                              PortletStateChangeRequiredFault,
                                                              InvalidRegistrationFault,
                                                              MissingParametersFault,
                                                              InvalidUserCategoryFault,
                                                              InconsistentParametersFault,
                                                              InvalidHandleFault,
                                                              InvalidCookieFault,
                                                              java.rmi.RemoteException
Throws:
InvalidSessionFault
UnsupportedModeFault
UnsupportedMimeTypeFault
OperationFailedFault
UnsupportedWindowStateFault
UnsupportedLocaleFault
AccessDeniedFault
PortletStateChangeRequiredFault
InvalidRegistrationFault
MissingParametersFault
InvalidUserCategoryFault
InconsistentParametersFault
InvalidHandleFault
InvalidCookieFault
java.rmi.RemoteException

getNewStateOrNull

private java.lang.String getNewStateOrNull(RenderResponse renderResult,
                                           boolean forMode)

checkForError

private void checkForError(PortletInvocationResponse response)
                    throws UnsupportedModeFault,
                           OperationFailedFault,
                           UnsupportedWindowStateFault
Throws:
UnsupportedModeFault
OperationFailedFault
UnsupportedWindowStateFault

releaseSessions

public ReturnAny releaseSessions(ReleaseSessions releaseSessions)
                          throws InvalidRegistrationFault,
                                 OperationFailedFault,
                                 MissingParametersFault,
                                 AccessDeniedFault,
                                 java.rmi.RemoteException
Throws:
InvalidRegistrationFault
OperationFailedFault
MissingParametersFault
AccessDeniedFault
java.rmi.RemoteException

releaseSession

private void releaseSession(java.lang.String registrationHandle,
                            java.lang.String sessionID)
                     throws java.lang.IllegalStateException
Releases the resources associated to the specified session for the specified consumer.

Parameters:
registrationHandle - the registration handle identifying the consumer
sessionID - the id of the session which resources are to be released
Throws:
java.lang.IllegalStateException - if the specified session had already been released

initCookie

public ReturnAny initCookie(InitCookie initCookie)
                     throws AccessDeniedFault,
                            OperationFailedFault,
                            InvalidRegistrationFault,
                            java.rmi.RemoteException
Throws:
AccessDeniedFault
OperationFailedFault
InvalidRegistrationFault
java.rmi.RemoteException

checkUserContext

private void checkUserContext(org.jboss.portal.wsrp.core.UserContext wsrpUserContext)
                       throws MissingParametersFault
Throws:
MissingParametersFault

createNavigationalState

private StateString createNavigationalState(java.lang.String navigationalState)

createInstanceContext

private InstanceContext createInstanceContext(java.lang.String portletHandle,
                                              AccessMode accessMode)

createWindowContext

private WindowContext createWindowContext(java.lang.String portletHandle,
                                          RuntimeContext runtimeContext)

createUserContext

private UserContext createUserContext(org.jboss.portal.wsrp.core.UserContext userContext,
                                      java.lang.String preferredLocale,
                                      java.lang.String[] supportedLocales)

createPortalContext

private PortalContext createPortalContext(MarkupParams params,
                                          MarkupHandler.MarkupRequest markupRequest)

createStreamInfo

private HTTPStreamInfo createStreamInfo(MarkupHandler.MarkupRequest markupRequest)
                                 throws UnsupportedMimeTypeFault
Throws:
UnsupportedMimeTypeFault

createSecurityContext

private SecurityContext createSecurityContext(MarkupParams params,
                                              RuntimeContext runtimeContext,
                                              org.jboss.portal.wsrp.core.UserContext wsrpUserContext)

createMarkupRequestFrom

private MarkupHandler.MarkupRequest createMarkupRequestFrom(MarkupType[] markupTypes,
                                                            MarkupParams params,
                                                            Portlet portlet)
                                                     throws UnsupportedMimeTypeFault,
                                                            UnsupportedModeFault,
                                                            UnsupportedWindowStateFault
Returns the most appropriate information to base markup generation on based on a Portlet's specified markup types and a markup request parameters.

Parameters:
markupTypes - the Portlet's specified markup types
params - the markup request parameters
portlet -
Returns:
a MarkupRequest containing the most appropriate information to base markup generation for this request
Throws:
UnsupportedMimeTypeFault
UnsupportedModeFault
UnsupportedWindowStateFault

getMatchingOrFailFrom

private java.lang.String getMatchingOrFailFrom(java.lang.String[] possibleValues,
                                               java.lang.String desired,
                                               java.lang.String valueType)
                                        throws java.lang.IllegalArgumentException
Retrieves the desired value from the set of possible values if such value exists or throw an IllegalArgumentException.

Parameters:
possibleValues - the set of supported values
desired - the desired value
valueType - a name identifying the type of the desired value (for error reporting purpose)
Returns:
the desired value
Throws:
java.lang.IllegalArgumentException - if the desired value is not found in the set of possible values

getMatchingOrDefaultFrom

private java.lang.String getMatchingOrDefaultFrom(java.lang.String[] possibleValues,
                                                  java.lang.String[] preferredValues,
                                                  java.lang.String defaultValue)
Retrieves the best matching value from a set of possible values based on an ordered set of preferred values or the given default value if no matching value is found.

Parameters:
possibleValues - the set of possible values
preferredValues - the ordered (according to user preferences) set of preferred values
defaultValue - the default value to be used if no match can be found
Returns:
the first match in the set of possible values from the ordered set of preferred values or the default value if no such value can be found

getMatchingOrDefaultFrom

private java.lang.String getMatchingOrDefaultFrom(java.lang.String[] possibleValues,
                                                  java.lang.String desired,
                                                  java.lang.String defaultValue)
Retrieves the matching value from a set of possible values based on a desired value or the given default one if no match can be found.

Parameters:
possibleValues - the set of possible values
desired - the desired value
defaultValue - the default value if no match can be found
Returns:
the desired value if it's the set of possible values, the specified default value otherwise