You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by ja...@apache.org on 2004/06/25 17:22:18 UTC

cvs commit: ws-wsrp4j/src/org/apache/wsrp4j/producer/provider/pluto/driver DynamicInformationProviderImpl.java DescriptionHandlerImpl.java

jacob       2004/06/25 08:22:17

  Modified:    src/org/apache/wsrp4j/producer/provider
                        DescriptionHandler.java
               src/org/apache/wsrp4j/producer/driver WSRPEngine.java
               src/org/apache/wsrp4j/producer/provider/pluto/driver
                        DynamicInformationProviderImpl.java
                        DescriptionHandlerImpl.java
  Log:
  fix for jira but wsrp4j-11
  
  Revision  Changes    Path
  1.3       +4 -1      ws-wsrp4j/src/org/apache/wsrp4j/producer/provider/DescriptionHandler.java
  
  Index: DescriptionHandler.java
  ===================================================================
  RCS file: /home/cvs/ws-wsrp4j/src/org/apache/wsrp4j/producer/provider/DescriptionHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DescriptionHandler.java	9 Mar 2004 21:42:00 -0000	1.2
  +++ DescriptionHandler.java	25 Jun 2004 15:22:17 -0000	1.3
  @@ -24,6 +24,7 @@
   import oasis.names.tc.wsrp.v1.types.PortletDescription;
   import oasis.names.tc.wsrp.v1.types.RegistrationContext;
   import oasis.names.tc.wsrp.v1.types.ServiceDescription;
  +import oasis.names.tc.wsrp.v1.types.UserContext;
   
   import org.apache.wsrp4j.exception.WSRPException;
   
  @@ -46,7 +47,7 @@
        * @param desiredLocales     array of requested locales, if null request all available locales
        * 
        */
  -    public ServiceDescription get(RegistrationContext regContext, String[] desiredLocales) throws WSRPException;
  +    public ServiceDescription getServiceDescription(RegistrationContext regContext, String[] desiredLocales) throws WSRPException;
   
       /**
        * Indicates whether registration is required (for this Producer) or not.
  @@ -78,6 +79,7 @@
        * @param portletHandle      the handle of a particular portlet
        * @param regContext         contains data related to a particular registration
        *                           (e.g. the registration handle and state)
  +     * @param userContext        contains the user context
        * @param desiredLocales     array of requested locales, if null request all available locales
        * 
        * @return PortletDescription
  @@ -85,6 +87,7 @@
       public PortletDescription getPortletDescription(
           String portletHandle,
           RegistrationContext regContext,
  +        UserContext userContext,
           String[] desiredLocales)
           throws WSRPException;
   
  
  
  
  1.8       +5 -5      ws-wsrp4j/src/org/apache/wsrp4j/producer/driver/WSRPEngine.java
  
  Index: WSRPEngine.java
  ===================================================================
  RCS file: /home/cvs/ws-wsrp4j/src/org/apache/wsrp4j/producer/driver/WSRPEngine.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WSRPEngine.java	17 Jun 2004 15:21:07 -0000	1.7
  +++ WSRPEngine.java	25 Jun 2004 15:22:17 -0000	1.8
  @@ -241,13 +241,13 @@
               // TODO: also check if regHandle==null?
               if (!registrationRequired || ((regContext != null) && (registered)))
               {
  -                description = descrHandler.get(regContext, request.getDesiredLocales());
  +                description = descrHandler.getServiceDescription(regContext, request.getDesiredLocales());
               } else
               {
                   if (regContext == null && !registered)
                   {
   
  -                    description = descrHandler.get(null, request.getDesiredLocales());
  +                    description = descrHandler.getServiceDescription(null, request.getDesiredLocales());
                   } else
                   {
   
  @@ -738,7 +738,7 @@
                   provider.getDescriptionHandler().getPortletDescription(
                       request.getPortletContext().getPortletHandle(),
                       regContext,
  -                    request.getMarkupParams().getLocales());
  +                    null, request.getMarkupParams().getLocales());
   
               // check the markup params and find the locale, mimetype, mode, state whcih is used
               // for render
  @@ -843,7 +843,7 @@
                   provider.getDescriptionHandler().getPortletDescription(
                       request.getPortletContext().getPortletHandle(),
                       request.getRegistrationContext(),
  -                    request.getMarkupParams().getLocales());
  +                    null, request.getMarkupParams().getLocales());
   
               MarkupType markupType = this.checkMarkupParams(portletDescription, request.getMarkupParams());
   
  @@ -1096,7 +1096,7 @@
                   provider.getDescriptionHandler().getPortletDescription(
                       request.getPortletContext().getPortletHandle(),
                       regContext,
  -                    request.getDesiredLocales());
  +                    null, request.getDesiredLocales());
   
               response = new PortletDescriptionResponse();
               response.setPortletDescription(portletDescription);
  
  
  
  1.6       +4 -4      ws-wsrp4j/src/org/apache/wsrp4j/producer/provider/pluto/driver/DynamicInformationProviderImpl.java
  
  Index: DynamicInformationProviderImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-wsrp4j/src/org/apache/wsrp4j/producer/provider/pluto/driver/DynamicInformationProviderImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DynamicInformationProviderImpl.java	1 Jun 2004 10:48:54 -0000	1.5
  +++ DynamicInformationProviderImpl.java	25 Jun 2004 15:22:17 -0000	1.6
  @@ -281,7 +281,7 @@
   		ArrayList theModes = new ArrayList();
   		try {
   			// use the DescriptionHandler to obtain the PortletDescription
  -			PortletDescription pDesc = provider.getDescriptionHandler().getPortletDescription(portletContext.getPortletHandle(),null,null);
  +			PortletDescription pDesc = provider.getDescriptionHandler().getPortletDescription(portletContext.getPortletHandle(),null,null, null);
   			MarkupType[] markupTypes = pDesc.getMarkupTypes();
   			// search for matching mimeType
   			int i = 0;
  @@ -322,7 +322,7 @@
   		ArrayList theStates = new ArrayList();
   		try {
   			// use the DescriptionHandler to obtain the PortletDescription
  -			PortletDescription pDesc = provider.getDescriptionHandler().getPortletDescription(portletContext.getPortletHandle(),null,null);
  +			PortletDescription pDesc = provider.getDescriptionHandler().getPortletDescription(portletContext.getPortletHandle(),null,null, null);
   			MarkupType[] markupTypes = pDesc.getMarkupTypes();
   			// search for matching mimeType
   			int i = 0;
  @@ -352,7 +352,7 @@
   	public boolean isPortletModeAllowed(PortletMode portletMode) {
   		try {
   			// use the DescriptionHandler to obtain the PortletDescription
  -			PortletDescription pDesc = provider.getDescriptionHandler().getPortletDescription(portletContext.getPortletHandle(),null,null);
  +			PortletDescription pDesc = provider.getDescriptionHandler().getPortletDescription(portletContext.getPortletHandle(),null,null, null);
   			MarkupType[] markupTypes = pDesc.getMarkupTypes();
   			for (int i = 0; i < markupTypes.length; i++) {
   				if ( markupTypes[i].getMimeType().equalsIgnoreCase(mimeTypes[0]) ) {
  @@ -387,7 +387,7 @@
   	public boolean isWindowStateAllowed(WindowState windowState) {
   		try {
   			// use the DescriptionHandler to obtain the PortletDescription
  -			PortletDescription pDesc = provider.getDescriptionHandler().getPortletDescription(portletContext.getPortletHandle(),null,null);
  +			PortletDescription pDesc = provider.getDescriptionHandler().getPortletDescription(portletContext.getPortletHandle(),null,null, null);
   			MarkupType[] markupTypes = pDesc.getMarkupTypes();
   			for (int i = 0; i < markupTypes.length; i++) {
   				if ( markupTypes[i].getMimeType().equalsIgnoreCase(mimeTypes[0]) ) {
  
  
  
  1.6       +11 -5     ws-wsrp4j/src/org/apache/wsrp4j/producer/provider/pluto/driver/DescriptionHandlerImpl.java
  
  Index: DescriptionHandlerImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-wsrp4j/src/org/apache/wsrp4j/producer/provider/pluto/driver/DescriptionHandlerImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DescriptionHandlerImpl.java	1 Jun 2004 13:42:45 -0000	1.5
  +++ DescriptionHandlerImpl.java	25 Jun 2004 15:22:17 -0000	1.6
  @@ -35,6 +35,7 @@
   import oasis.names.tc.wsrp.v1.types.PortletDescription;
   import oasis.names.tc.wsrp.v1.types.RegistrationContext;
   import oasis.names.tc.wsrp.v1.types.ServiceDescription;
  +import oasis.names.tc.wsrp.v1.types.UserContext;
   
   import org.apache.pluto.om.common.Description;
   import org.apache.pluto.om.common.DisplayName;
  @@ -189,7 +190,7 @@
        *
        *
        */
  -    public ServiceDescription get(RegistrationContext regContext, String[] desiredLocales) throws WSRPException
  +    public ServiceDescription getServiceDescription(RegistrationContext regContext, String[] desiredLocales) throws WSRPException
       {
           String MN = "get";
           if (logger.isLogging(Logger.TRACE_HIGH))
  @@ -350,7 +351,7 @@
   
                       if (portlet != null)
                       {
  -                        desc = this.getPortletDescription(id, regContext, desiredLocales);
  +                        desc = this.getPortletDescription(id, regContext, null, desiredLocales);
                           portletDescs.put(id, desc);
                       }
                   }
  @@ -379,13 +380,17 @@
        * Returns an PortletDescription for the given PortletHandle, only if the 
        * registration context allows this action
        * 
  -     * @param portletHandle String PortletHandle
  +     * @param portletHandle		PortletHandle
  +     * @param regContext		the registration context
  +     * @param userContext		the user context
  +     * @param desiredLocales	the locales for which the description should be returned	
        * 
        * @return PortletDescriptionb
        */
       public PortletDescription getPortletDescription(
           String portletHandle,
           RegistrationContext regContext,
  +        UserContext userContext,
           String[] desiredLocales)
           throws WSRPException
       {
  @@ -410,7 +415,8 @@
        * @see PortletDefinition
        * @see PortletEntityRegistry
        */
  -    protected PortletDescription getPortletDescription(String portletHandle, String[] desiredLocales)
  +    protected PortletDescription getPortletDescription(String portletHandle,
  +    												   String[] desiredLocales)
           throws WSRPException
       {
   
  @@ -741,7 +747,7 @@
       public PortletDescription getPortletDescription(String portletHandle) throws WSRPException
       {
   
  -        return getPortletDescription(portletHandle, null, null);
  +        return getPortletDescription(portletHandle, null, null, null);
   
       }