Spring Security Framework

org.springframework.security.acl.basic.jdbc
Class JdbcDaoImpl

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.jdbc.core.support.JdbcDaoSupport
          extended by org.springframework.security.acl.basic.jdbc.JdbcDaoImpl
All Implemented Interfaces:
InitializingBean, BasicAclDao
Direct Known Subclasses:
JdbcExtendedDaoImpl

Deprecated. Use new spring-security-acl module instead

public class JdbcDaoImpl
extends JdbcDaoSupport
implements BasicAclDao

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 MappingSqlQuery instance used, via the initMappingSqlQueries() extension point.


Nested Class Summary
protected  class JdbcDaoImpl.AclDetailsHolder
          Deprecated. Used to hold details of a domain object instance's properties, or an individual ACL entry.
protected  class JdbcDaoImpl.AclsByObjectIdentityMapping
          Deprecated. Query object to look up individual ACL entries.
protected  class JdbcDaoImpl.ObjectPropertiesMapping
          Deprecated. Query object to look up properties for an object identity.
 
Field Summary
protected  MappingSqlQuery aclsByObjectIdentity
          Deprecated.  
static String DEF_ACLS_BY_OBJECT_IDENTITY_QUERY
          Deprecated.  
static String DEF_OBJECT_PROPERTIES_QUERY
          Deprecated.  
protected  MappingSqlQuery objectProperties
          Deprecated.  
static String RECIPIENT_USED_FOR_INHERITENCE_MARKER
          Deprecated.  
 
Constructor Summary
JdbcDaoImpl()
          Deprecated.  
 
Method Summary
protected  String convertAclObjectIdentityToString(AclObjectIdentity aclObjectIdentity)
          Deprecated. Responsible for covering a AclObjectIdentity to a String that can be located in the RDBMS.
 BasicAclEntry[] getAcls(AclObjectIdentity aclObjectIdentity)
          Deprecated. Returns the ACLs associated with the requested AclObjectIdentity.
 MappingSqlQuery getAclsByObjectIdentity()
          Deprecated.  
 String getAclsByObjectIdentityQuery()
          Deprecated.  
 String getObjectPropertiesQuery()
          Deprecated.  
protected  void initDao()
          Deprecated.  
protected  void initMappingSqlQueries()
          Deprecated. Extension point to allow other MappingSqlQuery objects to be substituted in a subclass
 void setAclsByObjectIdentity(MappingSqlQuery aclsByObjectIdentityQuery)
          Deprecated.  
 void setAclsByObjectIdentityQuery(String queryString)
          Deprecated. 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(MappingSqlQuery objectPropertiesQuery)
          Deprecated.  
 void setObjectPropertiesQuery(String queryString)
          Deprecated.  
 
Methods inherited from class org.springframework.jdbc.core.support.JdbcDaoSupport
checkDaoConfig, createJdbcTemplate, getConnection, getDataSource, getExceptionTranslator, getJdbcTemplate, initTemplateConfig, releaseConnection, setDataSource, setJdbcTemplate
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet
 
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 String RECIPIENT_USED_FOR_INHERITENCE_MARKER
Deprecated. 
See Also:
Constant Field Values

DEF_ACLS_BY_OBJECT_IDENTITY_QUERY

public static final String DEF_ACLS_BY_OBJECT_IDENTITY_QUERY
Deprecated. 
See Also:
Constant Field Values

DEF_OBJECT_PROPERTIES_QUERY

public static final String DEF_OBJECT_PROPERTIES_QUERY
Deprecated. 
See Also:
Constant Field Values

aclsByObjectIdentity

protected MappingSqlQuery aclsByObjectIdentity
Deprecated. 

objectProperties

protected MappingSqlQuery objectProperties
Deprecated. 
Constructor Detail

JdbcDaoImpl

public JdbcDaoImpl()
Deprecated. 
Method Detail

convertAclObjectIdentityToString

protected String convertAclObjectIdentityToString(AclObjectIdentity aclObjectIdentity)
Deprecated. 
Responsible for covering a AclObjectIdentity to a String that can be located in the RDBMS.

Parameters:
aclObjectIdentity - to locate
Returns:
the object identity as a String

getAcls

public BasicAclEntry[] getAcls(AclObjectIdentity aclObjectIdentity)
Deprecated. 
Returns the ACLs associated with the requested AclObjectIdentity.

The BasicAclEntrys returned by this method will have String-based recipients. This will not be a problem if you are using the GrantedAuthorityEffectiveAclsResolver, which is the default configured against BasicAclProvider.

This method will only return ACLs for requests where the AclObjectIdentity is of type NamedEntityObjectIdentity. Of course, you can subclass or replace this class and support your own custom AclObjectIdentity types.

Specified by:
getAcls in interface BasicAclDao
Parameters:
aclObjectIdentity - for which ACL information is required (cannot be null and must be an instance of NamedEntityObjectIdentity)
Returns:
the ACLs that apply (without any nulls inside the array), or null if not found or if an incompatible AclObjectIdentity was requested

getAclsByObjectIdentity

public MappingSqlQuery getAclsByObjectIdentity()
Deprecated. 

getAclsByObjectIdentityQuery

public String getAclsByObjectIdentityQuery()
Deprecated. 

getObjectPropertiesQuery

public String getObjectPropertiesQuery()
Deprecated. 

initDao

protected void initDao()
                throws ApplicationContextException
Deprecated. 
Overrides:
initDao in class DaoSupport
Throws:
ApplicationContextException

initMappingSqlQueries

protected void initMappingSqlQueries()
Deprecated. 
Extension point to allow other MappingSqlQuery objects to be substituted in a subclass


setAclsByObjectIdentity

public void setAclsByObjectIdentity(MappingSqlQuery aclsByObjectIdentityQuery)
Deprecated. 

setAclsByObjectIdentityQuery

public void setAclsByObjectIdentityQuery(String queryString)
Deprecated. 
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_QUERY; when modifying this query, ensure that all returned columns are mapped back to the same column names as in the default query.

Parameters:
queryString - The query string to set

setObjectProperties

public void setObjectProperties(MappingSqlQuery objectPropertiesQuery)
Deprecated. 

setObjectPropertiesQuery

public void setObjectPropertiesQuery(String queryString)
Deprecated. 

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.