|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An eXist-specific service which provides methods to manage users and permissions.
Method Summary | |
void |
addUser(User user)
Add a new user to the database |
void |
chmod(int mode)
|
void |
chmod(Resource resource,
int mode)
Change permissions for the specified resource. |
void |
chmod(Resource resource,
java.lang.String modeStr)
Change permissions for the specified resource. |
void |
chmod(java.lang.String modeStr)
Change permissions for the current collection |
void |
chown(Resource res,
User u,
java.lang.String group)
Change owner and group of the specified resource. |
void |
chown(User u,
java.lang.String group)
Change owner and group of the current collection. |
java.lang.String[] |
getGroups()
Retrieve a list of all existing groups. |
java.lang.String |
getName()
Get the name of this service |
Permission |
getPermissions(Collection coll)
Get permissions for the specified collections |
Permission |
getPermissions(Resource res)
Get permissions for the specified resource |
java.lang.String |
getProperty(java.lang.String property)
Get a property defined by this service. |
User |
getUser(java.lang.String name)
Get a user record from the database |
User[] |
getUsers()
Retrieve a list of all existing users. |
java.lang.String |
getVersion()
Get the version of this service |
java.lang.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 |
removeUser(User user)
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(java.lang.String property,
java.lang.String value)
Set a property for this service. |
void |
unlockResource(Resource res)
Unlock the specified resource. |
void |
updateUser(User user)
Update existing user information |
Method Detail |
public java.lang.String getName()
getName
in interface Service
public java.lang.String getVersion()
getVersion
in interface Service
public void setPermissions(Collection child, Permission perm) throws XMLDBException
child
- perm
-
XMLDBException
public void setPermissions(Resource resource, Permission perm) throws XMLDBException
resource
- perm
-
XMLDBException
public void chown(User u, java.lang.String group) throws XMLDBException
u
- Description of the Parametergroup
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic void chown(Resource res, User u, java.lang.String group) throws XMLDBException
res
- Description of the Parameteru
- Description of the Parametergroup
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic void chmod(Resource resource, java.lang.String modeStr) throws XMLDBException
[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.
resource
- Description of the ParametermodeStr
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic void chmod(java.lang.String modeStr) throws XMLDBException
modeStr
- String describing the permissions to
grant or deny.
XMLDBException
public void chmod(int mode) throws XMLDBException
XMLDBException
public void chmod(Resource resource, int mode) throws XMLDBException
XMLDBException
public void lockResource(Resource res, User u) throws XMLDBException
res
- u
-
XMLDBException
public java.lang.String hasUserLock(Resource res) throws XMLDBException
res
-
XMLDBException
public void unlockResource(Resource res) throws XMLDBException
res
-
XMLDBException
public void addUser(User user) throws XMLDBException
user
- The feature to be added to the User attribute
XMLDBException
- Description of the Exceptionpublic void updateUser(User user) throws XMLDBException
user
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic User getUser(java.lang.String name) throws XMLDBException
name
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic User[] getUsers() throws XMLDBException
XMLDBException
- Description of the Exceptionpublic java.lang.String[] getGroups() throws XMLDBException
XMLDBException
public java.lang.String getProperty(java.lang.String property) throws XMLDBException
getProperty
in interface Configurable
property
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic void setProperty(java.lang.String property, java.lang.String value) throws XMLDBException
setProperty
in interface Configurable
property
- The new property valuevalue
- The new property value
XMLDBException
- Description of the Exceptionpublic void setCollection(Collection collection) throws XMLDBException
setCollection
in interface Service
collection
- The new collection value
XMLDBException
- Description of the Exceptionpublic Permission getPermissions(Collection coll) throws XMLDBException
coll
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic Permission getPermissions(Resource res) throws XMLDBException
res
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic Permission[] listResourcePermissions() throws XMLDBException
XMLDBException
public Permission[] listCollectionPermissions() throws XMLDBException
XMLDBException
public void removeUser(User user) throws XMLDBException
user
-
XMLDBException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |