fr.cnes.sitools.security
Class UsersAndGroupsStoreXML

java.lang.Object
  extended by fr.cnes.sitools.security.UsersAndGroupsStoreXML
All Implemented Interfaces:
UsersAndGroupsStore

public final class UsersAndGroupsStoreXML
extends java.lang.Object
implements UsersAndGroupsStore

Users and Groups XML storage

Author:
AKKA Technologies

Constructor Summary
UsersAndGroupsStoreXML()
           
 
Method Summary
 Group createGroup(Group bean)
          Creates a new Group
 User createUser(User bean)
          Method for creating users
 boolean deleteGroup(java.lang.String name)
          Deletes a group
 boolean deleteUser(java.lang.String identifier)
          Method for deleting a user
 Group getGroupById(java.lang.String name)
          getGroupById : Gets group by its id (name)
 java.util.List<Group> getGroups()
          Gets all groups
 java.util.List<Group> getGroups(int start, int limit, java.lang.String query)
          getGroups
 java.util.ArrayList<Group> getGroups(ResourceCollectionFilter filter)
          Gets groups according to the generic filter
 java.util.List<Group> getGroupsByUser(java.lang.String identifier)
          getGroupsByUser Gets groups which contain specified user
 java.util.List<Group> getGroupsByUser(java.lang.String identifier, ResourceCollectionFilter filter)
          getGroupsByUser Gets groups which contains a user according to the specified filter
 java.lang.String getName()
          Store name
 User getUserById(java.lang.String identifier)
          Gets one user by identifier
 java.util.List<User> getUsers()
          Gets complete list of users
 java.util.List<User> getUsers(int start, int limit, java.lang.String query)
          Gets users according to the pagination and query
 java.util.List<User> getUsers(ResourceCollectionFilter filter)
          Gets filtered list of users
 java.util.List<User> getUsersByGroup(java.lang.String name)
          Gets user for a group
 java.util.List<User> getUsersByGroup(java.lang.String name, ResourceCollectionFilter filter)
          Gets users of a group according to the filter
 boolean isGroupModifiable()
          Can modify Groups (C U D)
 boolean isUserModifiable()
          Can modify Users (C U D)
 Group updateGroup(Group bean)
          Updates a Group
 Group updateGroupUsers(Group bean)
          Update users associated with a group
 User updateUser(User bean)
          Method for updating user
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsersAndGroupsStoreXML

public UsersAndGroupsStoreXML()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: UsersAndGroupsStore
Store name

Specified by:
getName in interface UsersAndGroupsStore
Returns:
Store name

getUsers

public java.util.List<User> getUsers()
                              throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Gets complete list of users

Specified by:
getUsers in interface UsersAndGroupsStore
Returns:
ArrayList
Throws:
SitoolsException - if problem

getUsers

public java.util.List<User> getUsers(ResourceCollectionFilter filter)
                              throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Gets filtered list of users

Specified by:
getUsers in interface UsersAndGroupsStore
Parameters:
filter - criteria (pagination, ...)
Returns:
ArrayList
Throws:
SitoolsException - if problem

getUsersByGroup

public java.util.List<User> getUsersByGroup(java.lang.String name)
                                     throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Gets user for a group

Specified by:
getUsersByGroup in interface UsersAndGroupsStore
Parameters:
name - Group name
Returns:
ArrayList
Throws:
SitoolsException - if problem

getUsersByGroup

public java.util.List<User> getUsersByGroup(java.lang.String name,
                                            ResourceCollectionFilter filter)
                                     throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Gets users of a group according to the filter

Specified by:
getUsersByGroup in interface UsersAndGroupsStore
Parameters:
name - Group name
filter - Generic filter (pagination, query)
Returns:
ArrayList
Throws:
SitoolsException - if problem

getUsers

public java.util.List<User> getUsers(int start,
                                     int limit,
                                     java.lang.String query)
                              throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Gets users according to the pagination and query

Specified by:
getUsers in interface UsersAndGroupsStore
Parameters:
start - pagination start index
limit - pagination number of items
query - filtering user
Returns:
ArrayList
Throws:
SitoolsException - if problem

getUserById

public User getUserById(java.lang.String identifier)
                 throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Gets one user by identifier

Specified by:
getUserById in interface UsersAndGroupsStore
Parameters:
identifier - User identifier
Returns:
User
Throws:
SitoolsException - if problem

createUser

public User createUser(User bean)
                throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Method for creating users

