org.enhydra.shark.api.admin
Interface UserGroupManagerAdmin

All Superinterfaces:
UserGroupManager

public interface UserGroupManagerAdmin
extends UserGroupManager

UserGroupManager handles users and groups and their relations in Shark.

Author:
Sasa Bojanic, Vladimir Puskas, Tanja Jovanovic

Method Summary
 void addGroupToGroup(java.lang.String groupName, java.lang.String subgroupName)
          Adds an existing group subgroupName to the group groupName.
 void addUserToGroup(java.lang.String groupName, java.lang.String username)
          Adds an existing user with a given username to the given group.
 void createGroup(java.lang.String groupName, java.lang.String description)
          Creates a new user group.
 void createUser(java.lang.String groupName, java.lang.String username, java.lang.String password, java.lang.String firstName, java.lang.String lastName, java.lang.String emailAddress)
          Allows administrator to create new user.
 void moveGroup(java.lang.String currentParentGroup, java.lang.String newParentGroup, java.lang.String subgroupName)
          Moves group subgroupName from the group currentParentGroup to group newParentGroup.
 void moveUser(java.lang.String currentGroup, java.lang.String newGroup, java.lang.String username)
          Moves user username from the group currentGroup to group newGroup.
 void removeGroup(java.lang.String groupName)
          Removes user group.
 void removeGroupFromGroup(java.lang.String groupName, java.lang.String subgroupName)
          Removes group subgroupName from the group groupName.
 void removeGroupTree(java.lang.String groupName)
          Deletes group groupName and all its child groups that don't belong to any other group except this one.
 void removeUser(java.lang.String username)
          Allows administrator to remove the user.
 void removeUserFromGroup(java.lang.String groupName, java.lang.String username)
          Removes the user from the group.
 void removeUsersFromGroupTree(java.lang.String groupName)
          Removes all users from group group that don't belong to any other group except this one.
 void setPassword(java.lang.String username, java.lang.String password)
          Sets user password.
 void updateGroup(java.lang.String groupName, java.lang.String description)
          Allows administrator to update data about group.
 void updateUser(java.lang.String username, java.lang.String firstName, java.lang.String lastName, java.lang.String emailAddress)
          Allows administrator to update data about user.
 
Methods inherited from interface org.enhydra.shark.api.internal.usergroup.UserGroupManager
configure, doesGroupBelongToGroup, doesGroupExist, doesUserBelongToGroup, doesUserExist, getAllGroupnames, getAllGroupnamesForUser, getAllImmediateSubgroupsForGroup, getAllImmediateUsersForGroup, getAllSubgroupsForGroups, getAllUsers, getAllUsersForGroups, getGroupDescription, getGroups, getObjects, getUserEMailAddress, getUserFirstName, getUserLastName, getUserPassword, getUserRealName, validateUser
 

Method Detail

createGroup

void createGroup(java.lang.String groupName,
                 java.lang.String description)
                 throws java.lang.Exception
Creates a new user group.

Parameters:
groupName - name of the given group.
description - group description.
Throws:
java.lang.Exception - If something unexpected happens.

removeGroup

void removeGroup(java.lang.String groupName)
                 throws java.lang.Exception
Removes user group.

Parameters:
groupName - name of the given group.
Throws:
java.lang.Exception - If something unexpected happens.

updateGroup

void updateGroup(java.lang.String groupName,
                 java.lang.String description)
                 throws java.lang.Exception
Allows administrator to update data about group.

Parameters:
groupName - name of the given group.
description - group description.
Throws:
java.lang.Exception - If something unexpected happens.

addGroupToGroup

void addGroupToGroup(java.lang.String groupName,
                     java.lang.String subgroupName)
                     throws java.lang.Exception
Adds an existing group subgroupName to the group groupName.

Parameters:
groupName - name of the given group.
subgroupName - name of the given subgroup to be added.
Throws:
java.lang.Exception - If something unexpected happens.

removeGroupFromGroup

void removeGroupFromGroup(java.lang.String groupName,
                          java.lang.String subgroupName)
                          throws java.lang.Exception
Removes group subgroupName from the group groupName.

Parameters:
groupName - name of the given group.
subgroupName - name of the given subgroup to be removed.
Throws:
java.lang.Exception - If something unexpected happens.

removeGroupTree

void removeGroupTree(java.lang.String groupName)
                     throws java.lang.Exception
Deletes group groupName and all its child groups that don't belong to any other group except this one.

Parameters:
groupName - name of the given group.
Throws:
java.lang.Exception - If something unexpected happens.

removeUsersFromGroupTree

void removeUsersFromGroupTree(java.lang.String groupName)
                              throws java.lang.Exception
Removes all users from group group that don't belong to any other group except this one.

Parameters:
groupName - name of the given group.
Throws:
java.lang.Exception - If something unexpected happens.

moveGroup

void moveGroup(java.lang.String currentParentGroup,
               java.lang.String newParentGroup,
               java.lang.String subgroupName)
               throws java.lang.Exception
Moves group subgroupName from the group currentParentGroup to group newParentGroup.

Parameters:
currentParentGroup - current group that contains group subgroupName.
newParentGroup - new group where group subgroupName will be moved to.
subgroupName - subgroup that will be moved.
Throws:
java.lang.Exception - If something unexpected happens.

addUserToGroup

void addUserToGroup(java.lang.String groupName,
                    java.lang.String username)
                    throws java.lang.Exception
Adds an existing user with a given username to the given group.

Parameters:
groupName - name of the given group.
username - username used to uniquely identify shark user.
Throws:
java.lang.Exception - If something unexpected happens.

removeUserFromGroup

void removeUserFromGroup(java.lang.String groupName,
                         java.lang.String username)
                         throws java.lang.Exception
Removes the user from the group.

Parameters:
groupName - name of the given group.
username - username used to uniquely identify shark user.
Throws:
java.lang.Exception - If something unexpected happens.

moveUser

void moveUser(java.lang.String currentGroup,
              java.lang.String newGroup,
              java.lang.String username)
              throws java.lang.Exception
Moves user username from the group currentGroup to group newGroup.

Parameters:
currentGroup - current group that contains the user.
newGroup - new group where the user will be moved to.
username - the user that will be moved.
Throws:
java.lang.Exception - If something unexpected happens.

createUser

void createUser(java.lang.String groupName,
                java.lang.String username,
                java.lang.String password,
                java.lang.String firstName,
                java.lang.String lastName,
                java.lang.String emailAddress)
                throws java.lang.Exception
Allows administrator to create new user. After its creation, the client application will always be able to log onto shark using username and password defined for the user.

Parameters:
groupName - groupName used to uniquely identify group - this parameter is mandatory.
username - username used to uniquely identify user - this parameter is mandatory.
password - password used to authenticate - this parameter is mandatory.
firstName - the user's first name.
lastName - the user's last name.
emailAddress - email address of the user.
Throws:
java.lang.Exception - If something unexpected happens (i.e the user with given username already exists).

updateUser

void updateUser(java.lang.String username,
                java.lang.String firstName,
                java.lang.String lastName,
                java.lang.String emailAddress)
                throws java.lang.Exception
Allows administrator to update data about user.

Parameters:
username - username used to uniquely identify user - this parameter is mandatory.
firstName - the user's first name.
lastName - the user's last name.
emailAddress - email address of the user.
Throws:
java.lang.Exception - If something unexpected happens (i.e the user with given username does not exist).

removeUser

void removeUser(java.lang.String username)
                throws java.lang.Exception
Allows administrator to remove the user.

Parameters:
username - username used to uniquely identify user.
Throws:
java.lang.Exception - If something unexpected happens (i.e the user with given username does not exist, or this is a user that can't be removed).

setPassword

void setPassword(java.lang.String username,
                 java.lang.String password)
                 throws java.lang.Exception
Sets user password.

Parameters:
username - username of the shark user.
password - new password of the shark user.
Throws:
java.lang.Exception - If something unexpected happens.