egovframework.rfc3.iam.security.securedobject.impl
Class SecuredObjectDAO

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by egovframework.rfc3.iam.security.securedobject.impl.SecuredObjectDAO
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

public class SecuredObjectDAO
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport

DB 기반의 Secured Object 정보를 제공하기 위한 DAO 로 default 쿼리를 제공하며 사용자 DB 에 맞는 각 유형의 DB 쿼리는 재설정 가능하다. namedParameterJdbcTemplate 를 사용하여 DB 조회를 처리한다.

Since:
2010.12.06
Version:
egovframework RFC 3.0
Author:
허성철
See Also:
 << 개정이력(Modification Information) >>
   
   수정일      수정자           수정내용
  -------    -------------    ----------------------
   2010.12.06  허성철    egovframework 수정작업

 Copyright (C) 2010 by skoinfo  All right reserved.
 

Field Summary
static java.lang.String DEF_HIERARCHICAL_ROLES_QUERY
          Role 의 계층(Hierarchy) 관계를 조회하는 default 쿼리이다.
static java.lang.String DEF_REGEX_MATCHED_REQUEST_MAPPING_QUERY_ORACLE10G
          매 request 마다 best matching url 보호자원 - Role 맵핑정보를 얻기위한 default 쿼리이다.
static java.lang.String DEF_ROLES_AND_METHOD_QUERY
          method 형식인 보호자원 - Role 맵핑정보를 조회하는 default 쿼리이다.
static java.lang.String DEF_ROLES_AND_METHOD_QUERY_CUBRID
          method 형식인 보호자원 - Role 맵핑정보를 조회하는 default 쿼리이다.CUBRID
static java.lang.String DEF_ROLES_AND_POINTCUT_QUERY
          pointcut 형식인 보호자원 - Role 맵핑정보를 조회하는 default 쿼리이다.
static java.lang.String DEF_ROLES_AND_URL_QUERY_CUBRID
          public static final String DEF_ROLES_AND_URL_QUERY_CUBRID = "SELECT " + " case " + " when ROLE.PORT='80' then " + " case ROLE.IS_PERMIT " + " when '1' then concat('\\\\A','.*.'
static java.lang.String DEF_ROLES_AND_URL_QUERY_MYSQL
          url 형식인 보호자원 - Role 맵핑정보를 조회하는 mysql default 쿼리이다.
static java.lang.String DEF_ROLES_AND_URL_QUERY_ORACLE
          url 형식인 보호자원 - Role 맵핑정보를 조회하는 oracle default 쿼리이다.
static java.lang.String DEF_VIEW_RESOURCE_MAPPING_QUERY
          default query to find mapping information of view resource.
 
Constructor Summary
SecuredObjectDAO()
          SecuredObjectDAO 생성자 2014-11-04 CUBRID 추가(박형민:큐브리드 는 쿼리 예약어를 사용못함 ORACLE, MYSQL, TIBERO 연동 불가)
 
Method Summary
 java.lang.String getHierarchicalRoles()
          getHierarchicalRoles
 org.springframework.orm.hibernate3.LocalSessionFactoryBean getLocalSessionFactoryBean()
           
 java.util.List<org.springframework.security.access.ConfigAttribute> getRegexMatchedRequestMapping(java.lang.String url)
          getRegexMatchedRequestMapping
 java.util.LinkedHashMap getRolesAndMethod()
          getRolesAndMethod
 java.util.LinkedHashMap getRolesAndPointcut()
          getRolesAndPointcut
 java.util.LinkedHashMap getRolesAndResources(java.lang.String resourceType)
           
 java.util.LinkedHashMap getRolesAndUrl()
          getRolesAndUrl
 java.lang.String getSqlHierarchicalRoles()
          getSqlHierarchicalRoles
 java.lang.String getSqlRegexMatchedRequestMapping()
          getSqlRegexMatchedRequestMapping
 java.lang.String getSqlRolesAndMethod()
          getSqlRolesAndMethod
 java.lang.String getSqlRolesAndPointcut()
          getSqlRolesAndPointcut
 java.lang.String getSqlRolesAndUrl()
          getSqlRolesAndUrl
 java.lang.String getSqlViewResourceMapping()
          getRolesAndResources
 java.util.List getViewResourceMapping(java.util.Map paramMap)
           
 void setDataSource(javax.sql.DataSource dataSource)
          setDataSource
 void setLocalSessionFactoryBean(org.springframework.orm.hibernate3.LocalSessionFactoryBean localSessionFactoryBean)
           
 void setSqlHierarchicalRoles(java.lang.String sqlHierarchicalRoles)
          setSqlHierarchicalRoles
 void setSqlRegexMatchedRequestMapping(java.lang.String sqlRegexMatchedRequestMapping)
          setSqlRegexMatchedRequestMapping
 void setSqlRolesAndMethod(java.lang.String sqlRolesAndMethod)
          setSqlRolesAndMethod
 void setSqlRolesAndPointcut(java.lang.String sqlRolesAndPointcut)
          setSqlRolesAndPointcut
 void setSqlRolesAndUrl(java.lang.String sqlRolesAndUrl)
          setSqlRolesAndUrl
 void setSqlViewResourceMapping(java.lang.String sqlViewResourceMapping)
           
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEF_ROLES_AND_URL_QUERY_MYSQL

