portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r692862 - in /portals/jetspeed-2/portal/branches/security-refactoring: components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/ jetspeed-api/src/main/java/org/apache/jetspeed/security/
Date Sun, 07 Sep 2008 14:10:58 GMT
Author: ate
Date: Sun Sep  7 07:10:58 2008
New Revision: 692862

URL: http://svn.apache.org/viewvc?rev=692862&view=rev
Log:
Refactoring the JetspeedPrincipalAssociation as a concrete spi class into the security component.
This class should only need to be instantiated for adding a new association, never for loading/updating,
nor delete for that matter which can be done through a query (or instantiating a temporary
transient instance to be deleted) 

Added:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalAssociation.java
  (contents, props changed)
      - copied, changed from r692524, portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociation.java
Removed:
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociation.java

Copied: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalAssociation.java
(from r692524, portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociation.java)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalAssociation.java?p2=portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalAssociation.java&p1=portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociation.java&r1=692524&r2=692862&rev=692862&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociation.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalAssociation.java
Sun Sep  7 07:10:58 2008
@@ -14,16 +14,51 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jetspeed.security;
+package org.apache.jetspeed.security.spi.impl;
+
+import java.io.Serializable;
+
+import org.apache.jetspeed.security.JetspeedPrincipal;
 
 /**
  * @version $Id$
  */
-public interface JetspeedPrincipalAssociation
+public class JetspeedPrincipalAssociation implements Serializable
 {
-    String getAssociationName();
+    private static final long serialVersionUID = 1L;
+    
+    @SuppressWarnings("unused")
+    private JetspeedPrincipal from;
+    @SuppressWarnings("unused")
+    private JetspeedPrincipal to;
+    @SuppressWarnings("unused")
+    private String associationName;
+    
+    public JetspeedPrincipalAssociation()
+    {
+        // needed for OJB/JPA although in practice it should *never* be needed to be loaded
+        // as the only operations to be used are insert/delete, never update
+    }
+
+    public JetspeedPrincipalAssociation(JetspeedPrincipal from, JetspeedPrincipal to, String
associationName)
+    {        
+        this.from = from;
+        this.to = to;
+        this.associationName = associationName;
+    }
+
+    public JetspeedPrincipal getFrom()
+    {
+        return from;
+    }
 
-    JetspeedPrincipal getPrincipalFrom();
+    public JetspeedPrincipal getTo()
+    {
+        return to;
+    }
 
-    JetspeedPrincipal getPrincipalTo();
+    public String getAssociationName()
+    {
+        return associationName;
+    }        
 }

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalAssociation.java
------------------------------------------------------------------------------
    svn:eol-style = native



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


Mime
View raw message