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 ta...@apache.org on 2004/07/06 23:30:23 UTC
cvs commit: jakarta-jetspeed-2/components/registry/src/test/org/apache/jetspeed/components/portletregistry AbstractRegistryTest.java TestRegistryDirect.java
taylor 2004/07/06 14:30:23
Modified: components/registry/src/test/org/apache/jetspeed/components/portletregistry
AbstractRegistryTest.java TestRegistryDirect.java
Log:
registry tests
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.2 +5 -0 jakarta-jetspeed-2/components/registry/src/test/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java
Index: AbstractRegistryTest.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/components/registry/src/test/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractRegistryTest.java 18 Jun 2004 20:46:00 -0000 1.1
+++ AbstractRegistryTest.java 6 Jul 2004 21:30:23 -0000 1.2
@@ -6,6 +6,7 @@
*/
package org.apache.jetspeed.components.portletregistry;
+import java.util.Collection;
import java.util.Iterator;
import java.util.Locale;
@@ -143,6 +144,10 @@
validateDublinCore(app.getMetadata());
+ Collection services = app.getJetspeedServices();
+ assertNotNull("jetspeed services is null", services);
+ System.out.println("services is " + services);
+
assertNotNull("Failed to reteive portlet application via registry", registry.getPortletApplication("App_1"));
assertNotNull("Web app was not saved along with the portlet app.", webApp);
assertNotNull("Portlet was not saved along with the portlet app.", app.getPortletDefinitionByName("Portlet 1"));
1.12 +8 -1 jakarta-jetspeed-2/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestRegistryDirect.java
Index: TestRegistryDirect.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestRegistryDirect.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- TestRegistryDirect.java 18 Jun 2004 20:46:00 -0000 1.11
+++ TestRegistryDirect.java 6 Jul 2004 21:30:23 -0000 1.12
@@ -23,12 +23,14 @@
import org.apache.jetspeed.components.persistence.store.LockFailedException;
import org.apache.jetspeed.om.common.DublinCore;
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.ContentTypeComposite;
import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
import org.apache.jetspeed.om.common.preference.PreferenceComposite;
import org.apache.jetspeed.om.impl.DublinCoreImpl;
+import org.apache.jetspeed.om.impl.JetspeedServiceReferenceImpl;
import org.apache.jetspeed.om.impl.UserAttributeImpl;
import org.apache.jetspeed.om.impl.UserAttributeRefImpl;
import org.apache.jetspeed.om.portlet.impl.ContentTypeImpl;
@@ -108,6 +110,11 @@
UserAttribute ua = new UserAttributeImpl("user.name.family", "User Last Name");
app.addUserAttribute(ua);
+ JetspeedServiceReference service1 = new JetspeedServiceReferenceImpl("PortletEntityAccessComponent");
+ app.addJetspeedService(service1);
+ JetspeedServiceReference service2 = new JetspeedServiceReferenceImpl("PortletRegistryComponent");
+ app.addJetspeedService(service2);
+
addDublinCore(app.getMetadata());
WebApplicationDefinitionImpl webApp = new WebApplicationDefinitionImpl();
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org