Specified by:
createUser in interface UsersAndGroupsStore
Parameters:
bean - User
Returns:
User
Throws:
SitoolsException - if problem

updateUser

public User updateUser(User bean)
                throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Method for updating user

Specified by:
updateUser in interface UsersAndGroupsStore
Parameters:
bean - User
Returns:
User
Throws:
SitoolsException - if problem

deleteUser

public boolean deleteUser(java.lang.String identifier)
                   throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Method for deleting a user

Specified by:
deleteUser in interface UsersAndGroupsStore
Parameters:
identifier - user identifier
Returns:
boolean true if deleted
Throws:
SitoolsException - if problem

getGroups

public java.util.List<Group> getGroups()
                                throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Gets all groups

Specified by:
getGroups in interface UsersAndGroupsStore
Returns:
ArrayList
Throws:
SitoolsException - if problem

getGroups

public java.util.ArrayList<Group> getGroups(ResourceCollectionFilter filter)
                                     throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Gets groups according to the generic filter

Specified by:
getGroups in interface UsersAndGroupsStore
Parameters:
filter - Generic filter (pagination, query)
Returns:
ArrayList
Throws:
SitoolsException - if problem

getGroupsByUser

public java.util.List<Group> getGroupsByUser(java.lang.String identifier)
                                      throws SitoolsException
Description copied from interface: UsersAndGroupsStore
getGroupsByUser Gets groups which contain specified user

Specified by:
getGroupsByUser in interface UsersAndGroupsStore
Parameters:
identifier - User identifier
Returns:
ArrayList
Throws:
SitoolsException - if problem

getGroupsByUser

public java.util.List<Group> getGroupsByUser(java.lang.String identifier,
                                             ResourceCollectionFilter filter)
                                      throws SitoolsException
Description copied from interface: UsersAndGroupsStore
getGroupsByUser Gets groups which contains a user according to the specified filter

Specified by:
getGroupsByUser in interface UsersAndGroupsStore
Parameters:
identifier - User identifier
filter - Generic filter (pagination, query)
Returns:
ArrayList
Throws:
SitoolsException - if problem

getGroups

public java.util.List<Group> getGroups(int start,
                                       int limit,
                                       java.lang.String query)
                                throws SitoolsException
Description copied from interface: UsersAndGroupsStore
getGroups

Specified by:
getGroups in interface UsersAndGroupsStore
Parameters:
start - index of first item
limit - number max of items
query - LIKE String refer to Group name
Returns:
ArrayList
Throws:
SitoolsException - if problem

getGroupById

public Group getGroupById(java.lang.String name)
                   throws SitoolsException
Description copied from interface: UsersAndGroupsStore
getGroupById : Gets group by its id (name)

Specified by:
getGroupById in interface UsersAndGroupsStore
Parameters:
name - Group name
Returns:
Group
Throws:
SitoolsException - if problem

createGroup

public Group createGroup(Group bean)
                  throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Creates a new Group

Specified by:
createGroup in interface UsersAndGroupsStore
Parameters:
bean - input
Returns:
Group
Throws:
SitoolsException - if problem

updateGroup

public Group updateGroup(Group bean)
                  throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Updates a Group

Specified by:
updateGroup in interface UsersAndGroupsStore
Parameters:
bean - Group
Returns:
updated Group
Throws:
SitoolsException - if problem

deleteGroup

public boolean deleteGroup(java.lang.String name)
                    throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Deletes a group

Specified by:
deleteGroup in interface UsersAndGroupsStore
Parameters:
name - Groups name
Returns:
true if deleted
Throws:
SitoolsException - if problem

updateGroupUsers

public Group updateGroupUsers(Group bean)
                       throws SitoolsException
Description copied from interface: UsersAndGroupsStore
Update users associated with a group

Specified by:
updateGroupUsers in interface UsersAndGroupsStore
Parameters:
bean - Group
Returns:
updated Group
Throws:
SitoolsException - if problem

isUserModifiable

public boolean isUserModifiable()
Description copied from interface: UsersAndGroupsStore
Can modify Users (C U D)

Specified by:
isUserModifiable in interface UsersAndGroupsStore
Returns:
boolean

isGroupModifiable

public boolean isGroupModifiable()
Description copied from interface: UsersAndGroupsStore
Can modify Groups (C U D)

Specified by:
isGroupModifiable in interface UsersAndGroupsStore
Returns:
boolean


Copyright © 2010-2013 CNES. All Rights Reserved.