Class SecuredResourceImpl
java.lang.Object
org.apache.jena.permissions.impl.SecuredItemImpl
org.apache.jena.permissions.model.impl.SecuredRDFNodeImpl
org.apache.jena.permissions.model.impl.SecuredResourceImpl
- All Implemented Interfaces:
FrontsNode
,SecuredRDFNode
,SecuredResource
,SecuredItem
,RDFNode
,Resource
- Direct Known Subclasses:
SecuredContainerImpl
,SecuredPropertyImpl
,SecuredRDFListImpl
,SecuredReifiedStatementImpl
Implementation of SecuredResource to be used by a SecuredItemInvoker proxy.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jena.permissions.SecuredItem
SecuredItem.Util
-
Field Summary
Fields inherited from class org.apache.jena.permissions.impl.SecuredItemImpl
CACHE, COUNT, MAX_CACHE
-
Method Summary
Modifier and TypeMethodDescriptionabort()
Abort the transaction in the associated securedModel.addLiteral
(Property p, boolean o) addLiteral
(Property p, char o) addLiteral
(Property value, double d) addLiteral
(Property value, float d) addLiteral
(Property p, long o) addLiteral
(Property p, Object o) addLiteral
(Property p, Literal o) addProperty
(Property p, String o) addProperty
(Property p, String o, String l) addProperty
(Property p, String lexicalForm, RDFDatatype datatype) addProperty
(Property p, RDFNode o) begin()
boolean
commit()
getId()
static SecuredResource
getInstance
(SecuredModel securedModel, Resource resource) Get a SecuredResource.getProperty
(Property p, String lang) getRequiredProperty
(Property p, String lang) getURI()
boolean
hasLiteral
(Property p, boolean o) boolean
hasLiteral
(Property p, char o) boolean
hasLiteral
(Property p, double o) boolean
hasLiteral
(Property p, float o) boolean
hasLiteral
(Property p, long o) boolean
hasLiteral
(Property p, Object o) boolean
boolean
hasProperty
(Property p, String o) boolean
hasProperty
(Property p, String o, String l) boolean
hasProperty
(Property p, RDFNode o) boolean
listProperties
(Property p, String lang) visitWith
(RDFVisitor rv) Methods inherited from class org.apache.jena.permissions.model.impl.SecuredRDFNodeImpl
as, asNode, canAs, equals, getInstance, getModel, hashCode, isAnon, isLiteral, isResource, isStmtResource, isURIResource
Methods inherited from class org.apache.jena.permissions.impl.SecuredItemImpl
canCreate, canCreate, canCreate, canDelete, canDelete, canDelete, canRead, canRead, canRead, canUpdate, canUpdate, canUpdate, decrementUse, getBaseItem, getModelIRI, getModelNode, getSecurityEvaluator, incrementUse, isEquivalent, toString
Methods inherited from interface org.apache.jena.graph.FrontsNode
asNode
Methods inherited from interface org.apache.jena.rdf.model.RDFNode
as, canAs, getModel, isAnon, isLiteral, isResource, isStmtResource, isURIResource
Methods inherited from interface org.apache.jena.permissions.SecuredItem
canCreate, canCreate, canCreate, canDelete, canDelete, canDelete, canRead, canRead, canRead, canUpdate, canUpdate, canUpdate, equals, getBaseItem, getModelIRI, getModelNode, getSecurityEvaluator, isEquivalent
-
Method Details
-
getInstance
Get a SecuredResource.- Parameters:
securedModel
- the securedItem that provides the security context.resource
- The resource to secure.- Returns:
- The SecuredResource
-
abort
Abort the transaction in the associated securedModel. -
addLiteral
public SecuredResource addLiteral(Property p, boolean o) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException - Specified by:
addLiteral
in interfaceResource
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Update
- Required triple permissions:
- Create (this, p, o )
-
addLiteral
public SecuredResource addLiteral(Property p, char o) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException - Specified by:
addLiteral
in interfaceResource
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Update
- Required triple permissions:
- Create (this, p, o )
-
addLiteral
public SecuredResource addLiteral(Property value, double d) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException - Specified by:
addLiteral
in interfaceResource
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Update
- Required triple permissions:
- Create (this, p, o )
-
addLiteral
public SecuredResource addLiteral(Property value, float d) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException - Specified by:
addLiteral
in interfaceResource
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Update
- Required triple permissions:
- Create (this, p, o )
-
addLiteral
public SecuredResource addLiteral(Property p, Literal o) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException - Specified by:
addLiteral
in interfaceResource
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Update
- Required triple permissions:
- Create (this, p, o )
-
addLiteral
public SecuredResource addLiteral(Property p, long o) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException - Specified by:
addLiteral
in interfaceResource
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Update
- Required triple permissions:
- Create (this, p, o )
-
addLiteral
public SecuredResource addLiteral(Property p, Object o) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException - Specified by:
addLiteral
in interfaceResource
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Update
- Required triple permissions:
- Create (this, p, o )
-
addProperty
public SecuredResource addProperty(Property p, RDFNode o) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException - Specified by:
addProperty
in interfaceResource
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Update
- Required triple permissions:
- Create (this, p, o )
-
addProperty
public SecuredResource addProperty(Property p, String o) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException - Specified by:
addProperty
in interfaceResource
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Update
- Required triple permissions:
- Create (this, p, o )
-
addProperty
public SecuredResource addProperty(Property p, String lexicalForm, RDFDatatype datatype) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException - Specified by:
addProperty
in interfaceResource
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Update
- Required triple permissions:
- Create (this, p, o )
-
addProperty
public SecuredResource addProperty(Property p, String o, String l) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException - Specified by:
addProperty
in interfaceResource
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Update
- Required triple permissions:
- Create (this, p, o )
-
asLiteral
- Specified by:
asLiteral
in interfaceRDFNode
- Throws:
UpdateDeniedException
AddDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
-
asResource
- Specified by:
asResource
in interfaceRDFNode
-
begin
-
canReadProperty
- Parameters:
p
- The property to test.- Returns:
- true if p can be read as a property with an ANY value.
- Throws:
AuthenticationRequiredException
- Required graph permissions:
- Read
- Required triple permissions:
- Read( this, p, ANY );
-
commit
-
getId
- Specified by:
getId
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
-
getLocalName
- Specified by:
getLocalName
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
-
getNameSpace
- Specified by:
getNameSpace
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
-
getProperty
public SecuredStatement getProperty(Property p) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
getProperty
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access thennull
is returned.
-
getProperty
public SecuredStatement getProperty(Property p, String lang) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
getProperty
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access thennull
is returned.
-
getPropertyResourceValue
- Specified by:
getPropertyResourceValue
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access thennull
is returned.
-
getRequiredProperty
public SecuredStatement getRequiredProperty(Property p) throws PropertyNotFoundException, ReadDeniedException, AuthenticationRequiredException - Specified by:
getRequiredProperty
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.PropertyNotFoundException
- Required graph permissions:
- Read
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then PropertyNotFoundException is thrown.
-
getRequiredProperty
public SecuredStatement getRequiredProperty(Property p, String lang) throws PropertyNotFoundException, ReadDeniedException, AuthenticationRequiredException - Specified by:
getRequiredProperty
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.PropertyNotFoundException
- Required graph permissions:
- Read
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then PropertyNotFoundException is thrown.
-
getURI
- Specified by:
getURI
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
-
getStmtTerm
- Specified by:
getStmtTerm
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then @{code null} is returned.
-
hasLiteral
public boolean hasLiteral(Property p, boolean o) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
hasLiteral
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read SecTriple(this,p,o)
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then @{code false} is returned.
-
hasLiteral
public boolean hasLiteral(Property p, char o) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
hasLiteral
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read SecTriple(this,p,o)
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then @{code false} is returned.
-
hasLiteral
public boolean hasLiteral(Property p, double o) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
hasLiteral
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read SecTriple(this,p,o)
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then @{code false} is returned.
-
hasLiteral
public boolean hasLiteral(Property p, float o) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
hasLiteral
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read SecTriple(this,p,o)
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then @{code false} is returned.
-
hasLiteral
public boolean hasLiteral(Property p, long o) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
hasLiteral
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read SecTriple(this,p,o)
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then @{code false} is returned.
-
hasLiteral
public boolean hasLiteral(Property p, Object o) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
hasLiteral
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read SecTriple(this,p,o)
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then @{code false} is returned.
-
hasProperty
- Specified by:
hasProperty
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read SecTriple(this,p,o)
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then @{code false} is returned.
-
hasProperty
public boolean hasProperty(Property p, RDFNode o) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
hasProperty
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read SecTriple(this,p,o)
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then @{code false} is returned.
-
hasProperty
public boolean hasProperty(Property p, String o) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
hasProperty
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read SecTriple(this,p,o)
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then @{code false} is returned.
-
hasProperty
public boolean hasProperty(Property p, String o, String l) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
hasProperty
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read SecTriple(this,p,o)
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then @{code false} is returned.
-
hasURI
- Specified by:
hasURI
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
-
inModel
- Specified by:
inModel
in interfaceRDFNode
- Specified by:
inModel
in interfaceResource
- Overrides:
inModel
in classSecuredRDFNodeImpl
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
-
listProperties
public SecuredStatementIterator listProperties() throws ReadDeniedException, AuthenticationRequiredException- Specified by:
listProperties
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read on returned Statements
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then an empty iterator is returned.
-
listProperties
public SecuredStatementIterator listProperties(Property p) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
listProperties
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read on returned Statements
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then an empty iterator is returned.
-
listProperties
public SecuredStatementIterator listProperties(Property p, String lang) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
listProperties
in interfaceResource
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
- Required triple permissions:
- Read on returned Statements
if
SecurityEvaluator.isHardReadError()
is true and the user does not have read access then an empty iterator is returned.
-
removeAll
public SecuredResource removeAll(Property p) throws ReadDeniedException, AuthenticationRequiredException - Specified by:
removeAll
in interfaceResource
- Throws:
UpdateDeniedException
DeleteDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
- Required graph permissions:
- Update
- Required triple permissions:
- Delete on associated Statements
-
removeProperties
public SecuredResource removeProperties() throws ReadDeniedException, AuthenticationRequiredException- Specified by:
removeProperties
in interfaceResource
- Throws:
UpdateDeniedException
DeleteDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
- Required graph permissions:
- Update
- Required triple permissions:
- Delete on associated Statements
-
visitWith
-