Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1-286-COMPATIBILITY, 2.0.0
    • Fix Version/s: 1.1-286-COMPATIBILITY, 2.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Portlet filters are components to transform the request or response from a portlet. You have filter lifecycle for action-, event-,render- and resourceRequest/Response. The configurations is defined in the deployment descriptor. There is only one filter instance for each filter in the portlet application. For more details see the Portlet Specification Version 2.0 early draft 2 rev. 14.

      1. Filter_API_r15_050607.patch
        431 kB
        Torsten Dettborn
      2. mylar-context.zip
        118 kB
        Torsten Dettborn
      3. PortletFilter_090807.patch
        15 kB
        Torsten Dettborn
      There are no Sub-Tasks for this issue.

        Activity

        Hide
        Craig Doremus added a comment - - edited

        Thanks for the tip, Christian. I refactored SupportedModesServiceImpl in 1.1-286-trunk-merge branch to put back the loadPortletModes() method from the 1.1-286-COMPATBILITY branch in SVN rev 605023. I also got rid of a couple of unused methods.

        Having FIlterManagerImpl initialization code in this class is poor encapsulation and should be refactored into another class that DriverConfiguration loads at startup.

        Show
        Craig Doremus added a comment - - edited Thanks for the tip, Christian. I refactored SupportedModesServiceImpl in 1.1-286-trunk-merge branch to put back the loadPortletModes() method from the 1.1-286-COMPATBILITY branch in SVN rev 605023. I also got rid of a couple of unused methods. Having FIlterManagerImpl initialization code in this class is poor encapsulation and should be refactored into another class that DriverConfiguration loads at startup.
        Hide
        Christian Raschka added a comment -

        The SupportedModesServiceImpl is different (look for loadPortletmodes()). In the API patch there is (IMHO) only one line in SupportedModesServiceImpl which is important:
        + //init the portletapplication filter
        + FilterManagerImpl.addFilterApp(portletAppDD, app.getContextPath());

        But i am not sure, if thats all.

        Show
        Christian Raschka added a comment - The SupportedModesServiceImpl is different (look for loadPortletmodes()). In the API patch there is (IMHO) only one line in SupportedModesServiceImpl which is important: + //init the portletapplication filter + FilterManagerImpl.addFilterApp(portletAppDD, app.getContextPath()); But i am not sure, if thats all.
        Hide
        Craig Doremus added a comment -

        I'm not sure what part of PLUTO-233 that is missing in the trunk-merge branch? I checked out the TCKDriverServlet and it appears to be the same as the trunk (except lines 115-116 that were recently commented out by Torsten). Please advise?

        I'm also unsure what patch in this issue that you want me to apply. I looked at the Filter_API_r15_050607.patch and saw that it was from rev 15 of the Portlet 2.0 API. I don't want to overwrite things that have changed sunsequently (since we are now at rev 30). Can you (or anyone else) point me to what's in the patch that's missing from the 1.1-286-trunk-merge branch?

        Thank you.

        Show
        Craig Doremus added a comment - I'm not sure what part of PLUTO-233 that is missing in the trunk-merge branch? I checked out the TCKDriverServlet and it appears to be the same as the trunk (except lines 115-116 that were recently commented out by Torsten). Please advise? I'm also unsure what patch in this issue that you want me to apply. I looked at the Filter_API_r15_050607.patch and saw that it was from rev 15 of the Portlet 2.0 API. I don't want to overwrite things that have changed sunsequently (since we are now at rev 30). Can you (or anyone else) point me to what's in the patch that's missing from the 1.1-286-trunk-merge branch? Thank you.
        Hide
        Christian Raschka added a comment -

        I have found the problem. In trunk-merge the patch from pluto-233 (https://issues.apache.org/jira/browse/PLUTO-233) from Elliot is missing. And then this api patch has to be committed. The 286-compat seems ok.

        Craig is it possible for you to look at this?

        Show
        Christian Raschka added a comment - I have found the problem. In trunk-merge the patch from pluto-233 ( https://issues.apache.org/jira/browse/PLUTO-233 ) from Elliot is missing. And then this api patch has to be committed. The 286-compat seems ok. Craig is it possible for you to look at this?
        Hide
        Craig Doremus added a comment -

        Applied PortletFilter_090807.patch to 1.1-286-trunk-merge branch in SVN rev 577686. Thanks, Torsten!

        Show
        Craig Doremus added a comment - Applied PortletFilter_090807.patch to 1.1-286-trunk-merge branch in SVN rev 577686. Thanks, Torsten!
        Hide
        Torsten Dettborn added a comment -

        Applied patch PortletFilter_090807.patch in 1.1-286-COMPABILITY version. The new revision number is 573811.

        Show
        Torsten Dettborn added a comment - Applied patch PortletFilter_090807.patch in 1.1-286-COMPABILITY version. The new revision number is 573811.
        Hide
        Torsten Dettborn added a comment -

        fix bugs
        add wildcards
        add list for the filter lifecycle instead of singel element (see Spec)

        Show
        Torsten Dettborn added a comment - fix bugs add wildcards add list for the filter lifecycle instead of singel element (see Spec)
        Hide
        Torsten Dettborn added a comment -

        The patch "Filter_API_r15_050607.patch" has been committed. The new revision number is 545132.

        Show
        Torsten Dettborn added a comment - The patch "Filter_API_r15_050607.patch" has been committed. The new revision number is 545132.
        Hide
        Torsten Dettborn added a comment -

        For the filter part

        The filter implementation starts with the FilterManagerImpl. There are all application stored. The initialization(addFilterApp) is called from the SupportedModesService. The position of the call have to be changed after merging the sources with the trunk. The method AddFilterApp themselves invokes addFilter from FilterChain. Inside FilterChain is a PortletFilter class where the class, filterConfig and some other parameter are stored, which you need for init and doFilter. To invoke processFilter in the PortletServlet:

        request.setAttribute("filter-manager",
        container.getRequiredContainerServices().
        getPortalCallbackService().
        getFilterManager());

        add to the PortalDriverServlet in the doGet method. ProcessFilter(FilterManager) iterate over the applications and calls the doFilter method from the FilterChain. The doFilter method themselves iterate over all for the portlet registered filters.

        classes been involved:

        org.apache.pluto.driver.services.container.FilterChainImpl org.apache.pluto.driver.services.container.FilterConfigImpl org.apache.pluto.driver.services.container.FilterManagerImpl org.apache.pluto.driver.services.impl.resource.SupportedModesServiceImpl org.apache.pluto.driver.services.container.PortalCallbackServiceImpl org.apache.pluto.driver.services.container.SupportedModesServiceImpl

        org.apache.pluto.driver.PortalDriverServlet

        org.apache.pluto.spi.FilterManager

        ========================================================

        For the API revision15 part

        ActionRequest:

        Add annotation

        Generic Portlets:

        Several changes for the annotation.

        Event/EventImpl:

        +QName getQNames
        +String getName
        -QName getName

        PortletConfig:

        + public java.lang.String getDefaultEventNamespace();

        PortletException:

        + private static final long serialVersionUID = 1L;

        PortletModeException:

        private static final long serialVersionUID = 1L;

        • PortletModeResourceServing

        PortletRequest:

        -public static final String RESOURCE_SERVING_PHASE = "RESOURCE_SERVING_PHASE";
        + public static final String RESOURCE_PHASE = "RESOURCE_PHASE";

        • public static final String FRAGMENT_SERVING_PHASE = "FRAGMENT_SERVING_PHASE";

        PortletRequestDispatcher:

        There is only one method for indlude/forwared(PortletRequest req, PortletResponse res)

        PortletSecurityException:

        + private static final long serialVersionUID = 1L;

        PortletSession:

        + getMap()
        + getMap(int i)

        ProcessAction:

        Complete new

        ProcessEvent:

        Show in Event, there are the same changes.(qname ->local name)

        ReadOnlyException:

        + serialVersionUID

        RenderMode:

        Complete new.

        StateAwareResponse:

        public void setDefaultNamspacedEvents(Map<String, Object> events)

        public void setEvent(String name, Object value)

        UnavailableException:

        + private static final long serialVersionUID = 1L;

        ValidatorException:

        + private static final long serialVersionUID = 1L;

        WindowStateException:

        + private static final long serialVersionUID = 1L;

        Missing in GenericPortlet
        public String getDefaultEventNamespace()

        { // TODO Auto-generated method stub return null; }

        Show
        Torsten Dettborn added a comment - For the filter part The filter implementation starts with the FilterManagerImpl. There are all application stored. The initialization(addFilterApp) is called from the SupportedModesService. The position of the call have to be changed after merging the sources with the trunk. The method AddFilterApp themselves invokes addFilter from FilterChain. Inside FilterChain is a PortletFilter class where the class, filterConfig and some other parameter are stored, which you need for init and doFilter. To invoke processFilter in the PortletServlet: request.setAttribute("filter-manager", container.getRequiredContainerServices(). getPortalCallbackService(). getFilterManager()); add to the PortalDriverServlet in the doGet method. ProcessFilter(FilterManager) iterate over the applications and calls the doFilter method from the FilterChain. The doFilter method themselves iterate over all for the portlet registered filters. classes been involved: org.apache.pluto.driver.services.container.FilterChainImpl org.apache.pluto.driver.services.container.FilterConfigImpl org.apache.pluto.driver.services.container.FilterManagerImpl org.apache.pluto.driver.services.impl.resource.SupportedModesServiceImpl org.apache.pluto.driver.services.container.PortalCallbackServiceImpl org.apache.pluto.driver.services.container.SupportedModesServiceImpl org.apache.pluto.driver.PortalDriverServlet org.apache.pluto.spi.FilterManager ======================================================== For the API revision15 part ActionRequest: Add annotation Generic Portlets: Several changes for the annotation. Event/EventImpl: +QName getQNames +String getName -QName getName PortletConfig: + public java.lang.String getDefaultEventNamespace(); PortletException: + private static final long serialVersionUID = 1L; PortletModeException: private static final long serialVersionUID = 1L; PortletModeResourceServing PortletRequest: -public static final String RESOURCE_SERVING_PHASE = "RESOURCE_SERVING_PHASE"; + public static final String RESOURCE_PHASE = "RESOURCE_PHASE"; public static final String FRAGMENT_SERVING_PHASE = "FRAGMENT_SERVING_PHASE"; PortletRequestDispatcher: There is only one method for indlude/forwared(PortletRequest req, PortletResponse res) PortletSecurityException: + private static final long serialVersionUID = 1L; PortletSession: + getMap() + getMap(int i) ProcessAction: Complete new ProcessEvent: Show in Event, there are the same changes.(qname ->local name) ReadOnlyException: + serialVersionUID RenderMode: Complete new. StateAwareResponse: public void setDefaultNamspacedEvents(Map<String, Object> events) public void setEvent(String name, Object value) UnavailableException: + private static final long serialVersionUID = 1L; ValidatorException: + private static final long serialVersionUID = 1L; WindowStateException: + private static final long serialVersionUID = 1L; Missing in GenericPortlet public String getDefaultEventNamespace() { // TODO Auto-generated method stub return null; }

          People

          • Assignee:
            Unassigned
            Reporter:
            Torsten Dettborn
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development