You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/04/28 22:06:52 UTC
svn commit: rev 10374 - incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role
Author: akarasulu
Date: Wed Apr 28 13:06:51 2004
New Revision: 10374
Added:
incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/JeRoleFactory.java (contents, props changed)
Log:
stub for Je based role factory
Added: incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/JeRoleFactory.java
==============================================================================
--- (empty file)
+++ incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/JeRoleFactory.java Wed Apr 28 13:06:51 2004
@@ -0,0 +1,147 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.rms.je.role ;
+
+
+import org.apache.rms.Role ;
+import org.apache.rms.Application ;
+import org.apache.rms.RmsException ;
+import org.apache.rms.spi.MutableRole ;
+import org.apache.rms.spi.RoleFactory ;
+import org.apache.rms.spi.MutableApplication ;
+
+import org.apache.commons.lang.NotImplementedException ;
+
+import java.util.Map ;
+import java.util.Iterator ;
+
+
+/**
+ * A Berkeley DB Je Role factory implementation.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class JeRoleFactory implements RoleFactory
+{
+ /**
+ * Gets an Application's Role.
+ *
+ * @param an_app the Application the Role is defined for
+ * @param a_roleName the name of the Role
+ * @return the Role instance for application role specified or null if
+ * such a Role does not exist for the application
+ * @throws org.apache.rms.RmsException if there are problems accessing
+ * the backing store
+ */
+ public Role getRole( Application an_app, String a_roleName )
+ throws RmsException
+ {
+ throw new NotImplementedException( "STUB" ) ;
+ }
+
+
+ /**
+ * Iterates over the set of Role names for an Application.
+ *
+ * @param an_appName the name of the Application
+ * @return an Iterator of Strings
+ * @throws org.apache.rms.RmsException if there are problems accessing
+ * the backing store
+ */
+ public Iterator getRoleNames( String an_appName ) throws RmsException
+ {
+ throw new NotImplementedException( "STUB" ) ;
+ }
+
+
+ /**
+ * Gets the set of Role name Strings mapped to their respective Role
+ * instance for an Application
+ *
+ * @param an_app the Application the Role is defined for
+ * @return a Map of String keys of Role names mapped to values of Roles
+ * @throws org.apache.rms.RmsException if there are problems accessing the
+ * backing store
+ */
+ public Map getRoles( Application an_app ) throws RmsException
+ {
+ throw new NotImplementedException( "STUB" ) ;
+ }
+
+
+ /**
+ * Creates a mutable role for an application.
+ *
+ * @param app the mutable application the Role is created for
+ * @param roleName the name of the new Role
+ * @return the newly created Role
+ * @throws org.apache.rms.RmsException if there are problems accessing the
+ * backing store
+ */
+ public MutableRole create( MutableApplication app, String roleName )
+ throws RmsException
+ {
+ throw new NotImplementedException( "STUB" ) ;
+ }
+
+
+ /**
+ * Deletes a role for an application.
+ *
+ * @param appName the name of the application the Role is deleted from
+ * @param roleName the name of the deleted Role
+ * @throws org.apache.rms.RmsException if there are problems accessing the
+ * backing store
+ */
+ public void deleteRole( String appName, String roleName ) throws RmsException
+ {
+ throw new NotImplementedException( "STUB" ) ;
+ }
+
+
+ /**
+ * Sets the grants for a role.
+ *
+ * @param appName the name of the app the role is for
+ * @param roleName the name of the role
+ * @param grants the grant bits
+ * @throws org.apache.rms.RmsException if there are problems accessing the
+ * backing store
+ */
+ public void updateGrants( String appName, String roleName, byte[] grants )
+ throws RmsException
+ {
+ throw new NotImplementedException( "STUB" ) ;
+ }
+
+
+ /**
+ * Renames a Role.
+ *
+ * @param appName the name of the app the role is for
+ * @param oldName the original name of the Role
+ * @param newName the new name to change to
+ * @throws org.apache.rms.RmsException if there are problems accessing the
+ * backing store
+ */
+ public void renameRole( String appName, String oldName, String newName )
+ throws RmsException
+ {
+ throw new NotImplementedException( "STUB" ) ;
+ }
+}