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

ServiceDescriptionHandler - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.wsrp.producer
Class ServiceDescriptionHandler

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

class ServiceDescriptionHandler
extends ServiceHandler

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

Field Summary
private  org.apache.log4j.Logger log
           
protected  WSRPProducerImpl producer
           
private  ServiceDescription serviceDescription
          The ServiceDescription when the Consumer is allowed to access it or when registration is not required.
 
Constructor Summary
(package private) ServiceDescriptionHandler(WSRPProducerImpl producer)
           
 
Method Summary
private  PortletDescription createPortletDescriptionFrom(PortletInfo portletInfo, java.lang.String[] desiredLocales, java.lang.String id)
          Creates a PortletDescription based on the user desired locales (ordered according to user preferences) for the specified component.
private  org.jboss.portal.wsrp.core.LocalizedString createWSRPLocalizedString(java.lang.String language, java.lang.String resourceName, java.lang.String value)
           
private  org.jboss.portal.wsrp.core.LocalizedString getBestLocalizedValueFrom(LocalizedString portletMetadata, java.lang.String[] desiredLocales)
          Retrieves the best (according to the specified desired locales) value for the given localized portlet metadata.
private  java.lang.String[] getLocaleNamesFrom(java.util.Collection locales)
           
private  java.lang.String[] getModeNamesFrom(java.util.Collection modes)
           
 java.util.Set getOfferedPortletDescriptions(java.lang.String[] desiredLocales)
           
 PortletDescription getPortletDescription(java.lang.String handle, java.lang.String[] desiredLocales)
           
 ServiceDescription getServiceDescription(GetServiceDescription gs)
           
private  java.lang.String[] getWindowStateNamesFrom(java.util.Collection windowStates)
           
private  void refreshServiceDescription(java.lang.String[] desiredLocales)
          Refreshes the service description by asking the portal container about contained portlets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private final org.apache.log4j.Logger log

serviceDescription

private final ServiceDescription serviceDescription
The ServiceDescription when the Consumer is allowed to access it or when registration is not required.


producer

protected WSRPProducerImpl producer
Constructor Detail

ServiceDescriptionHandler

ServiceDescriptionHandler(WSRPProducerImpl producer)
Method Detail

getServiceDescription

public ServiceDescription getServiceDescription(GetServiceDescription gs)
                                         throws InvalidRegistrationFault,
                                                OperationFailedFault,
                                                java.rmi.RemoteException
Throws:
InvalidRegistrationFault
OperationFailedFault
java.rmi.RemoteException

refreshServiceDescription

private void refreshServiceDescription(java.lang.String[] desiredLocales)
Refreshes the service description by asking the portal container about contained portlets.

Parameters:
desiredLocales -

getOfferedPortletDescriptions

public java.util.Set getOfferedPortletDescriptions(java.lang.String[] desiredLocales)

getPortletDescription

public PortletDescription getPortletDescription(java.lang.String handle,
                                                java.lang.String[] desiredLocales)
                                         throws InvalidHandleFault,
                                                OperationFailedFault
Throws:
InvalidHandleFault
OperationFailedFault

createPortletDescriptionFrom

private PortletDescription createPortletDescriptionFrom(PortletInfo portletInfo,
                                                        java.lang.String[] desiredLocales,
                                                        java.lang.String id)
Creates a PortletDescription based on the user desired locales (ordered according to user preferences) for the specified component.

Parameters:
portletInfo -
desiredLocales - the user desired locales (ordered according to user preferences) to use for the description
id -
Returns:
a PortletDescription describing the specified portlet

getLocaleNamesFrom

private java.lang.String[] getLocaleNamesFrom(java.util.Collection locales)

getWindowStateNamesFrom

private java.lang.String[] getWindowStateNamesFrom(java.util.Collection windowStates)

getModeNamesFrom

private java.lang.String[] getModeNamesFrom(java.util.Collection modes)

createWSRPLocalizedString

private org.jboss.portal.wsrp.core.LocalizedString createWSRPLocalizedString(java.lang.String language,
                                                                             java.lang.String resourceName,
                                                                             java.lang.String value)

getBestLocalizedValueFrom

private org.jboss.portal.wsrp.core.LocalizedString getBestLocalizedValueFrom(LocalizedString portletMetadata,
                                                                             java.lang.String[] desiredLocales)
Retrieves the best (according to the specified desired locales) value for the given localized portlet metadata.

Parameters:
portletMetadata - the localized metadata from which a localized value is to be extracted
desiredLocales - the supported locales orderd by user preference
Returns:
the best (according to the specified desired locales) value for the given localized portlet metadata or null if no such value can be found.