org.openid4java.server
Class JdbcServerAssociationStore

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.jdbc.core.support.JdbcDaoSupport
          extended by org.openid4java.server.JdbcServerAssociationStore
All Implemented Interfaces:
ServerAssociationStore, org.springframework.beans.factory.InitializingBean

public class JdbcServerAssociationStore
extends org.springframework.jdbc.core.support.JdbcDaoSupport
implements ServerAssociationStore

JDBC implementation for the ServerAssociationStore interface.

The JdbcServerAssociation store requires a javax.sql.DataSource to be configured and passed in to it with the setDataSource setter method. The table name also needs to be specified, either through the constructor, or through the setTableName setter.

The specified table must have the following structure:

Author:
Marius Scurtescu, Johnny Bufu

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
JdbcServerAssociationStore()
           
JdbcServerAssociationStore(java.lang.String tableName)
           
 
Method Summary
 Association generate(java.lang.String type, int expiryIn)
           
 java.lang.String getTableName()
           
 Association load(java.lang.String handle)
           
 void remove(java.lang.String handle)
           
 void setTableName(java.lang.String tableName)
           
 
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, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcServerAssociationStore

public JdbcServerAssociationStore()

JdbcServerAssociationStore

public JdbcServerAssociationStore(java.lang.String tableName)
Method Detail

getTableName

public java.lang.String getTableName()

setTableName

public void setTableName(java.lang.String tableName)

generate

public Association generate(java.lang.String type,
                            int expiryIn)
                     throws AssociationException
Specified by:
generate in interface ServerAssociationStore
Throws:
AssociationException

load

public Association load(java.lang.String handle)
Specified by:
load in interface ServerAssociationStore

remove

public void remove(java.lang.String handle)
Specified by:
remove in interface ServerAssociationStore


Copyright © 2011 Sxip. All Rights Reserved.