|
|||||||||
| Home >> All >> org >> acegisecurity >> acl >> basic >> [ jdbc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.acegisecurity.acl.basic.jdbc
Class JdbcDaoImpl

java.lang.Objectorg.springframework.jdbc.core.support.JdbcDaoSupport
org.acegisecurity.acl.basic.jdbc.JdbcDaoImpl
- All Implemented Interfaces:
- org.acegisecurity.acl.basic.BasicAclDao, org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
- JdbcExtendedDaoImpl
- public class JdbcDaoImpl
- extends org.springframework.jdbc.core.support.JdbcDaoSupport
- implements org.acegisecurity.acl.basic.BasicAclDao
- extends org.springframework.jdbc.core.support.JdbcDaoSupport
Retrieves ACL details from a JDBC location.
A default database structure is assumed. This may be overridden by setting
the default query strings to use. If this does not provide enough
flexibility, another strategy would be to subclass this class and override
the org.springframework.jdbc.object.MappingSqlQuery instance used, via the initMappingSqlQueries() 55 extension point.
| Nested Class Summary | |
protected class |
JdbcDaoImpl.AclDetailsHolder
Used to hold details of a domain object instance's properties, or an individual ACL entry. |
protected class |
JdbcDaoImpl.AclsByObjectIdentityMapping
Query object to look up individual ACL entries. |
protected class |
JdbcDaoImpl.ObjectPropertiesMapping
Query object to look up properties for an object identity. |
| Field Summary | |
protected org.springframework.jdbc.object.MappingSqlQuery |
aclsByObjectIdentity
|
private java.lang.String |
aclsByObjectIdentityQuery
|
static java.lang.String |
DEF_ACLS_BY_OBJECT_IDENTITY_QUERY
|
static java.lang.String |
DEF_OBJECT_PROPERTIES_QUERY
|
private static org.apache.commons.logging.Log |
logger
|
protected org.springframework.jdbc.object.MappingSqlQuery |
objectProperties
|
private java.lang.String |
objectPropertiesQuery
|
static java.lang.String |
RECIPIENT_USED_FOR_INHERITENCE_MARKER
|
| Fields inherited from class org.springframework.jdbc.core.support.JdbcDaoSupport |
|
| Constructor Summary | |
JdbcDaoImpl()
|
|
| Method Summary | |
protected java.lang.String |
convertAclObjectIdentityToString(org.acegisecurity.acl.basic.AclObjectIdentity aclObjectIdentity)
Responsible for covering a AclObjectIdentity to a
String that can be located in the RDBMS. |
private org.acegisecurity.acl.basic.BasicAclEntry |
createBasicAclEntry(JdbcDaoImpl.AclDetailsHolder propertiesInformation,
JdbcDaoImpl.AclDetailsHolder aclInformation)
Constructs an individual BasicAclEntry from the passed
AclDetailsHolders. |
org.acegisecurity.acl.basic.BasicAclEntry[] |
getAcls(org.acegisecurity.acl.basic.AclObjectIdentity aclObjectIdentity)
Returns the ACLs associated with the requested AclObjectIdentity. |
org.springframework.jdbc.object.MappingSqlQuery |
getAclsByObjectIdentity()
|
java.lang.String |
getAclsByObjectIdentityQuery()
|
java.lang.String |
getObjectPropertiesQuery()
|
protected void |
initDao()
Subclasses can override this for custom initialization behavior. |
protected void |
initMappingSqlQueries()
Extension point to allow other MappingSqlQuery objects to be substituted in a subclass |
void |
setAclsByObjectIdentity(org.springframework.jdbc.object.MappingSqlQuery aclsByObjectIdentityQuery)
|
void |
setAclsByObjectIdentityQuery(java.lang.String queryString)
Allows the default query string used to retrieve ACLs based on object identity to be overriden, if default table or column names need to be changed. |
void |
setObjectProperties(org.springframework.jdbc.object.MappingSqlQuery objectPropertiesQuery)
|
void |
setObjectPropertiesQuery(java.lang.String queryString)
|
| Methods inherited from class org.springframework.jdbc.core.support.JdbcDaoSupport |
afterPropertiesSet, closeConnectionIfNecessary, createJdbcTemplate, getConnection, getDataSource, getExceptionTranslator, getJdbcTemplate, setDataSource, setJdbcTemplate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
RECIPIENT_USED_FOR_INHERITENCE_MARKER
public static final java.lang.String RECIPIENT_USED_FOR_INHERITENCE_MARKER
- See Also:
- Constant Field Values
DEF_ACLS_BY_OBJECT_IDENTITY_QUERY
public static final java.lang.String DEF_ACLS_BY_OBJECT_IDENTITY_QUERY
- See Also:
- Constant Field Values
DEF_OBJECT_PROPERTIES_QUERY
public static final java.lang.String DEF_OBJECT_PROPERTIES_QUERY
- See Also:
- Constant Field Values
logger
private static final org.apache.commons.logging.Log logger
aclsByObjectIdentity
protected org.springframework.jdbc.object.MappingSqlQuery aclsByObjectIdentity
objectProperties
protected org.springframework.jdbc.object.MappingSqlQuery objectProperties
aclsByObjectIdentityQuery
private java.lang.String aclsByObjectIdentityQuery
objectPropertiesQuery
private java.lang.String objectPropertiesQuery
| Constructor Detail |
JdbcDaoImpl
public JdbcDaoImpl()
| Method Detail |
convertAclObjectIdentityToString
protected java.lang.String convertAclObjectIdentityToString(org.acegisecurity.acl.basic.AclObjectIdentity aclObjectIdentity)
- Responsible for covering a
AclObjectIdentityto aStringthat can be located in the RDBMS.
createBasicAclEntry
private org.acegisecurity.acl.basic.BasicAclEntry createBasicAclEntry(JdbcDaoImpl.AclDetailsHolder propertiesInformation, JdbcDaoImpl.AclDetailsHolder aclInformation)
- Constructs an individual
BasicAclEntryfrom the passedAclDetailsHolders.Guarantees to never return
null(exceptions are thrown in the event of any issues).
getAcls
public org.acegisecurity.acl.basic.BasicAclEntry[] getAcls(org.acegisecurity.acl.basic.AclObjectIdentity aclObjectIdentity)
- Returns the ACLs associated with the requested
AclObjectIdentity.The org.acegisecurity.acl.basic.BasicAclEntrys returned by this method will have
String-based recipients. This will not be a problem if you are using theGrantedAuthorityEffectiveAclsResolver, which is the default configured againstBasicAclProvider.This method will only return ACLs for requests where the
AclObjectIdentityis of type org.acegisecurity.acl.basic.NamedEntityObjectIdentity. Of course, you can subclass or replace this class and support your own customAclObjectIdentitytypes.- Specified by:
getAclsin interfaceorg.acegisecurity.acl.basic.BasicAclDao
getAclsByObjectIdentity
public org.springframework.jdbc.object.MappingSqlQuery getAclsByObjectIdentity()
getAclsByObjectIdentityQuery
public java.lang.String getAclsByObjectIdentityQuery()
getObjectPropertiesQuery
public java.lang.String getObjectPropertiesQuery()
initDao
protected void initDao()
throws org.springframework.context.ApplicationContextException
- Description copied from class:
org.springframework.jdbc.core.support.JdbcDaoSupport - Subclasses can override this for custom initialization behavior.
Gets called after population of this instance's bean properties.
initMappingSqlQueries
protected void initMappingSqlQueries()
- Extension point to allow other MappingSqlQuery objects to be
substituted in a subclass
setAclsByObjectIdentity
public void setAclsByObjectIdentity(org.springframework.jdbc.object.MappingSqlQuery aclsByObjectIdentityQuery)
setAclsByObjectIdentityQuery
public void setAclsByObjectIdentityQuery(java.lang.String queryString)
- Allows the default query string used to retrieve ACLs based
on object identity to be overriden, if default table or
column names need to be changed. The default query is
DEF_ACLS_BY_OBJECT_IDENTITY_QUERY55 ; when modifying this query, ensure that all returned columns are mapped back to the same column names as in the default query.
setObjectProperties
public void setObjectProperties(org.springframework.jdbc.object.MappingSqlQuery objectPropertiesQuery)
setObjectPropertiesQuery
public void setObjectPropertiesQuery(java.lang.String queryString)
|
|||||||||
| Home >> All >> org >> acegisecurity >> acl >> basic >> [ jdbc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC