dlestrat 2004/10/02 16:05:20 Modified: components/security/src/java/org/apache/jetspeed/security/spi GroupSecurityHandler.java SecurityMappingHandler.java Log: http://nagoya.apache.org/jira/browse/JS2-114#action_53626 Revision Changes Path 1.3 +23 -0 jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/GroupSecurityHandler.java Index: GroupSecurityHandler.java =================================================================== RCS file: /home/cvs/jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/GroupSecurityHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- GroupSecurityHandler.java 19 Sep 2004 19:04:11 -0000 1.2 +++ GroupSecurityHandler.java 2 Oct 2004 23:05:20 -0000 1.3 @@ -16,6 +16,9 @@ import java.security.Principal; +import org.apache.jetspeed.security.GroupPrincipal; +import org.apache.jetspeed.security.SecurityException; + /** * <p> * This interface encapsulates the persistence of security groups. @@ -43,5 +46,25 @@ * @return The <code>Principal</p> */ Principal getGroupPrincipal(String groupFullPathName); + + /** + * <p> + * Sets the group principal in the backing store. + * </p> + * + * @param groupPrincipal The <code>GroupPrincipal</code>. + * @throws SecurityException Throws a [EMAIL PROTECTED] SecurityException}. + */ + void setGroupPrincipal(GroupPrincipal groupPrincipal) throws SecurityException; + + /** + * <p> + * Removes the group principal. + * </p> + * + * @param groupPrincipal The <code>GroupPrincipal</code>. + * @throws SecurityException Throws a [EMAIL PROTECTED] SecurityException}. + */ + void removeGroupPrincipal(GroupPrincipal groupPrincipal) throws SecurityException; } 1.3 +67 -5 jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/SecurityMappingHandler.java Index: SecurityMappingHandler.java =================================================================== RCS file: /home/cvs/jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/SecurityMappingHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SecurityMappingHandler.java 30 Sep 2004 04:01:42 -0000 1.2 +++ SecurityMappingHandler.java 2 Oct 2004 23:05:20 -0000 1.3 @@ -17,6 +17,7 @@ import java.util.Set; import org.apache.jetspeed.security.HierarchyResolver; +import org.apache.jetspeed.security.SecurityException; /** * <p> @@ -81,17 +82,30 @@ /** * <p> - * Sets the roles principals on a given user. The provided set replaces - * any set that may already have been set on the user. + * Sets the role principal on a given user. * </p> * - * @param username The user to add the roles principals to. - * @param rolePrincipals The roles principals to add. + * @param username The user to add the role principal to. + * @param roleFullPathName The full path of the role principal to add. + * @throws SecurityException Throws a [EMAIL PROTECTED] SecurityException}. An exeption needs to be + * thrown if the user does not exist. */ - void setRolePrincipals(String username, Set rolePrincipals); + void setRolePrincipal(String username, String roleFullPathName) throws SecurityException; /** * <p> + * Removes the role principal on a given user. + * </p> + * + * @param username The user to remove the role principal from. + * @param roleFullPathName The full path of the role principal to remove. + * @throws SecurityException Throws a [EMAIL PROTECTED] SecurityException}. An exeption needs to be + * thrown if the user does not exist. + */ + void removeRolePrincipal(String username, String roleFullPathName) throws SecurityException; + + /** + * <p> * Gets the role principals for the given group according to the relevant hierarchy * resolution rules. * </p> @@ -103,6 +117,30 @@ /** * <p> + * Sets the role principal on a given user. + * </p> + * + * @param groupFullPathName The group to add the role principal to. + * @param roleFullPathName The full path of the role principal to add. + * @throws SecurityException Throws a [EMAIL PROTECTED] SecurityException}. An exeption needs to be + * thrown if the group does not exist. + */ + void setRolePrincipalInGroup(String groupFullPathName, String roleFullPathName) throws SecurityException; + + /** + * <p> + * Removes the role principal on a given user. + * </p> + * + * @param groupFullPathName The group to remove the role principal from. + * @param roleFullPathName The full path of the role principal to remove. + * @throws SecurityException Throws a [EMAIL PROTECTED] SecurityException}. An exeption needs to be + * thrown if the group does not exist. + */ + void removeRolePrincipalInGroup(String groupFullPathName, String roleFullPathName) throws SecurityException; + + /** + * <p> * Gets the group principals for the given user according to the relevant hierarchy * resolution rules. * </p> @@ -142,5 +180,29 @@ * @return A set of <code>Principal</p> */ Set getUserPrincipalsInGroup(String groupFullPathName); + + /** + * <p> + * Sets the user principal in the given group. + * </p> + * + * @param username The user to add to the group principal. + * @param groupFullPathName The full path of the group principal. + * @throws SecurityException Throws a [EMAIL PROTECTED] SecurityException}. An exeption needs to be + * thrown if the user does not exist. + */ + void setUserPrincipalInGroup(String username, String groupFullPathName) throws SecurityException; + + /** + * <p> + * Removes the user principal from the given group. + * </p> + * + * @param username The user to remove from the group principal. + * @param groupFullPathName The full path of the group principal. + * @throws SecurityException Throws a [EMAIL PROTECTED] SecurityException}. An exeption needs to be + * thrown if the user does not exist. + */ + void removeUserPrincipalInGroup(String username, String groupFullPathName) throws SecurityException; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]