public class Authorization extends Object
Access to a resource can be controlled via WebAccessControl, an RDF-based access control system. A resource can define an ACL resource via the Link header, using rel=acl. It can also point to an ACL resource using a triple in the resource's own RDF graph via acl:accessControl. Absent an acl:accessControl triple, the parent resource is checked, up to the server's root resource.
An ACL resource may contain multiple acl:Authorization sections. In an LDP context, this may be represented with ldp:contains triples. Another common pattern is to refer to the acl:Authorization sections with blank nodes.
Constructor and Description |
---|
Authorization(BlankNodeOrIRI identifier,
Graph graph)
Create an Authorization object from an RDF graph.
|
Modifier and Type | Method and Description |
---|---|
static Authorization |
from(BlankNodeOrIRI identifier,
Graph graph)
Create an Authorization object from a graph and an identifier.
|
Set<IRI> |
getAccessTo()
Retrieve the resource identifiers to which this Authorization applies.
|
Set<IRI> |
getAgent()
Retrieve the agents that are associated with this Authorization.
|
Set<IRI> |
getAgentClass()
Retrieve the agent classes that are associated with this Authorization.
|
Set<IRI> |
getAgentGroup()
Retrieve the agent groups that are associated with this Authorization.
|
Set<IRI> |
getDefault()
Retrieve the directories for which this authorization is used for new resources in the container.
|
BlankNodeOrIRI |
getIdentifier()
Retrieve the identifier for this Authorization.
|
Set<IRI> |
getMode()
Retrieve the access modes that are associated with this Authorization.
|
public Authorization(BlankNodeOrIRI identifier, Graph graph)
identifier
- the subject IRIgraph
- the RDF graphpublic static Authorization from(BlankNodeOrIRI identifier, Graph graph)
identifier
- the identifiergraph
- the graphpublic BlankNodeOrIRI getIdentifier()
public Set<IRI> getAgent()
public Set<IRI> getAgentClass()
public Set<IRI> getAgentGroup()
public Set<IRI> getMode()
public Set<IRI> getAccessTo()