public static final java.lang.String DEF_ROLES_AND_URL_QUERY_MYSQL
url 형식인 보호자원 - Role 맵핑정보를 조회하는 mysql default 쿼리이다.

See Also:
Constant Field Values

DEF_ROLES_AND_URL_QUERY_ORACLE

public static final java.lang.String DEF_ROLES_AND_URL_QUERY_ORACLE
url 형식인 보호자원 - Role 맵핑정보를 조회하는 oracle default 쿼리이다.

See Also:
Constant Field Values

DEF_ROLES_AND_URL_QUERY_CUBRID

public static final java.lang.String DEF_ROLES_AND_URL_QUERY_CUBRID
public static final String DEF_ROLES_AND_URL_QUERY_CUBRID = "SELECT " + " case " + " when ROLE.PORT='80' then " + " case ROLE.IS_PERMIT " + " when '1' then concat('\\\\A','.*.',ROLE.RESOURCE_PATTERN,'\\\\Z') " + " else concat('\\\\A',ROLE.DOMAIN,ROLE.RESOURCE_PATTERN,'\\\\Z') end " + " when ROLE.PORT='443' then " + " case ROLE.IS_PERMIT " + " when '1' then concat('\\\\A','.*.',ROLE.RESOURCE_PATTERN,'\\\\Z') " + " else concat('\\A',ROLE.DOMAIN,ROLE.RESOURCE_PATTERN,'\\Z') end " + " else " + " case ROLE.IS_PERMIT " + " when '1' then concat('\\\\A','.*.',ROLE.RESOURCE_PATTERN,'\\\\Z') " + " else concat('\\\\A',ROLE.DOMAIN,':',ROLE.PORT,ROLE.RESOURCE_PATTERN,'\\\\Z') end " + " end url ," + " ROLE.ROLE_ID authority " + " FROM " + " ( " + " SELECT" + " c.DOMAIN as DOMAIN," + " c.PORT as PORT ," + " a.RESOURCE_PATTERN as RESOURCE_PATTERN ," + " b.ROLE_ID as ROLE_ID ," + " a.IS_PERMIT as IS_PERMIT" + " FROM " + " RFC_COMTNRESOURCE a INNER JOIN RFC_COMTNRESOURCE_ROLES b ON a.RESOURCE_ID = b.RESOURCE_ID " + " LEFT JOIN RFC_COMTNDOMAIN c ON a.DOMAIN_ID = c.DOMAIN_ID " + " WHERE " + // " a.SGROUP_ID=b.SGROUP_ID AND " + " a.RESOURCE_TYPE = 'url' " + " ORDER BY a.SORT_ORDER ASC " + " ) ROLE ";

See Also:
Constant Field Values

DEF_ROLES_AND_METHOD_QUERY

public static final java.lang.String DEF_ROLES_AND_METHOD_QUERY
method 형식인 보호자원 - Role 맵핑정보를 조회하는 default 쿼리이다.

See Also:
Constant Field Values

DEF_ROLES_AND_METHOD_QUERY_CUBRID

public static final java.lang.String DEF_ROLES_AND_METHOD_QUERY_CUBRID
method 형식인 보호자원 - Role 맵핑정보를 조회하는 default 쿼리이다.CUBRID

See Also:
Constant Field Values

DEF_ROLES_AND_POINTCUT_QUERY

public static final java.lang.String DEF_ROLES_AND_POINTCUT_QUERY
pointcut 형식인 보호자원 - Role 맵핑정보를 조회하는 default 쿼리이다.

See Also:
Constant Field Values

DEF_REGEX_MATCHED_REQUEST_MAPPING_QUERY_ORACLE10G

public static final java.lang.String DEF_REGEX_MATCHED_REQUEST_MAPPING_QUERY_ORACLE10G
매 request 마다 best matching url 보호자원 - Role 맵핑정보를 얻기위한 default 쿼리이다. (Oracle 10g specific)

See Also:
Constant Field Values

DEF_HIERARCHICAL_ROLES_QUERY

