public class JdbcAclService extends Object implements AclService
AclService
.Requires the "dirty" flags in AclImpl
and AccessControlEntryImpl
to be set,
so that the implementation can detect changed parameters easily.
Modifier and Type | Field and Description |
---|---|
protected org.springframework.jdbc.core.JdbcTemplate |
jdbcTemplate |
protected static org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
JdbcAclService(DataSource dataSource,
LookupStrategy lookupStrategy) |
Modifier and Type | Method and Description |
---|---|
ObjectIdentity[] |
findChildren(ObjectIdentity parentIdentity)
Locates all object identities that use the specified parent.
|
Acl |
readAclById(ObjectIdentity object)
Same as
AclService.readAclsById(ObjectIdentity[]) except it returns only a single Acl. |
Acl |
readAclById(ObjectIdentity object,
Sid[] sids)
Same as
AclService.readAclsById(ObjectIdentity[], Sid[]) except it returns only a single Acl. |
Map |
readAclsById(ObjectIdentity[] objects)
Obtains all the
Acl s that apply for the passed Object s. |
Map |
readAclsById(ObjectIdentity[] objects,
Sid[] sids)
Obtains all the
Acl s that apply for the passed Object s, but only for the
security identifies passed. |
protected static final org.apache.commons.logging.Log log
protected org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
public JdbcAclService(DataSource dataSource, LookupStrategy lookupStrategy)
public ObjectIdentity[] findChildren(ObjectIdentity parentIdentity)
AclService
findChildren
in interface AclService
parentIdentity
- to locate children ofnull
if none were found)public Acl readAclById(ObjectIdentity object, Sid[] sids) throws NotFoundException
AclService
AclService.readAclsById(ObjectIdentity[], Sid[])
except it returns only a single Acl.readAclById
in interface AclService
object
- DOCUMENT ME!sids
- DOCUMENT ME!NotFoundException
- DOCUMENT ME!public Acl readAclById(ObjectIdentity object) throws NotFoundException
AclService
AclService.readAclsById(ObjectIdentity[])
except it returns only a single Acl.This method
should not be called as it does not leverage the underlaying implementation's potential ability to filter
Acl
entries based on a Sid
parameter.
readAclById
in interface AclService
object
- DOCUMENT ME!NotFoundException
- DOCUMENT ME!public Map readAclsById(ObjectIdentity[] objects)
AclService
Acl
s that apply for the passed Object
s.The returned map is
keyed on the passed objects, with the values being the Acl
instances. Any unknown objects will not
have a map key.
readAclsById
in interface AclService
objects
- the objects to find ACL information fornull
)public Map readAclsById(ObjectIdentity[] objects, Sid[] sids) throws NotFoundException
AclService
Acl
s that apply for the passed Object
s, but only for the
security identifies passed.Implementations MAY provide a subset of the ACLs via this method although this is NOT a requirement. This is intended to allow performance optimisations within implementations. Callers should therefore use this method in preference to the alternative overloaded version which does not have performance optimisation opportunities.
The returned map is keyed on the passed objects, with the values being the Acl
instances. Any unknown objects (or objects for which the interested Sid
s do not have entries) will
not have a map key.
readAclsById
in interface AclService
objects
- the objects to find ACL information forsids
- the security identities for which ACL information is required (may be null
to denote
all entries)null
)NotFoundException
- DOCUMENT ME!Copyright © 2015. All rights reserved.