|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.xmldb.LocalUserManagementService
public class LocalUserManagementService
Modified by {Marco.Tampucci, Massimo.Martinelli} @isti.cnr.it
Constructor Summary | |
---|---|
LocalUserManagementService(User user,
BrokerPool pool,
LocalCollection collection)
|
Method Summary | |
---|---|
void |
addUser(User u)
Add a new user to the database |
void |
addUserGroup(User user)
Update the specified user without update user's password Method added by {Marco.Tampucci, Massimo.Martinelli} @isti.cnr.it |
void |
chmod(int mode)
|
void |
chmod(Resource resource,
int mode)
Change permissions for the specified resource. |
void |
chmod(Resource resource,
String modeStr)
Change permissions for the specified resource. |
void |
chmod(String modeStr)
Change permissions for the current collection |
void |
chown(Resource res,
User u,
String group)
Change owner and group of the specified resource. |
void |
chown(User u,
String group)
Change owner and group of the current collection. |
String[] |
getGroups()
Retrieve a list of all existing groups. |
String |
getName()
Get the name of this service |
Permission |
getPermissions(Collection coll)
Get permissions for the specified collections |
Permission |
getPermissions(Resource resource)
Get permissions for the specified resource |
String |
getProperty(String property)
Get a property defined by this service. |
User |
getUser(String name)
Get a user record from the database |
User[] |
getUsers()
Retrieve a list of all existing users. |
String |
getVersion()
Get the version of this service |
String |
hasUserLock(Resource res)
Check if the resource has a user lock. |
Permission[] |
listCollectionPermissions()
Get permissions for all child collections contained in the current collection. |
Permission[] |
listResourcePermissions()
Get permissions for all resources contained in the current collection. |
void |
lockResource(Resource res,
User u)
Lock the specified resource for the specified user. |
void |
removeGroup(User user,
String rmgroup)
Update the specified user removing a group from user's group Method added by {Marco.Tampucci, Massimo.Martinelli} @isti.cnr.it |
void |
removeUser(User u)
Delete a user from the database |
void |
setCollection(Collection collection)
Set the current collection for this service |
void |
setPermissions(Collection child,
Permission perm)
Set permissions for the specified collection. |
void |
setPermissions(Resource resource,
Permission perm)
Set permissions for the specified resource. |
void |
setProperty(String property,
String value)
Set a property for this service. |
void |
unlockResource(Resource res)
Unlock the specified resource. |
void |
updateUser(User u)
Update existing user information |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalUserManagementService(User user, BrokerPool pool, LocalCollection collection)
Method Detail |
---|
public void addUser(User u) throws XMLDBException
UserManagementService
addUser
in interface UserManagementService
u
- The feature to be added to the User attribute
XMLDBException
- Description of the Exceptionpublic void setPermissions(Resource resource, Permission perm) throws XMLDBException
UserManagementService
setPermissions
in interface UserManagementService
XMLDBException
public void setPermissions(Collection child, Permission perm) throws XMLDBException
UserManagementService
setPermissions
in interface UserManagementService
XMLDBException
public void chmod(String modeStr) throws XMLDBException
UserManagementService
chmod
in interface UserManagementService
modeStr
- String describing the permissions to
grant or deny.
XMLDBException
public void chmod(Resource resource, int mode) throws XMLDBException
UserManagementService
chmod
in interface UserManagementService
XMLDBException
public void chmod(int mode) throws XMLDBException
chmod
in interface UserManagementService
XMLDBException
public void chmod(Resource resource, String modeStr) throws XMLDBException
UserManagementService
[user|group|other]=[+|-][read|write|update]For example, to grant all permissions to the group and deny everything to others: group=+write,+read,+update,other=-read The changes are applied to the permissions currently active for this resource.
chmod
in interface UserManagementService
resource
- Description of the ParametermodeStr
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic void chown(User u, String group) throws XMLDBException
UserManagementService
chown
in interface UserManagementService
u
- Description of the Parametergroup
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic void chown(Resource res, User u, String group) throws XMLDBException
UserManagementService
chown
in interface UserManagementService
res
- Description of the Parameteru
- Description of the Parametergroup
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic String hasUserLock(Resource res) throws XMLDBException
UserManagementService
hasUserLock
in interface UserManagementService
XMLDBException
public void lockResource(Resource res, User u) throws XMLDBException
UserManagementService
lockResource
in interface UserManagementService
XMLDBException
public void unlockResource(Resource res) throws XMLDBException
UserManagementService
unlockResource
in interface UserManagementService
XMLDBException
public String getName()
UserManagementService
getName
in interface UserManagementService
getName
in interface Service
public Permission getPermissions(Collection coll) throws XMLDBException
UserManagementService
getPermissions
in interface UserManagementService
coll
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic Permission getPermissions(Resource resource) throws XMLDBException
UserManagementService
getPermissions
in interface UserManagementService
resource
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic Permission[] listResourcePermissions() throws XMLDBException
UserManagementService
listResourcePermissions
in interface UserManagementService
XMLDBException
public Permission[] listCollectionPermissions() throws XMLDBException
UserManagementService
listCollectionPermissions
in interface UserManagementService
XMLDBException
public String getProperty(String property) throws XMLDBException
UserManagementService
getProperty
in interface UserManagementService
getProperty
in interface Configurable
property
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic User getUser(String name) throws XMLDBException
UserManagementService
getUser
in interface UserManagementService
name
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic User[] getUsers() throws XMLDBException
UserManagementService
getUsers
in interface UserManagementService
XMLDBException
- Description of the Exceptionpublic String[] getGroups() throws XMLDBException
UserManagementService
getGroups
in interface UserManagementService
XMLDBException
public String getVersion()
UserManagementService
getVersion
in interface UserManagementService
getVersion
in interface Service
public void removeUser(User u) throws XMLDBException
UserManagementService
removeUser
in interface UserManagementService
u
- User
XMLDBException
public void setCollection(Collection collection) throws XMLDBException
UserManagementService
setCollection
in interface UserManagementService
setCollection
in interface Service
collection
- The new collection value
XMLDBException
- Description of the Exceptionpublic void setProperty(String property, String value) throws XMLDBException
UserManagementService
setProperty
in interface UserManagementService
setProperty
in interface Configurable
property
- The new property valuevalue
- The new property value
XMLDBException
- Description of the Exceptionpublic void updateUser(User u) throws XMLDBException
UserManagementService
updateUser
in interface UserManagementService
u
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic void addUserGroup(User user) throws XMLDBException
UserManagementService
addUserGroup
in interface UserManagementService
user
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic void removeGroup(User user, String rmgroup) throws XMLDBException
UserManagementService
removeGroup
in interface UserManagementService
user
- Description of the Parameterrmgroup
- Description of group to remove
XMLDBException
- Description of the Exception
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |