|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Authorizable
The Authorizable is the common base interface for User
and
Group
. It provides access to the Principal
s associated
with an Authorizable
(see below) and allow to access and
modify additional properties such as e.g. full name, e-mail or address.
Authorizable
and
Principal
:Authorizable
is repository object that is neither associated
with nor depending from a particular Session
and thus independant
of the login mechanisms creating Session
s.Principal
s are representations of user
identities. In other words: each Principal
within the set
associated with the Session's Subject upon login represents an identity for
that user. An the set of Principal
s may differ between different
login mechanisms.getPrincipal()
and getPrincipals()
).
The interfaces derived from Authorizable are defined as follows:
User
: defined to be an authorizable that can be authenticated
(by using Credentials) and impersonated.Group
: defined to be a collection of other
Authorizable
s.
User
,
Group
Method Summary | |
---|---|
boolean |
addReferee(Principal principal)
Add the given Principal to this Authorizable. |
Iterator |
declaredMemberOf()
|
String |
getID()
Return the implementation specific identifer for this Authorizable . |
Principal |
getPrincipal()
|
PrincipalIterator |
getPrincipals()
|
javax.jcr.Value[] |
getProperty(String name)
Returns the values for the properties with the specified name or null . |
Iterator |
getPropertyNames()
Returns the names of properties present with this Authorizable. |
boolean |
hasProperty(String name)
Tests if a the property with specified name exists. |
boolean |
isGroup()
|
Iterator |
memberOf()
|
void |
remove()
Removes this Authorizable , if the session has sufficient
permissions. |
boolean |
removeProperty(String name)
Removes the property with the given name. |
boolean |
removeReferee(Principal principal)
Remove the specified Principal for the referees of this Authorizable. |
void |
setProperty(String name,
javax.jcr.Value value)
Set an arbitrary property to this Authorizable . |
void |
setProperty(String name,
javax.jcr.Value[] value)
Set an arbitrary property to this Authorizable . |
Method Detail |
---|
String getID() throws javax.jcr.RepositoryException
Authorizable
. It could e.g. be a UserID or simply the
principal name.
Authorizable
.
javax.jcr.RepositoryException
- if an error occurs.boolean isGroup()
Group
Principal getPrincipal() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
- If an error occurs.boolean addReferee(Principal principal) throws AuthorizableExistsException, javax.jcr.RepositoryException
AuthorizableExistsException
is thrown.
principal
-
javax.jcr.RepositoryException
AuthorizableExistsException
boolean removeReferee(Principal principal) throws javax.jcr.RepositoryException
principal
-
javax.jcr.RepositoryException
PrincipalIterator getPrincipals() throws javax.jcr.RepositoryException
getPrincipal()
).
javax.jcr.RepositoryException
Iterator declaredMemberOf() throws javax.jcr.RepositoryException
Group
s, this Authorizable is declared member of.
javax.jcr.RepositoryException
Iterator memberOf() throws javax.jcr.RepositoryException
Group
s, this Authorizable is member of included
indirect group membership.
javax.jcr.RepositoryException
void remove() throws javax.jcr.RepositoryException
Authorizable
, if the session has sufficient
permissions. Note, that removing an Authorizable
even
if it listed as member of a Group or if still has members (this is
a Group itself).
javax.jcr.RepositoryException
- If an error occured and the
Authorizable
could not be removed.Iterator getPropertyNames() throws javax.jcr.RepositoryException
this
Authorizable.
javax.jcr.RepositoryException
- If an error occurs.getProperty(String)
,
hasProperty(String)
boolean hasProperty(String name) throws javax.jcr.RepositoryException
name
-
javax.jcr.RepositoryException
getProperty(String)
void setProperty(String name, javax.jcr.Value value) throws javax.jcr.RepositoryException
Authorizable
.
name
- value
-
javax.jcr.RepositoryException
- If the specified property could not be set.void setProperty(String name, javax.jcr.Value[] value) throws javax.jcr.RepositoryException
Authorizable
.
name
- value
- multiple values
javax.jcr.RepositoryException
- If the specified property could not be set.javax.jcr.Value[] getProperty(String name) throws javax.jcr.RepositoryException
null
.
name
-
null
if no such property exists.
javax.jcr.RepositoryException
- If an error occurs.boolean removeProperty(String name) throws javax.jcr.RepositoryException
name
-
javax.jcr.RepositoryException
- If an error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |