jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r799188 - in /jackrabbit/trunk: jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/user/UserManager.java jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java
Date Thu, 30 Jul 2009 07:02:36 GMT
Author: angela
Date: Thu Jul 30 07:02:35 2009
New Revision: 799188

URL: http://svn.apache.org/viewvc?rev=799188&view=rev
Log:
javadoc

Modified:
    jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/user/UserManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java

Modified: jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/user/UserManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/user/UserManager.java?rev=799188&r1=799187&r2=799188&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/user/UserManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/user/UserManager.java
Thu Jul 30 07:02:35 2009
@@ -116,9 +116,7 @@
     User createUser(String userID, String password) throws AuthorizableExistsException, RepositoryException;
 
     /**
-     * Creates an User for the given userID that authenitcates with the given
-     * {@link javax.jcr.Credentials Credentials} and returns the specified
-     * Principal upon {@link User#getPrincipal()}. If the implementation is not
+     * Creates an User for the given parameters. If the implementation is not
      * able to deal with the <code>itermediatePath</code> that parameter should
      * be ignored.
      * Except for the <code>itermediatePath</code>, neither of the specified
@@ -139,26 +137,29 @@
 
     /**
      * Creates a new <code>Group</code> that is based on the given principal.
+     * Note that the group's ID is implementation specific. The implementation
+     * may take the principal name as ID hint but must in any case assert that
+     * it is unique among the IDs known to this manager.
      *
      * @param principal A non-null <code>Principal</code>
      * @return The new <code>Group</code>.
-     * @throws AuthorizableExistsException in case the given groupID is already
-     * in use or another Authorizable with the same principal name exists.
+     * @throws AuthorizableExistsException in case the given principal is already
+     * in use with another Authorizable.
      * @throws RepositoryException If another error occurs.
      */
     Group createGroup(Principal principal) throws AuthorizableExistsException, RepositoryException;
 
     /**
      * Creates a new <code>Group</code> that is based on the given principal
-     * and the specified <code>itermediatePath</code> hint. If the implementation
is not
-     * able to deal with the <code>itermediatePath</code> that parameter should
-     * be ignored.
+     * and the specified <code>itermediatePath</code> hint. If the implementation
+     * is not able to deal with the <code>itermediatePath</code> this parameter
+     * should be ignored.
      *
      * @param principal
      * @param intermediatePath
      * @return The new <code>Group</code>.
-     * @throws AuthorizableExistsException in case the given groupID is already
-     * in use or another Authorizable with the same principal name exists.
+     * @throws AuthorizableExistsException in case the given principal is already
+     * in use with another Authorizable.
      * @throws RepositoryException If another error occurs.
      */
     Group createGroup(Principal principal, String intermediatePath) throws AuthorizableExistsException,
RepositoryException;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java?rev=799188&r1=799187&r2=799188&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java
Thu Jul 30 07:02:35 2009
@@ -400,26 +400,30 @@
     }
 
     /**
-     * Create a new <code>Group</code> with the given <code>groupName</code>.
-     * It will be created below the this UserManager's root Path.<br>
-     * If non-existant elements of the Path will be created as <code>Nodes</code>
-     * of type {@link #NT_REP_AUTHORIZABLE_FOLDER rep:AuthorizableFolder}
-     *
-     * @param principal
-     * @see UserManager#createGroup(Principal);
-     * @inheritDoc
+     * Same as {@link #createGroup(java.security.Principal, String )} where the
+     * intermediate path is <code>null</code>.
+     * @see UserManager#createGroup(Principal)
      */
     public Group createGroup(Principal principal) throws RepositoryException {
         return createGroup(principal, null);
     }
 
     /**
+     * Create a new <code>Group</code> from the given <code>principal</code>.
+     * It will be created below the this {@link #GROUPS_PATH group path}.<br>
+     * Non-existant elements of the Path will be created as nodes
+     * of type {@link #NT_REP_AUTHORIZABLE_FOLDER rep:AuthorizableFolder}.
+     * The group ID will be generated from the principal name. If the name
+     * conflicts with an existing authorizable ID (may happen in cases where
+     * principal name != ID) the principal name is expanded by a suffix;
+     * otherwise the resulting group ID equals the principal name.
      *
      * @param principal
      * @param intermediatePath Is always ignored.
-     * @return
+     * @return A new group.
      * @throws AuthorizableExistsException
      * @throws RepositoryException
+     * @see UserManager#createGroup(java.security.Principal, String)
      */
     public Group createGroup(Principal principal, String intermediatePath) throws AuthorizableExistsException,
RepositoryException {
         if (!isValidPrincipal(principal)) {



Mime
View raw message