com.esri.adf.security.store
Interface SecurityStore

All Known Implementing Classes:
ADStore, DBStore, LDAPStore

public interface SecurityStore

SecurityStore interface needs to be implemented for any class thats wants to provide implementation for the ArcGISSecurityStore. If your custom SecurityStore implementation needs certain connection parameters during runtime, you can inherit the ConnectParams class.


Method Summary
 void addRole(ArcGISSecurityRole role)
          Add a role to the security store.
 void addRolesToUser(java.lang.String userName, java.lang.String[] roleList)
          Assign a list of roles to a particular user.
 void addUser(ArcGISSecurityUser user)
          Add a user to the security store.
 void addUsersToRole(java.lang.String roleName, java.lang.String[] userList)
          Assign a role to a bunch of users.
 void close()
          Closes the connection to the security store.
 void deleteRole(java.lang.String roleName)
          Delete a role from the security store.
 void deleteRolesFromUser(java.lang.String userName, java.lang.String[] roleList)
          Delete a bunch of roles from a user.
 void deleteUser(java.lang.String userName)
          Delete a user from the security store.
 void deleteUsersFromRole(java.lang.String roleName, java.lang.String[] userList)
          Delete a particular role from a bunch of users.
 java.lang.String forgotUserPassword(java.lang.String userName, java.lang.String secretQuest, java.lang.String secretAns)
          Reset the user password if the answer to the secret question matches the one present in the security store.
 java.util.List<ArcGISSecurityRole> getAllRoles()
          Return list of all the roles present in the security store.
 java.util.List<ArcGISSecurityUser> getAllUsers()
          Return list of all the users present in the security store.
 ArcGISSecurityRole getRole(java.lang.String roleName)
          Return information regarding a particular role from the security store.
 java.util.List<ArcGISSecurityRole> getRolesForUser(java.lang.String userName)
          Return a list of roles that are assigned to a particular user.
 ArcGISSecurityUser getUser(java.lang.String userName)
          Return information regarding a particular user from the security store.
 java.lang.String getUserSecretQuestion(java.lang.String userName)
          Return the secret question for the particular user.
 java.util.List<ArcGISSecurityUser> getUsersForRole(java.lang.String roleName)
          Return list of user who are assigned a particular role.
 void init(java.util.Map<java.lang.String,java.lang.String> paramsMap)
          Initialize the SecurityStore implementation.
 boolean isReadOnly()
          This method returns true if the datastore is ready only.
 void modifyRole(ArcGISSecurityRole role)
          Modify the information for a role in the security store.
 void modifyUser(ArcGISSecurityUser user)
          Modify the information for a user in the security store.
 void reinitialize()
          Reinitialize the connection to data stores.
 boolean testConnection(java.util.Map<java.lang.String,java.lang.String> paramsMap)
          Test the connection to the data store
 boolean validateUser(java.lang.String userName, java.lang.String userPassword)
          Check the user credentials with the information available in the security store.
 

Method Detail

init

void init(java.util.Map<java.lang.String,java.lang.String> paramsMap)
          throws ArcGISSecurityException
Initialize the SecurityStore implementation.

Parameters:
paramsMap - - connection parameters in a HashMap for the security data store
Throws:
ArcGISSecurityException - - if connection cannot be initialized

reinitialize

void reinitialize()
                  throws ArcGISSecurityException
Reinitialize the connection to data stores. Sometimes, the connections timeout, there needs to be a hook so that clients can call the object to reinitialize without having to create a new one.

Throws:
ArcGISSecurityException - - if connection cannot be initialized

testConnection

boolean testConnection(java.util.Map<java.lang.String,java.lang.String> paramsMap)
                       throws ArcGISSecurityException
Test the connection to the data store

Parameters:
paramsMap - - connection parameters in a map for the security data store
Returns:
true if the method can successfully connect to he security store false otherwise
Throws:
ArcGISSecurityException - - if there is an error while connecting to the security data store

isReadOnly

boolean isReadOnly()
This method returns true if the datastore is ready only. It returns false otherwise.

Returns:
true if data store is ready only, false otherwise

close

void close()
Closes the connection to the security store.


addUser

void addUser(ArcGISSecurityUser user)
             throws ArcGISSecurityException
Add a user to the security store.

Parameters:
user - - reference to ArcGISSecurityUser object that contains user information.
Throws:
ArcGISSecurityException - - if user cannot be added

deleteUser

void deleteUser(java.lang.String userName)
                throws ArcGISSecurityException
Delete a user from the security store.

Parameters:
userName - - String identifier that uniquely identifies a user.
Throws:
ArcGISSecurityException - - if the user cannot be deleted from the store.

modifyUser

void modifyUser(ArcGISSecurityUser user)
                throws ArcGISSecurityException
Modify the information for a user in the security store. When modifying user information, a particular user is identified by its userName. You cannot modify the userName for this user.

Parameters:
user - - reference to ArcGISSecurityUser object thats contains modified user information.
Throws:
ArcGISSecurityException

getUser

ArcGISSecurityUser getUser(java.lang.String userName)
                           throws ArcGISSecurityException
Return information regarding a particular user from the security store.

Parameters:
userName - - String representing the unique identifier for a user.
Returns:
reference to ArcGISSecurityUser thats contains the requested user information.
Throws:
ArcGISSecurityException - - if user information cannot be retrieved.

getAllUsers

java.util.List<ArcGISSecurityUser> getAllUsers()
                                               throws ArcGISSecurityException
Return list of all the users present in the security store.

