WSRP4J
  1. WSRP4J
  2. WSRP4J-30

ProxyPortlet tied exclusively to Pluto

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current (nightly)
    • Fix Version/s: current (nightly)
    • Component/s: Proxy Portlet
    • Labels:
      None
    • Environment:
      Ant 1.6.1, Java 1.4.2, GridSphere portal container

      Description

      ProxyPortlet contains imports and classes available only to jakarta pluto project. I would appreciate either:

      A) Rewrite the necessary code to ONLY reference those objects defined by JSR 168 portlet specification

      OR

      B) Specify portal vendor specific bahavior in another interface that my portal can provide an implementation of....

      Thanks, Jason

      1. WSRPRequestImpl.java
        14 kB
        Sandy Pérez González
      2. URLGeneratorImpl.java
        10 kB
        Sandy Pérez González
      3. ProxyPortlet.java
        37 kB
        Sandy Pérez González
      4. ConsumerConstants.java
        4 kB
        Sandy Pérez González

        Issue Links

          Activity

          Jason Novotny created issue -
          Julie MacNaught made changes -
          Field Original Value New Value
          Link This issue is related to WSRP4J-62 [ WSRP4J-62 ]
          Julie MacNaught made changes -
          Component/s Proxy Portlet [ 11702 ]
          Fix Version/s current (nightly) [ 10488 ]
          Affects Version/s current (nightly) [ 10488 ]
          Description
          ProxyPortlet contains imports and classes available only to jakarta pluto project. I would appreciate either:

          A) Rewrite the necessary code to ONLY reference those objects defined by JSR 168 portlet specification

          OR

          B) Specify portal vendor specific bahavior in another interface that my portal can provide an implementation of....

           Thanks, Jason
          ProxyPortlet contains imports and classes available only to jakarta pluto project. I would appreciate either:

          A) Rewrite the necessary code to ONLY reference those objects defined by JSR 168 portlet specification

          OR

          B) Specify portal vendor specific bahavior in another interface that my portal can provide an implementation of....

           Thanks, Jason
          Component/s Consumer [ 10834 ]
          Diego Louzán made changes -
          Assignee Diego Louzán [ dlouzan ]
          Hide
          Sandy Pérez González added a comment -

          Hello

          I saw that the Pluto's libraries are used in org.apache.wsrp4j.consumer.proxyportlet.impl.ProxyPortlet and org.apache.wsrp4j.consumer.proxyportlet.impl.WSRPRequestImpl classes.

          In ProxyPortlet class the Pluto's libraries are used in the processAction, render and getWindowSession methods. In this cases Pluto's libraries are always used to obtain the portlet window object and this is used to obtain the portlet window ID or the portlet entity ID.

          What is a portlet window in Pluto? Portlet Window is part of an aggregation tree that contains the portlet markup. Reading the JSR-168 Specification we can read the phrase "The occurrence of a portlet and preferences-object in a portal page is called a portlet window." Are both the same thing? I think that both are the same thing. Does some mechanism exist to identify unambiguously the portlet window in the JSR-168 Specification? Yes it does, the used mechanism is the portlet namespace. Therefore, in my code I use the namespace instead of the portlet window ID, because the namespace is standard and portlet window ID is Pluto dependent.

          What we can do with portlet entity ID? The portlet entity in Pluto is a parameterized portlet definition, belonging to a user. I understand that an entity is a portlet + preferences-object, belonging to a user. Can the portlet entity ID be changed by standard something? I searched it in the JSR-168 Specification but I didn't find it. Then I asked myself, which is the use of portlet entity ID? The portlet entity ID is used in GroupSessionImpl class as key to store a portlet session object in a hashtable, and this portlet session object contains a session context and a Map where are stored window session objects, in this Map the used key is the portlet window ID, that is, the namespace. Firstly I thought change this structure, in my mind I thought in a unique structure where the key was the namespace, but I don't have enough time to try it and I don't have enough knowledge about WSRP4J proxy portlet code. Then I found a more simple solution, I realised that if I used the portlet name instead of portlet entity ID, my solution was correct in all those cases where the portlet entity was the same for all portlet windows, that is, if I had a unique portlet entity declaration in the portletentityregistry.xml file and I used this entity several times in the pageregistry.xml file, the portlet name worked correctly as key. But if other portlet entity declaration existed then the portlet name wasn't useful as key.

          Thinking in this situation I realised that this is a good solution, what? let me explain. The mistake of this solution is that only a unique entity declaration can exist per portlet declaration in the portlet deployment descriptor file. Why not have one portlet declaration in the portlet deployment descriptor file (portlet.xml) per entity? If we have different entity declarations it's because we have different preferences for same portlet. In the case of proxy portlet it involves to load a different portlet from provider or change the provider, bear it in mind. If all these remote portlets were local portlets then a portlet declaration per each one would exist. Moreover, this solution doesn't require big changes in source code. This is my solution to achieve independence of WSRP4J Proxy Portlet from Pluto.

          Finally, in WSRPRequestImpl class I use the same idea, except in the case where Pluto's libraries are used to read the MIME types set. Read the code, this is commented.

          Excuse me for my bad English. Any opinion about it will be welcome, thanks in advance.

          Regards
          Sandy

          PD: This solution includes the code that solves a bug registered in Jira with code WSRP4J-6.

          Show
          Sandy Pérez González added a comment - Hello I saw that the Pluto's libraries are used in org.apache.wsrp4j.consumer.proxyportlet.impl.ProxyPortlet and org.apache.wsrp4j.consumer.proxyportlet.impl.WSRPRequestImpl classes. In ProxyPortlet class the Pluto's libraries are used in the processAction, render and getWindowSession methods. In this cases Pluto's libraries are always used to obtain the portlet window object and this is used to obtain the portlet window ID or the portlet entity ID. What is a portlet window in Pluto? Portlet Window is part of an aggregation tree that contains the portlet markup. Reading the JSR-168 Specification we can read the phrase "The occurrence of a portlet and preferences-object in a portal page is called a portlet window." Are both the same thing? I think that both are the same thing. Does some mechanism exist to identify unambiguously the portlet window in the JSR-168 Specification? Yes it does, the used mechanism is the portlet namespace. Therefore, in my code I use the namespace instead of the portlet window ID, because the namespace is standard and portlet window ID is Pluto dependent. What we can do with portlet entity ID? The portlet entity in Pluto is a parameterized portlet definition, belonging to a user. I understand that an entity is a portlet + preferences-object, belonging to a user. Can the portlet entity ID be changed by standard something? I searched it in the JSR-168 Specification but I didn't find it. Then I asked myself, which is the use of portlet entity ID? The portlet entity ID is used in GroupSessionImpl class as key to store a portlet session object in a hashtable, and this portlet session object contains a session context and a Map where are stored window session objects, in this Map the used key is the portlet window ID, that is, the namespace. Firstly I thought change this structure, in my mind I thought in a unique structure where the key was the namespace, but I don't have enough time to try it and I don't have enough knowledge about WSRP4J proxy portlet code. Then I found a more simple solution, I realised that if I used the portlet name instead of portlet entity ID, my solution was correct in all those cases where the portlet entity was the same for all portlet windows, that is, if I had a unique portlet entity declaration in the portletentityregistry.xml file and I used this entity several times in the pageregistry.xml file, the portlet name worked correctly as key. But if other portlet entity declaration existed then the portlet name wasn't useful as key. Thinking in this situation I realised that this is a good solution, what? let me explain. The mistake of this solution is that only a unique entity declaration can exist per portlet declaration in the portlet deployment descriptor file. Why not have one portlet declaration in the portlet deployment descriptor file (portlet.xml) per entity? If we have different entity declarations it's because we have different preferences for same portlet. In the case of proxy portlet it involves to load a different portlet from provider or change the provider, bear it in mind. If all these remote portlets were local portlets then a portlet declaration per each one would exist. Moreover, this solution doesn't require big changes in source code. This is my solution to achieve independence of WSRP4J Proxy Portlet from Pluto. Finally, in WSRPRequestImpl class I use the same idea, except in the case where Pluto's libraries are used to read the MIME types set. Read the code, this is commented. Excuse me for my bad English. Any opinion about it will be welcome, thanks in advance. Regards Sandy PD: This solution includes the code that solves a bug registered in Jira with code WSRP4J-6 .
          Sandy Pérez González made changes -
          Attachment ConsumerConstants.java [ 12342347 ]
          Sandy Pérez González made changes -
          Attachment URLGeneratorImpl.java [ 12342348 ]
          Sandy Pérez González made changes -
          Attachment WSRPRequestImpl.java [ 12342349 ]
          Sandy Pérez González made changes -
          Attachment ProxyPortlet.java [ 12342350 ]
          Hide
          Sandy Pérez González added a comment -

          This solution is tested on Pluto and JBoss. I hope tested it in more portlet container.

          Special thanks to Iñaki Paz for his advices.

          Show
          Sandy Pérez González added a comment - This solution is tested on Pluto and JBoss. I hope tested it in more portlet container. Special thanks to Iñaki Paz for his advices.
          Diego Louzán made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          875d 8h 25m 1 Diego Louzán 29/Nov/06 21:15

            People

            • Assignee:
              Diego Louzán
              Reporter:
              Jason Novotny
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development