portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jf...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/portlet/impl PortletApplicationDefinitionImpl.java
Date Thu, 11 Mar 2004 19:14:58 GMT
jford       2004/03/11 11:14:58

  Modified:    components/registry/src/java/org/apache/jetspeed/om/portlet/impl
                        PortletApplicationDefinitionImpl.java
  Log:
  Use new classes for PortletApplication metadata
  
  Revision  Changes    Path
  1.7       +15 -12    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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PortletApplicationDefinitionImpl.java	10 Mar 2004 01:15:32 -0000	1.6
  +++ PortletApplicationDefinitionImpl.java	11 Mar 2004 19:14:58 -0000	1.7
  @@ -21,17 +21,9 @@
   import java.util.Collection;
   
   import org.apache.jetspeed.om.common.GenericMetadata;
  -import org.apache.jetspeed.om.common.impl.GenericMetadataImpl;
   import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
   import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
  -import org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl;
   import org.apache.jetspeed.util.JetspeedObjectID;
  -import org.apache.ojb.broker.PersistenceBroker;
  -import org.apache.ojb.broker.PersistenceBrokerAware;
  -import org.apache.ojb.broker.PersistenceBrokerException;
  -import org.apache.ojb.broker.query.Criteria;
  -import org.apache.ojb.broker.query.Query;
  -import org.apache.ojb.broker.query.QueryFactory;
   import org.apache.pluto.om.common.ObjectID;
   import org.apache.pluto.om.portlet.PortletDefinition;
   import org.apache.pluto.om.portlet.PortletDefinitionList;
  @@ -68,7 +60,7 @@
       protected long webApplicationId;
       
       /** Metadata property */
  -    private GenericMetadata metadata = new GenericMetadataImpl();
  +    private GenericMetadata metadata = new PortletApplicationMetadataImpl();
       
       private Collection metadataFields = null;
       
  @@ -250,14 +242,25 @@
       /* (non-Javadoc)
        * @see org.apache.jetspeed.om.common.portlet.MutablePortletApplication#getMetadata()
        */
  -    public GenericMetadata getMetadata() {
  +    public GenericMetadata getMetadata()
  +    {
  +        if(metadata.getFields() == null)
  +        {
  +            if(metadataFields == null)
  +            {
  +                metadataFields = new ArrayList();
  +            }
  +            metadata.setFields(metadataFields);
  +        }
  +        
           return metadata;
       }
   
       /* (non-Javadoc)
        * @see org.apache.jetspeed.om.common.portlet.MutablePortletApplication#setMetadata(org.apache.jetspeed.om.common.GenericMetadata)
        */
  -    public void setMetadata(GenericMetadata metadata) {
  +    public void setMetadata(GenericMetadata metadata)
  +    {
           this.metadata = metadata;
           this.metadataFields = metadata.getFields();     
       }
  
  
  

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


Mime
View raw message