You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by dl...@apache.org on 2004/05/07 15:41:55 UTC

cvs commit: jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/portlet/impl StoreablePortletDefinitionDelegate.java PortletApplicationDefinitionImpl.java

dlestrat    2004/05/07 06:41:55

  Modified:    components/registry/src/java/org/apache/jetspeed/om/portlet/impl
                        StoreablePortletDefinitionDelegate.java
                        PortletApplicationDefinitionImpl.java
  Log:
  PLT 17: Fixes in loading user-attributes.
  
  Revision  Changes    Path
  1.7       +0 -33     jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/StoreablePortletDefinitionDelegate.java
  
  Index: StoreablePortletDefinitionDelegate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/StoreablePortletDefinitionDelegate.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StoreablePortletDefinitionDelegate.java	25 Apr 2004 16:32:52 -0000	1.6
  +++ StoreablePortletDefinitionDelegate.java	7 May 2004 13:41:55 -0000	1.7
  @@ -38,7 +38,6 @@
   import org.apache.pluto.om.common.PreferenceSet;
   import org.apache.pluto.om.common.SecurityRoleRef;
   import org.apache.pluto.om.common.SecurityRoleRefSet;
  -import org.apache.jetspeed.om.common.UserAttribute;
   import org.apache.pluto.om.portlet.ContentType;
   import org.apache.pluto.om.portlet.ContentTypeSet;
   import org.apache.pluto.om.portlet.PortletApplicationDefinition;
  @@ -148,38 +147,6 @@
       {
   		portlet.setContentTypeSet(contentTypes);
   
  -    }
  -
  -    /** 
  -     * @see org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite#addUserAttribute(java.lang.String, java.lang.String)
  -     */
  -    public void addUserAttribute(String name, String description)
  -    {
  -        portlet.addUserAttribute(name, description);
  -    }
  -
  -    /** 
  -     * @see org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite#addUserAttribute(org.apache.jetspeed.om.common.UserAttribute)
  -     */
  -    public void addUserAttribute(UserAttribute userAttribute)
  -    {
  -        portlet.addUserAttribute(userAttribute);
  -    }
  -
  -    /** 
  -     * @see org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite#setUserAttributeSet(java.util.Collection)
  -     */
  -    public void setUserAttributeSet(Collection userAttributeSet)
  -    {
  -        portlet.setUserAttributeSet(userAttributeSet);
  -    }
  -
  -    /** 
  -     * @see org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite#getUserAttributeSet()
  -     */
  -    public Collection getUserAttributeSet()
  -    {
  -        return portlet.getUserAttributeSet();
       }
   
       /** 
  
  
  
  1.10      +39 -1     jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java
  
  Index: PortletApplicationDefinitionImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PortletApplicationDefinitionImpl.java	24 Apr 2004 19:05:54 -0000	1.9
  +++ PortletApplicationDefinitionImpl.java	7 May 2004 13:41:55 -0000	1.10
  @@ -21,8 +21,10 @@
   import java.util.Collection;
   
   import org.apache.jetspeed.om.common.GenericMetadata;
  +import org.apache.jetspeed.om.common.UserAttribute;
   import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
   import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
  +import org.apache.jetspeed.om.impl.UserAttributeImpl;
   import org.apache.jetspeed.util.JetspeedObjectID;
   import org.apache.pluto.om.common.ObjectID;
   import org.apache.pluto.om.portlet.PortletDefinition;
  @@ -67,6 +69,9 @@
   
       private Collection portlets;
       
  +    /** User attributes collection. */
  +    private Collection userAttributes;
  +    
       private PortletDefinitionListImpl listWrapper = new PortletDefinitionListImpl();
   
       private int applicationType = MutablePortletApplication.WEBAPP;
  @@ -75,6 +80,7 @@
       public PortletApplicationDefinitionImpl()
       {
           portlets = new ArrayList();
  +        userAttributes = new ArrayList();
       }
   
       /**
  @@ -203,6 +209,38 @@
       public void setPortletDefinitionList(PortletDefinitionList portlets)
       {
           this.portlets = ((PortletDefinitionListImpl) portlets).getInnerCollection();
  +    }
  +
  +    /** 
  +     * @see org.apache.jetspeed.om.common.portlet.PortletApplicationComposite#addUserAttribute(java.lang.String, java.lang.String)
  +     */
  +    public void addUserAttribute(String name, String description)
  +    {
  +        userAttributes.add(new UserAttributeImpl(name, description));
  +    }
  +
  +    /** 
  +     * @see org.apache.jetspeed.om.common.portlet.PortletApplicationComposite#addUserAttribute(org.apache.jetspeed.om.common.UserAttribute)
  +     */
  +    public void addUserAttribute(UserAttribute userAttribute)
  +    {
  +        userAttributes.add(userAttribute);
  +    }
  +
  +    /** 
  +     * @see org.apache.jetspeed.om.common.portlet.PortletApplicationComposite#setUserAttributes(java.util.Collection)
  +     */
  +    public void setUserAttributes(Collection userAttributes)
  +    {
  +        this.userAttributes = userAttributes;
  +    }
  +
  +    /** 
  +     * @see org.apache.jetspeed.om.common.portlet.PortletApplicationComposite#getUserAttributes()
  +     */
  +    public Collection getUserAttributes()
  +    {
  +        return this.userAttributes;
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org