public class JdbcAclService extends java.lang.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(javax.sql.DataSource dataSource,
LookupStrategy lookupStrategy) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ObjectIdentity> |
findChildren(ObjectIdentity parentIdentity)
Locates all object identities that use the specified parent.
|
protected boolean |
isAclClassIdSupported() |
Acl |
readAclById(ObjectIdentity object)
Same as
AclService.readAclsById(List) except it returns only a single Acl. |
Acl |
readAclById(ObjectIdentity object,
java.util.List<Sid> sids)
Same as
AclService.readAclsById(List, List) except it returns only a single Acl. |
java.util.Map<ObjectIdentity,Acl> |
readAclsById(java.util.List<ObjectIdentity> objects)
Obtains all the Acls that apply for the passed Objects.
|
java.util.Map<ObjectIdentity,Acl> |
readAclsById(java.util.List<ObjectIdentity> objects,
java.util.List<Sid> sids)
Obtains all the Acls that apply for the passed Objects, but only
for the security identifies passed.
|
void |
setAclClassIdSupported(boolean aclClassIdSupported) |
void |
setAclClassIdUtils(org.springframework.security.acls.jdbc.AclClassIdUtils aclClassIdUtils) |
void |
setFindChildrenQuery(java.lang.String findChildrenSql)
Allows customization of the SQL query used to find child object identities.
|
protected static final org.apache.commons.logging.Log log
protected final org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
public JdbcAclService(javax.sql.DataSource dataSource,
LookupStrategy lookupStrategy)
public java.util.List<ObjectIdentity> findChildren(ObjectIdentity parentIdentity)
AclServicefindChildren in interface AclServiceparentIdentity - to locate children ofpublic Acl readAclById(ObjectIdentity object, java.util.List<Sid> sids) throws NotFoundException
AclServiceAclService.readAclsById(List, List) except it returns only a single Acl.readAclById in interface AclServiceobject - to locate an Acl forsids - the security identities for which Acl information is required
(may be null to denote all entries)Acl for the requested ObjectIdentity (never
null)NotFoundException - if an Acl was not found for the requested
ObjectIdentitypublic Acl readAclById(ObjectIdentity object) throws NotFoundException
AclServiceAclService.readAclsById(List) except it returns only a single Acl.
This method should not be called as it does not leverage the underlying
implementation's potential ability to filter Acl entries based on a
Sid parameter.
readAclById in interface AclServiceobject - to locate an Acl forAcl for the requested ObjectIdentity (never
null)NotFoundException - if an Acl was not found for the requested
ObjectIdentitypublic java.util.Map<ObjectIdentity,Acl> readAclsById(java.util.List<ObjectIdentity> objects) throws NotFoundException
AclServiceThe 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 AclServiceobjects - the objects to find Acl information forObjectIdentity passed as an
argument (never null)NotFoundException - if an Acl was not found for each requested
ObjectIdentitypublic java.util.Map<ObjectIdentity,Acl> readAclsById(java.util.List<ObjectIdentity> objects, java.util.List<Sid> sids) throws NotFoundException
AclServiceImplementations 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 Sids do not have entries) will not have a map key.
readAclsById in interface AclServiceobjects - the objects to find Acl information forsids - the security identities for which Acl information is required
(may be null to denote all entries)ObjectIdentity passed as an
argument (never null)NotFoundException - if an Acl was not found for each requested
ObjectIdentitypublic void setFindChildrenQuery(java.lang.String findChildrenSql)
findChildrenSql - public void setAclClassIdSupported(boolean aclClassIdSupported)
public void setAclClassIdUtils(org.springframework.security.acls.jdbc.AclClassIdUtils aclClassIdUtils)
protected boolean isAclClassIdSupported()