[jboss-identity-commits] JBoss Identity SVN: r19 - in trunk/identity-api/src/main/java/org/jboss/identity/api: managers and 1 other directory.

jboss-identity-commits at lists.jboss.org jboss-identity-commits at lists.jboss.org
Thu Jul 10 14:19:55 EDT 2008


Author: anil.saldhana at jboss.com
Date: 2008-07-10 14:19:55 -0400 (Thu, 10 Jul 2008)
New Revision: 19

Added:
   trunk/identity-api/src/main/java/org/jboss/identity/api/exception/SessionNotOpenException.java
Modified:
   trunk/identity-api/src/main/java/org/jboss/identity/api/managers/RelationshipManager.java
Log:
JBID-5: managers api

Added: trunk/identity-api/src/main/java/org/jboss/identity/api/exception/SessionNotOpenException.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/exception/SessionNotOpenException.java	                        (rev 0)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/exception/SessionNotOpenException.java	2008-07-10 18:19:55 UTC (rev 19)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.identity.api.exception;
+
+/**
+ * Exception indicating that no session
+ * is open
+ * @author Anil.Saldhana at redhat.com
+ * @since Jul 10, 2008
+ */
+public class SessionNotOpenException extends IdentityException
+{ 
+   private static final long serialVersionUID = 1L;
+}

Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/managers/RelationshipManager.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/managers/RelationshipManager.java	2008-07-10 17:49:10 UTC (rev 18)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/managers/RelationshipManager.java	2008-07-10 18:19:55 UTC (rev 19)
@@ -24,6 +24,7 @@
 import java.util.List;
 import java.util.Set;
 
+import org.jboss.identity.api.exception.SessionNotOpenException;
 import org.jboss.identity.model.Identity;
 import org.jboss.identity.model.Role;
 import org.jboss.identity.model.domain.Realm;
@@ -44,96 +45,120 @@
     * @param groupA
     * @param groupB
     * @param relationshipType
+    * @throws SessionNotOpenException session is not open
     */
-   void associate(Group groupA, Group groupB, RelationshipType relationshipType);
+   void associate(Group groupA, Group groupB, RelationshipType relationshipType)
+   throws SessionNotOpenException;
    
    /**
     * <p>Associate a relationship between two realms</p>
     * @param realmA
     * @param realmB
     * @param relationshipType
+    * @throws SessionNotOpenException session is not open
     */
-   void associate(Realm realmA, Realm realmB, RelationshipType relationshipType);
+   void associate(Realm realmA, Realm realmB, RelationshipType relationshipType)
+   throws SessionNotOpenException;
    
    /**
     * <p>Associate a role with an Identity</p>
     * @param realm
     * @param identity
     * @param aRole
+    * @throws SessionNotOpenException session is not open
     */
-   void associate(Realm realm, Identity identity, Role aRole);
+   void associate(Realm realm, Identity identity, Role aRole)
+   throws SessionNotOpenException;
    
    /**
     * <p>Associate a list of roles with an Identity</p>
     * @param realm
     * @param identity
     * @param aRoleList
+    * @throws SessionNotOpenException session is not open
     */
-   void associate(Realm realm, Identity identity, List<Role> aRoleList);
+   void associate(Realm realm, Identity identity, List<Role> aRoleList)
+   throws SessionNotOpenException;
    
    /**
     * <p>Associate a group with an identity</p>
     * @param realm
     * @param identity
     * @param aGroup
+    * @throws SessionNotOpenException session is not open
     */
-   void associate(Realm realm,Identity identity, Group aGroup);
+   void associate(Realm realm,Identity identity, Group aGroup)
+   throws SessionNotOpenException;
    
    /**
     * <p>Associate a set of groups with an identity</p>
     * @param realm
     * @param identity
     * @param aGroupSet
+    * @throws SessionNotOpenException session is not open
     */
-   void associate(Realm realm,Identity identity, Set<Group> aGroupSet);
+   void associate(Realm realm,Identity identity, Set<Group> aGroupSet)
+   throws SessionNotOpenException;
    
    /**
     * <p>Disassociate a relationship between two groups</p>
     * @param groupA
     * @param groupB
     * @param relationshipType
+    * @throws SessionNotOpenException session is not open
     */
-   void disassociate(Group groupA, Group groupB, RelationshipType relationshipType);
+   void disassociate(Group groupA, Group groupB, RelationshipType relationshipType)
+   throws SessionNotOpenException;
    
    /**
     * <p>Disassociate a relationship between two realms</p>
     * @param realmA
     * @param realmB
     * @param relationshipType
+    * @throws SessionNotOpenException session is not open
     */
-   void disassociate(Realm realmA, Realm realmB, RelationshipType relationshipType);
+   void disassociate(Realm realmA, Realm realmB, RelationshipType relationshipType)
+   throws SessionNotOpenException;
    
    /**
     * <p>Disassociate a role with an Identity</p>
     * @param realm
     * @param identity
     * @param aRole
+    * @throws SessionNotOpenException session is not open
     */
-   void disassociate(Realm realm, Identity identity, Role aRole);
+   void disassociate(Realm realm, Identity identity, Role aRole)
+   throws SessionNotOpenException;
    
    /**
     * <p>Disassociate a list of roles with an Identity</p>
     * @param realm
     * @param identity
     * @param aRoleList
+    * @throws SessionNotOpenException session is not open
     */
-   void disassociate(Realm realm, Identity identity, List<Role> aRoleList);
+   void disassociate(Realm realm, Identity identity, List<Role> aRoleList)
+   throws SessionNotOpenException;
    
    /**
     * <p>Disassociate a group with an identity</p>
     * @param realm
     * @param identity
     * @param aGroup
+    * @throws SessionNotOpenException session is not open
     */
-   void disassociate(Realm realm,Identity identity, Group aGroup);
+   void disassociate(Realm realm,Identity identity, Group aGroup)
+   throws SessionNotOpenException;
    
    /**
     * <p>Disassociate a set of groups with an identity</p>
     * @param realm
     * @param identity
     * @param aGroupSet
+    * @throws SessionNotOpenException session is not open
     */
-   void disassociate(Realm realm,Identity identity, Set<Group> aGroupSet);
+   void disassociate(Realm realm,Identity identity, Set<Group> aGroupSet)
+   throws SessionNotOpenException;
   
    /**
     * @param fromGroup




More information about the jboss-identity-commits mailing list