|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.acls.jdbc.JdbcAclService
public class JdbcAclService
Simple JDBC-based implementation of AclService
.
Requires the "dirty" flags in AclImpl
and
AccessControlEntryImpl
to be set, so that the implementation can
detect changed parameters easily.
Field Summary | |
---|---|
protected JdbcTemplate |
jdbcTemplate
|
protected static org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
JdbcAclService(DataSource dataSource,
LookupStrategy lookupStrategy)
|
Method Summary | |
---|---|
List<ObjectIdentity> |
findChildren(ObjectIdentity parentIdentity)
Locates all object identities that use the specified parent. |
Acl |
readAclById(ObjectIdentity object)
Same as #readAclsById(Java.util.List except it returns only a single Acl. |
Acl |
readAclById(ObjectIdentity object,
List<Sid> sids)
Same as AclService.readAclsById(List, List) except it returns only a single Acl. |
Map<ObjectIdentity,Acl> |
readAclsById(List<ObjectIdentity> objects)
Obtains all the Acls that apply for the passed Objects. |
Map<ObjectIdentity,Acl> |
readAclsById(List<ObjectIdentity> objects,
List<Sid> sids)
Obtains all the Acls that apply for the passed Objects, but only for the security identifies passed. |
void |
setFindChildrenQuery(String findChildrenSql)
Allows customization of the SQL query used to find child object identities. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log log
protected JdbcTemplate jdbcTemplate
Constructor Detail |
---|
public JdbcAclService(DataSource dataSource, LookupStrategy lookupStrategy)
Method Detail |
---|
public List<ObjectIdentity> findChildren(ObjectIdentity parentIdentity)
AclService
findChildren
in interface AclService
parentIdentity
- to locate children of
public Acl readAclById(ObjectIdentity object, List<Sid> sids) throws NotFoundException
AclService
AclService.readAclsById(List, List)
except it returns only a single Acl.
readAclById
in interface AclService
object
- 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 ObjectIdentity
public Acl readAclById(ObjectIdentity object) throws NotFoundException
AclService
#readAclsById(Java.util.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 AclService
object
- to locate an Acl
for
Acl
for the requested ObjectIdentity
(never null)
NotFoundException
- if an Acl
was not found for the requested ObjectIdentity
public Map<ObjectIdentity,Acl> readAclsById(List<ObjectIdentity> objects) throws NotFoundException
AclService
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 for
ObjectIdentity
passed as an argument (never null)
NotFoundException
- if an Acl
was not found for each requested ObjectIdentity
public Map<ObjectIdentity,Acl> readAclsById(List<ObjectIdentity> objects, List<Sid> sids) throws NotFoundException
AclService
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 Sids 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)
ObjectIdentity
passed as an argument (never null)
NotFoundException
- if an Acl
was not found for each requested ObjectIdentity
public void setFindChildrenQuery(String findChildrenSql)
findChildrenSql
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |