|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eaglei.repository.model.ImmutableObjectModel
org.eaglei.repository.model.WritableObjectModel
org.eaglei.repository.model.Role
@HasContentCache public final class Role
Role object model, reflects the :Role object in RDF database. A role represents an entity that can be granted privileges in the access control system. Users who are members of a Role get all its grants. Roles are "flat" objects, i.e. there is NO hierarchy of Roles -- although it would be convenient, it is too difficult to implement given the current inferencing support available in the RDF database. Named Graph usage: Role looks for statements in ALL graphs, although they should really only be found in the :NG_Internal graph.
| Field Summary | |
|---|---|
static java.lang.String |
ROLE_QUERY
SPARQL query to get role descriptions, works on both internal repo graph and exports. |
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o)
|
static Role |
create(javax.servlet.http.HttpServletRequest request,
org.openrdf.model.URI asubject,
java.lang.String label,
java.lang.String comment,
boolean aimplicit)
Make a new Role |
static void |
decache()
Invalidate the role cache, called when RDF has changed. |
void |
decacheInstance()
any decache of an instance should decache global map too. |
void |
delete(javax.servlet.http.HttpServletRequest request)
destroy a role |
boolean |
equals(java.lang.Object other)
|
static Role |
find(javax.servlet.http.HttpServletRequest request,
org.openrdf.model.URI uri)
Get the Role for given URI, lookup label. |
static java.util.List<Role> |
findAll(javax.servlet.http.HttpServletRequest request)
Get all known Roles - includes pseudo-Roles Anonymous and Authenticated that should NOT be directly assigned to Users. |
static java.util.List<Role> |
findAllGrantable(javax.servlet.http.HttpServletRequest request)
Get all Roles that can be granted in a :has___Access statement. |
static java.util.List<Role> |
findAllUserRoles(javax.servlet.http.HttpServletRequest request)
Get all Roles that ought to be assigned to users - EXCLUDES "implicit" pseudo-Roles Anonymous and Authenticated. |
java.lang.String |
getComment()
Getter for the field comment. |
java.lang.String |
getLabel()
Getter for the field label. |
org.openrdf.model.URI |
getURI()
getURI |
int |
hashCode()
|
boolean |
isBuiltin()
predicate - is this one of the permanent builtin roles? |
boolean |
isImplicit()
predicate - value of implicit |
boolean |
isSuperuser()
isSuperuser |
void |
setComment(javax.servlet.http.HttpServletRequest request,
java.lang.String newVal)
Setter for the field comment. |
void |
setLabel(javax.servlet.http.HttpServletRequest request,
java.lang.String label)
Setter for the field label. |
java.lang.String |
toString()
toString |
| Methods inherited from class org.eaglei.repository.model.WritableObjectModel |
|---|
commit, isDirty, setDirty, update |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ROLE_QUERY
| Method Detail |
|---|
public static Role find(javax.servlet.http.HttpServletRequest request,
org.openrdf.model.URI uri)
throws javax.servlet.ServletException
request - a HttpServletRequest object.uri - URI of the role
org.eaglei.repository.Role object representing role.
javax.servlet.ServletException - if any.
public static java.util.List<Role> findAll(javax.servlet.http.HttpServletRequest request)
throws javax.servlet.ServletException
request - a HttpServletRequest object.
Iterable object.
javax.servlet.ServletException - if any.
public static java.util.List<Role> findAllGrantable(javax.servlet.http.HttpServletRequest request)
throws javax.servlet.ServletException
request - a HttpServletRequest object.
Iterable object.
javax.servlet.ServletException - if any.
public static java.util.List<Role> findAllUserRoles(javax.servlet.http.HttpServletRequest request)
throws javax.servlet.ServletException
request - a HttpServletRequest object.
Iterable object.
javax.servlet.ServletException - if any.public static void decache()
public void decacheInstance()
decacheInstance in class WritableObjectModelpublic org.openrdf.model.URI getURI()
getURI
getURI in class ImmutableObjectModelURI object.public boolean isSuperuser()
isSuperuser
predicate that answers whether this role confers Administrator privileges, an attempt at preserving modularity.
public java.lang.String getLabel()
Getter for the field label.
getLabel in class ImmutableObjectModelString object.public java.lang.String getComment()
Getter for the field comment.
String object, MIGHT be null.public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString
toString in class java.lang.ObjectString object.public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic boolean isBuiltin()
public boolean isImplicit()
public static Role create(javax.servlet.http.HttpServletRequest request,
org.openrdf.model.URI asubject,
java.lang.String label,
java.lang.String comment,
boolean aimplicit)
throws javax.servlet.ServletException
Make a new Role
at a specific URI (assumes it is not already the subject of any existing statements). If uri == null, a new URI is allocated.
request - a HttpServletRequest object.label - short name for role, SHOULD be non-nullcomment - longer description of role, may be null
javax.servlet.ServletException - if any.
public void delete(javax.servlet.http.HttpServletRequest request)
throws javax.servlet.ServletException
javax.servlet.ServletException
public void setLabel(javax.servlet.http.HttpServletRequest request,
java.lang.String label)
throws javax.servlet.ServletException
Setter for the field label.
request - a HttpServletRequest object.label - a new label value
javax.servlet.ServletException - if any.
public void setComment(javax.servlet.http.HttpServletRequest request,
java.lang.String newVal)
throws javax.servlet.ServletException
Setter for the field comment.
request - a HttpServletRequest object.newVal - a new comment value
javax.servlet.ServletException - if any.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||