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 gg...@apache.org on 2002/09/27 18:54:08 UTC
cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile BasePSMLDocument.java ConfigElement.java MetaInfo.java Parameter.java Portlets.java Profile.java ProfileLocator.java PSMLDocument.java Security.java BaseProfile.java BaseProfileLocator.java
ggolden 2002/09/27 09:54:08
Modified: src/java/org/apache/jetspeed/om/profile
BasePSMLDocument.java ConfigElement.java
MetaInfo.java Parameter.java Portlets.java
Profile.java ProfileLocator.java PSMLDocument.java
Security.java BaseProfile.java
BaseProfileLocator.java
Log:
Profile and PSMLDocument and all of their objects are cloneable
to support the customizers working on a clone of the current profile / document
Revision Changes Path
1.8 +15 -1 jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/BasePSMLDocument.java
Index: BasePSMLDocument.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/BasePSMLDocument.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- BasePSMLDocument.java 22 Mar 2002 18:38:35 -0000 1.7
+++ BasePSMLDocument.java 27 Sep 2002 16:54:07 -0000 1.8
@@ -413,5 +413,19 @@
return false;
}
+
+ /**
+ * Create a clone of this object
+ */
+ public Object clone()
+ throws java.lang.CloneNotSupportedException
+ {
+ Object cloned = super.clone();
+
+ // clone the portlets
+ ((BasePSMLDocument)cloned).portlets = ((this.portlets == null) ? null : (Portlets) this.portlets.clone());
+
+ return cloned;
+ }
}
1.4 +7 -2 jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/ConfigElement.java
Index: ConfigElement.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/ConfigElement.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ConfigElement.java 25 Mar 2002 21:42:03 -0000 1.3
+++ ConfigElement.java 27 Sep 2002 16:54:07 -0000 1.4
@@ -64,7 +64,7 @@
* @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
* @version $Id$
*/
-public interface ConfigElement
+public interface ConfigElement extends Cloneable
{
/**
@@ -102,4 +102,9 @@
public void addParameter(Parameter vParameter)
throws java.lang.IndexOutOfBoundsException;
+ /**
+ * Create a clone of this object
+ */
+ public Object clone()
+ throws java.lang.CloneNotSupportedException;
}
1.3 +7 -2 jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/MetaInfo.java
Index: MetaInfo.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/MetaInfo.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MetaInfo.java 24 Sep 2002 21:33:35 -0000 1.2
+++ MetaInfo.java 27 Sep 2002 16:54:07 -0000 1.3
@@ -61,7 +61,7 @@
* @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
* @version $Id$
*/
-public interface MetaInfo extends Serializable
+public interface MetaInfo extends Serializable, Cloneable
{
/** @return the parameter's title */
@@ -91,4 +91,9 @@
*/
public void setImage(String image);
+ /**
+ * Create a clone of this object
+ */
+ public Object clone()
+ throws java.lang.CloneNotSupportedException;
}
1.4 +8 -3 jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Parameter.java
Index: Parameter.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Parameter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Parameter.java 28 Jun 2002 05:37:30 -0000 1.3
+++ Parameter.java 27 Sep 2002 16:54:07 -0000 1.4
@@ -64,7 +64,7 @@
* @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
* @version $Id$
*/
-public interface Parameter
+public interface Parameter extends Cloneable
{
/** @return name the name of the parameter */
public String getName();
@@ -91,5 +91,10 @@
* @param securityRef New value of property securityRef.
*/
public void setSecurityRef(SecurityReference securityRef);
-
+
+ /**
+ * Create a clone of this object
+ */
+ public Object clone()
+ throws java.lang.CloneNotSupportedException;
}
1.5 +1 -2 jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Portlets.java
Index: Portlets.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Portlets.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Portlets.java 28 Jun 2002 05:37:30 -0000 1.4
+++ Portlets.java 27 Sep 2002 16:54:07 -0000 1.5
@@ -128,5 +128,4 @@
* @param securityRef New value of property securityRef.
*/
public void setSecurityRef(SecurityReference securityRef);
-
}
1.8 +1 -8 jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Profile.java
Index: Profile.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Profile.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Profile.java 17 Jul 2001 16:41:04 -0000 1.7
+++ Profile.java 27 Sep 2002 16:54:07 -0000 1.8
@@ -95,11 +95,4 @@
* @throws ProfileException if an error occurs storing the profile
*/
public void store() throws ProfileException;
-
- /**
- * @see Object#clone
- * @return an instance copy of this object
- */
- Object clone() throws java.lang.CloneNotSupportedException;
-
}
1.9 +26 -26 jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/ProfileLocator.java
Index: ProfileLocator.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/ProfileLocator.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ProfileLocator.java 24 Sep 2002 21:33:35 -0000 1.8
+++ ProfileLocator.java 27 Sep 2002 16:54:07 -0000 1.9
@@ -69,7 +69,7 @@
* @version $Id$
*/
-public interface ProfileLocator extends Serializable
+public interface ProfileLocator extends Serializable, Cloneable
{
/*
* populates this profile locator from a given path in the format:
@@ -82,7 +82,7 @@
*
* @param path The formatted profiler path string.
*/
- void createFromPath(String path);
+ public void createFromPath(String path);
/*
* Gets the unique profile locator id, which is a combination of the params
@@ -94,7 +94,7 @@
*
* @return The profile locator id
*/
- String getId();
+ public String getId();
/*
* Gets the unique profile locator path, which is a combination of the params
@@ -108,7 +108,7 @@
*
* @return The profile locator path
*/
- String getPath();
+ public String getPath();
/*
* Gets the resource name parameter for this profile.
@@ -130,7 +130,7 @@
*
* @return The media type parameter for this profile.
*/
- String getMediaType();
+ public String getMediaType();
/*
* Sets the media type parameter for this profile.
@@ -138,7 +138,7 @@
*
* @param mediaType The media type parameter for this profile.
*/
- void setMediaType(String mediaType);
+ public void setMediaType(String mediaType);
/*
* Gets the language parameter for this profile.
@@ -147,7 +147,7 @@
*
* @return The language parameter for this profile.
*/
- String getLanguage();
+ public String getLanguage();
/*
* Sets the language parameter for this profile.
@@ -156,7 +156,7 @@
*
* @param language The language parameter for this profile.
*/
- void setLanguage(String language);
+ public void setLanguage(String language);
/*
* Gets the country code parameter for this profile.
@@ -165,7 +165,7 @@
*
* @return The country code parameter for this profile.
*/
- String getCountry();
+ public String getCountry();
/*
* Sets the country code parameter for this profile.
@@ -174,46 +174,46 @@
*
* @param country The country code parameter for this profile.
*/
- void setCountry(String country);
+ public void setCountry(String country);
/*
* Gets the user parameter for this profile.
*
* @return The user parameter for this profile.
*/
- JetspeedUser getUser();
+ public JetspeedUser getUser();
- String getUserName();
+ public String getUserName();
/*
* Sets the user parameter for this profile.
*
* @param user The user parameter for this profile.
*/
- void setUser(JetspeedUser user);
+ public void setUser(JetspeedUser user);
/*
* Gets the anonymous user flag for this profile.
*
* @return True if this profile is anonymous.
*/
- boolean getAnonymous();
+ public boolean getAnonymous();
/*
* Sets the user parameter as the anonymous user
*
* @param anonymous True indicates this is an anonymous user.
*/
- void setAnonymous(boolean anonymous);
+ public void setAnonymous(boolean anonymous);
/*
* Gets the role parameter for this profile.
*
* @return The role parameter for this profile.
*/
- Role getRole();
+ public Role getRole();
- String getRoleName();
+ public String getRoleName();
/*
@@ -221,32 +221,32 @@
*
* @param role The role parameter for this profile.
*/
- void setRole( Role role );
+ public void setRole( Role role );
- void setRoleByName(String roleName);
+ public void setRoleByName(String roleName);
/*
* Gets the group parameter for this profile.
*
* @return The group parameter for this profile.
*/
- Group getGroup();
+ public Group getGroup();
- String getGroupName();
+ public String getGroupName();
/*
* Sets the group parameter for this profile.
*
* @param group The group parameter for this profile.
*/
- void setGroup( Group group );
+ public void setGroup( Group group );
- void setGroupByName( String groupName );
+ public void setGroupByName( String groupName );
- /**
+ /**
* @see Object#clone
* @return an instance copy of this object
*/
- Object clone() throws java.lang.CloneNotSupportedException;
+ public Object clone() throws java.lang.CloneNotSupportedException;
}
1.7 +8 -2 jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/PSMLDocument.java
Index: PSMLDocument.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/PSMLDocument.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- PSMLDocument.java 24 Sep 2002 21:33:35 -0000 1.6
+++ PSMLDocument.java 27 Sep 2002 16:54:07 -0000 1.7
@@ -66,7 +66,7 @@
* @author <a href="mailto:raphael@apache.org">Rapha�l Luta</a>
* @version $Id$
*/
-public interface PSMLDocument extends Serializable
+public interface PSMLDocument extends Serializable, Cloneable
{
/**
* Return the name of this document
@@ -147,5 +147,11 @@
*/
public boolean removeEntryById(String entryId);
+ /**
+ * Create a clone of this object
+ */
+ public Object clone()
+ throws java.lang.CloneNotSupportedException;
+
}
1.4 +9 -3 jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Security.java
Index: Security.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Security.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Security.java 28 Jun 2002 05:37:30 -0000 1.3
+++ Security.java 27 Sep 2002 16:54:07 -0000 1.4
@@ -61,7 +61,7 @@
* @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
* @version $Id$
*/
-public interface Security
+public interface Security extends Cloneable
{
/**
* Gets the security entry unique id.
@@ -78,4 +78,10 @@
* @param id the unique id of the security entry.
*/
public void setId(String id);
- }
\ No newline at end of file
+
+ /**
+ * Create a clone of this object
+ */
+ public Object clone()
+ throws java.lang.CloneNotSupportedException;
+}
\ No newline at end of file
1.15 +8 -3 jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/BaseProfile.java
Index: BaseProfile.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/BaseProfile.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- BaseProfile.java 28 Jun 2002 05:37:30 -0000 1.14
+++ BaseProfile.java 27 Sep 2002 16:54:07 -0000 1.15
@@ -92,13 +92,18 @@
this.setUser(locator.getUser());
}
- /**
+ /**
* @see Object#clone
* @return an instance copy of this object
*/
public Object clone() throws java.lang.CloneNotSupportedException
{
- return super.clone();
+ Object cloned = super.clone();
+
+ // clone the document
+ ((BaseProfile)cloned).document = ((this.document == null) ? null : (PSMLDocument) this.document.clone());
+
+ return cloned;
}
/**
1.15 +3 -4 jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/BaseProfileLocator.java
Index: BaseProfileLocator.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/BaseProfileLocator.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- BaseProfileLocator.java 3 Jul 2002 02:15:07 -0000 1.14
+++ BaseProfileLocator.java 27 Sep 2002 16:54:07 -0000 1.15
@@ -82,7 +82,7 @@
* @version $Id$
*/
-public class BaseProfileLocator implements ProfileLocator, Cloneable
+public class BaseProfileLocator implements ProfileLocator
{
// instance state
private String name = null;
@@ -290,7 +290,7 @@
}
}
- /**
+ /**
* @see Object#clone
* @return an instance copy of this object
*/
@@ -298,7 +298,6 @@
{
return super.clone();
}
-
/*
* Gets the resource name parameter for this profile.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>