directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 10440 - incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/profile
Date Fri, 30 Apr 2004 04:14:38 GMT
Author: akarasulu
Date: Thu Apr 29 21:14:37 2004
New Revision: 10440

Modified:
   incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/profile/ProfileDAO.java
Log:
completed the creation of the ProfileDAO

Modified: incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/profile/ProfileDAO.java
==============================================================================
--- incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/profile/ProfileDAO.java	(original)
+++ incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/profile/ProfileDAO.java	Thu
Apr 29 21:14:37 2004
@@ -17,12 +17,89 @@
 package org.apache.rms.je.profile ;
 
 
+import org.apache.rms.Profile ;
+import org.apache.rms.Application ;
+import org.apache.rms.RmsException ;
+
+import java.util.Iterator ;
+
+
 /**
- * Profile data access object interface.
+ * Profile data access object interface.  This interface is designed to only
+ * deal with persisting Profile members with a cardinality of 1 that are kept
+ * in a single core record.  The roles associated with a profile are managed
+ * by another data access object separately.
  * 
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
 public interface ProfileDAO
 {
+    /**
+     * Creates a new Profile without any grants, denials, or Roles.
+     *
+     * @param appName the name of the profile's application
+     * @param userName the name of the profile's user
+     * @throws RmsException if there is a failure accessing the underlying
+     * database or a profile for the application and user already exists
+     */
+    void create( String appName, String userName ) throws RmsException ;
+
+    /**
+     * Deletes a profile within the database.
+     *
+     * @param appName the name of the profile's application
+     * @param userName the name of the profile's user
+     * @throws RmsException if there is a failure accessing the underlying
+     * database or a profile for the application or user does not exist
+     */
+    void delete( String appName, String userName ) throws RmsException ;
+
+    /**
+     * Gets a profile from the database.
+     *
+     * @param application the name of the profile's application
+     * @param userName the name of the profile's user
+     * @return the Profile object restored from the database
+     * @throws RmsException if there is a failure accessing the underlying
+     * database or a profile for the application or user does not exist
+     */
+    Profile get( Application application, String userName )
+            throws RmsException ;
+
+    /**
+     * Gets an iterator over the set of user names of profiles that exist for
+     * an application.
+     *
+     * @param appName the name of the profile's application
+     * @return an Iterator with zero or more Strings of user names
+     * @throws RmsException if there is a failure accessing the underlying
+     * database
+     */
+    Iterator listUserNames( String appName ) throws RmsException ;
+
+    /**
+     * Gets an iterator over the set of application names of profiles that
+     * exist for a user.
+     *
+     * @param userName the name of the profile's user
+     * @return an Iterator with zero or more Strings of application names
+     * @throws RmsException if there is a failure accessing the underlying
+     * database
+     */
+    Iterator listApplicationNames( String userName ) throws RmsException ;
+
+    /**
+     * Updates a profile's grants and denials and effective permissions of
+     * a user's application profile.
+     *
+     * @param appName the name of the profile's application
+     * @param userName the name of the profile's user
+     * @param grants the profile's permission grants bit vector
+     * @param denials the profile's permission denials bit vector
+     * @param permissions the profile's effective permissions bit vector
+     * @throws RmsException
+     */
+    void update( String appName, String userName, byte[] grants,
+                 byte[] denials, byte[] permissions ) throws RmsException ;
 }

Mime
View raw message