public static final java.lang.String DEF_HIERARCHICAL_ROLES_QUERY
Role 의 계층(Hierarchy) 관계를 조회하는 default 쿼리이다.

See Also:
Constant Field Values

DEF_VIEW_RESOURCE_MAPPING_QUERY

public static final java.lang.String DEF_VIEW_RESOURCE_MAPPING_QUERY
default query to find mapping information of view resource.

See Also:
Constant Field Values
Constructor Detail

SecuredObjectDAO

public SecuredObjectDAO()
SecuredObjectDAO 생성자 2014-11-04 CUBRID 추가(박형민:큐브리드 는 쿼리 예약어를 사용못함 ORACLE, MYSQL, TIBERO 연동 불가)

Method Detail

getLocalSessionFactoryBean

public org.springframework.orm.hibernate3.LocalSessionFactoryBean getLocalSessionFactoryBean()

setLocalSessionFactoryBean

public void setLocalSessionFactoryBean(org.springframework.orm.hibernate3.LocalSessionFactoryBean localSessionFactoryBean)

setDataSource

public void setDataSource(javax.sql.DataSource dataSource)
setDataSource

Parameters:
dataSource - DataSource

getSqlRolesAndUrl

public java.lang.String getSqlRolesAndUrl()
getSqlRolesAndUrl

Returns:
String

setSqlRolesAndUrl

public void setSqlRolesAndUrl(java.lang.String sqlRolesAndUrl)
setSqlRolesAndUrl

Parameters:
sqlRolesAndUrl - String

getSqlRolesAndMethod

public java.lang.String getSqlRolesAndMethod()
getSqlRolesAndMethod

Returns:
String

setSqlRolesAndMethod

public void setSqlRolesAndMethod(java.lang.String sqlRolesAndMethod)
setSqlRolesAndMethod

Parameters:
sqlRolesAndMethod - String

getSqlRolesAndPointcut

public java.lang.String getSqlRolesAndPointcut()
getSqlRolesAndPointcut

Returns:
String

setSqlRolesAndPointcut

public void setSqlRolesAndPointcut(java.lang.String sqlRolesAndPointcut)
setSqlRolesAndPointcut

Parameters:
sqlRolesAndPointcut - String

getSqlRegexMatchedRequestMapping

public java.lang.String getSqlRegexMatchedRequestMapping()
getSqlRegexMatchedRequestMapping

Returns:
String

setSqlRegexMatchedRequestMapping

public void setSqlRegexMatchedRequestMapping(java.lang.String sqlRegexMatchedRequestMapping)
setSqlRegexMatchedRequestMapping

Parameters:
sqlRegexMatchedRequestMapping - String

getSqlHierarchicalRoles

public java.lang.String getSqlHierarchicalRoles()
getSqlHierarchicalRoles

Returns:
String

setSqlHierarchicalRoles

public void setSqlHierarchicalRoles(java.lang.String sqlHierarchicalRoles)
setSqlHierarchicalRoles

Parameters:
sqlHierarchicalRoles - String

getSqlViewResourceMapping

public java.lang.String getSqlViewResourceMapping()
getRolesAndResources

Parameters:
resourceType - String
Returns:
LinkedHashMap
Throws:
java.lang.Exception

setSqlViewResourceMapping

public void setSqlViewResourceMapping(java.lang.String sqlViewResourceMapping)

getRolesAndResources

public java.util.LinkedHashMap getRolesAndResources(java.lang.String resourceType)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

getRolesAndUrl

public java.util.LinkedHashMap getRolesAndUrl()
                                       throws java.lang.Exception
getRolesAndUrl

Returns:
LinkedHashMap
Throws:
java.lang.Exception

getRolesAndMethod

public java.util.LinkedHashMap getRolesAndMethod()
                                          throws java.lang.Exception
getRolesAndMethod

Returns:
LinkedHashMap
Throws:
java.lang.Exception

getRolesAndPointcut

public java.util.LinkedHashMap getRolesAndPointcut()
                                            throws java.lang.Exception
getRolesAndPointcut

Returns:
LinkedHashMap
Throws:
java.lang.Exception

getRegexMatchedRequestMapping

public java.util.List<org.springframework.security.access.ConfigAttribute> getRegexMatchedRequestMapping(java.lang.String url)
                                                                                                  throws java.lang.Exception
getRegexMatchedRequestMapping

Parameters:
url - String
Returns:
ConfigAttributeDefinition
Throws:
java.lang.Exception

getHierarchicalRoles

public java.lang.String getHierarchicalRoles()
                                      throws java.lang.Exception
getHierarchicalRoles

Returns:
String
Throws:
java.lang.Exception

getViewResourceMapping

public java.util.List getViewResourceMapping(java.util.Map paramMap)