Returns:
list of ArcGISSecurityUser objects containing user information.
Throws:
ArcGISSecurityException - - if there is an error accessing user information

forgotUserPassword

java.lang.String forgotUserPassword(java.lang.String userName,
                                    java.lang.String secretQuest,
                                    java.lang.String secretAns)
                                    throws ArcGISSecurityException
Reset the user password if the answer to the secret question matches the one present in the security store.

Parameters:
userName - - String identifier that uniquely identifies a particular user
secretQuest - - String representing the secret question set for the user
secretAns - - String representing the answer to the secret question
Returns:
String representing the new password for the user. The password can then be changed by calling the modifyUser method.
Throws:
ArcGISSecurityException - - if password cannot be reset

getUserSecretQuestion

java.lang.String getUserSecretQuestion(java.lang.String userName)
                                       throws ArcGISSecurityException
Return the secret question for the particular user.

Parameters:
userName - - String identifier that uniquely identifies a particular user
Returns:
- String representing the secret question set for the user
Throws:
ArcGISSecurityException - - if user information cannot be retrieved

addRole

void addRole(ArcGISSecurityRole role)
             throws ArcGISSecurityException
Add a role to the security store.

Parameters:
role - - reference to the ArcGISSecurityRole object that contains the role information.
Throws:
ArcGISSecurityException - - if a new role cannot be added

deleteRole

void deleteRole(java.lang.String roleName)
                throws ArcGISSecurityException
Delete a role from the security store.

Parameters:
roleName - - String identifier that uniquely identifies a particular role
Throws:
ArcGISSecurityException - - if a role cannot be deleted

modifyRole

void modifyRole(ArcGISSecurityRole role)
                throws ArcGISSecurityException
Modify the information for a role in the security store. When modifying role information, a particular role is identified by its roleName. You cannot modify the roleName for this role.

Parameters:
role - - reference to the ArcGISSecurityRole object that contains the modified role information.
Throws:
ArcGISSecurityException - - if role information cannot be modified.

getRole

ArcGISSecurityRole getRole(java.lang.String roleName)
                           throws ArcGISSecurityException
Return information regarding a particular role from the security store.

Parameters:
roleName - - String representing the unique identifier for a role.
Returns:
reference to ArcGISSecurityRole thats contains the requested role information.
Throws:
ArcGISSecurityException - - if role information cannot be retrieved.

getAllRoles

java.util.List<ArcGISSecurityRole> getAllRoles()
                                               throws ArcGISSecurityException
Return list of all the roles present in the security store.

Returns:
list of ArcGISSecurityRole objects containing role information.
Throws:
ArcGISSecurityException - - if there is an error accessing role information

addUsersToRole

void addUsersToRole(java.lang.String roleName,
                    java.lang.String[] userList)
                    throws ArcGISSecurityException
Assign a role to a bunch of users.

Parameters:
roleName - - String representing the particular role that is to be assigned.
userList - - Array of strings containing the name of the user to whom this role is to be assigned
Throws:
ArcGISSecurityException - - if this role cannot be assigned to the users.

addRolesToUser

void addRolesToUser(java.lang.String userName,
                    java.lang.String[] roleList)
                    throws ArcGISSecurityException
Assign a list of roles to a particular user.

Parameters:
userName - - String representing the particular role to whom these roles are to be assigned.
roleList - - Array of strings containing the name of the roles that are to be assigned to the user.
Throws:
ArcGISSecurityException - - if roles cannot be added to the user

deleteUsersFromRole

void deleteUsersFromRole(java.lang.String roleName,
                         java.lang.String[] userList)
                         throws ArcGISSecurityException
Delete a particular role from a bunch of users.

Parameters:
roleName - - String representing the particular role thats is to be deleted.
userList - - Array of strings containing the name of the users from whom this role is to be deleted.
Throws:
ArcGISSecurityException - - if the role cannot be deleted from the list of users

deleteRolesFromUser

void deleteRolesFromUser(java.lang.String userName,
                         java.lang.String[] roleList)
                         throws ArcGISSecurityException
Delete a bunch of roles from a user.

Parameters:
userName - - String representing the particular user from whom the roles are to be deleted.
roleList - - Array of strings containing name of the roles that are to be deleted from this user.
Throws:
ArcGISSecurityException - - if roles cannot be deleted from the user

getUsersForRole

java.util.List<ArcGISSecurityUser> getUsersForRole(java.lang.String roleName)
                                                   throws ArcGISSecurityException
Return list of user who are assigned a particular role.

Parameters:
roleName - - String representing the role that is assigned to the users.
Returns:
List of ArcGISSecurityUser objects that are assigned this particular role.
Throws:
ArcGISSecurityException - - if user list cannot be retrieved.

getRolesForUser

java.util.List<ArcGISSecurityRole> getRolesForUser(java.lang.String userName)
                                                   throws ArcGISSecurityException
Return a list of roles that are assigned to a particular user.

Parameters:
userName - - String representing the user whose roles are to be returned.
Returns:
List of ArcGISSecurityRole objects that are assigned to this user.
Throws:
ArcGISSecurityException - - if role list cannot be retrieved

validateUser

boolean validateUser(java.lang.String userName,
                     java.lang.String userPassword)
                     throws ArcGISSecurityException
Check the user credentials with the information available in the security store.

Parameters:
userName - - String representing a particular user
userPassword - - String representing the user's password
Returns:
true if the user credentials match with the ones in the security store.
Throws:
ArcGISSecurityException - - if user information cannot be retrieved.