taylor 2004/07/06 14:30:04
Modified: components/registry/src/java/org/apache/jetspeed/om/portlet/impl
PortletApplicationDefinitionImpl.java
Added: components/registry/src/java/org/apache/jetspeed/om/impl
JetspeedServiceReferenceImpl.java
Log:
added new JetspeedServicesReference impl to OM
completed step 1 of JS2-70 -- Support service definitions in Jetspeed portlet
descriptor
step 3 is completed, leaving only step 2 (validation)
http://nagoya.apache.org/jira/browse/JS2-70
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.1
jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/impl/JetspeedServiceReferenceImpl.java
Index: JetspeedServiceReferenceImpl.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.om.impl;
import org.apache.jetspeed.om.common.JetspeedServiceReference;
/**
* Defines Jetspeed services supported by a portlet application.
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
*/
public class JetspeedServiceReferenceImpl implements JetspeedServiceReference
{
private String name;
private long appId;
private long id;
public JetspeedServiceReferenceImpl()
{
}
public JetspeedServiceReferenceImpl(String name)
{
this.name = name;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.common.JetspeedServiceReference#getName()
*/
public String getName()
{
return name;
}
/* (non-Javadoc)
* @see
org.apache.jetspeed.om.common.JetspeedServiceReference#setName(java.lang.String)
*/
public void setName(String name)
{
this.name = name;
}
}
1.13 +30 -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.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- PortletApplicationDefinitionImpl.java 5 Jun 2004 20:13:48 -0000 1.12
+++ PortletApplicationDefinitionImpl.java 6 Jul 2004 21:30:04 -0000 1.13
@@ -21,6 +21,7 @@
import java.util.Collection;
import org.apache.jetspeed.om.common.GenericMetadata;
+import org.apache.jetspeed.om.common.JetspeedServiceReference;
import org.apache.jetspeed.om.common.UserAttribute;
import org.apache.jetspeed.om.common.UserAttributeRef;
import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
@@ -63,6 +64,9 @@
/** Metadata property */
private Collection metadataFields = null;
+
+ /** Metadata property */
+ private Collection services = null;
/** Description */
private String description;
@@ -332,6 +336,31 @@
protected void setMetadataFields(Collection metadataFields)
{
this.metadataFields = metadataFields;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.apache.jetspeed.om.common.portlet.PortletApplication#getJetspeedServices()
+ */
+ public Collection getJetspeedServices()
+ {
+ if(services == null)
+ {
+ services = new ArrayList();
+ }
+
+ return services;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.apache.jetspeed.om.common.portlet.MutablePortletApplication#addJetspeedService(org.apache.jetspeed.om.common.JetspeedServiceReference)
+ */
+ public void addJetspeedService(JetspeedServiceReference service)
+ {
+ if(services == null)
+ {
+ services = new ArrayList();
+ }
+ services.add(service);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]