org.sakaiproject.component.legacy.alias
Class DbAliasService

java.lang.Object
  extended byorg.sakaiproject.component.legacy.alias.BaseAliasService
      extended byorg.sakaiproject.component.legacy.alias.DbAliasService
All Implemented Interfaces:
AliasService, EntityProducer, StorageUser

public class DbAliasService
extends BaseAliasService

DbAliasService is an extension of the BaseAliasService with a database storage. Fields are fully relational. Full properties are not yet supported - core ones are. Code to find and convert records from before, from the XML based CHEF_ALIAS table is included.

Version:
$Revision: 2451 $
Author:
University of Michigan, CHEF Software Development Team

Nested Class Summary
protected  class DbAliasService.DbStorage
          Covers for the BaseXmlFileStorage, providing User and AliasEdit parameters
protected  class DbAliasService.DbStorageOld
          This is how to access the old chef_alias table (CTools through 2.0.7)
 
Nested classes inherited from class org.sakaiproject.component.legacy.alias.BaseAliasService
BaseAliasService.BaseAliasEdit, BaseAliasService.Storage
 
Nested classes inherited from class org.sakaiproject.service.legacy.entity.EntityProducer
EntityProducer.ChangeType
 
Field Summary
protected  boolean m_autoDdl
          Configuration: to run the ddl on init or not.
protected  boolean m_checkOld
          Configuration: check the old table, too.
protected  boolean m_convertOld
          Set if we are to run the from-old conversion.
protected  String[] m_fieldNames
          All fields.
protected  String m_idFieldName
          ID field.
protected  String m_propTableName
          Table name for properties.
protected  SqlService m_sqlService
          Dependency: SqlService
protected  String m_tableName
          Table name for aliases.
protected  boolean m_useExternalLocks
          If true, we do our locks in the remote database, otherwise we do them here.
 
Fields inherited from class org.sakaiproject.component.legacy.alias.BaseAliasService
m_cacheCleanerSeconds, m_cacheSeconds, m_callCache, m_entityManager, m_logger, m_memoryService, m_relativeAccessPoint, m_serverConfigurationService, m_storage
 
Fields inherited from interface org.sakaiproject.service.legacy.alias.AliasService
REFERENCE_ROOT, SECURE_ADD_ALIAS, SECURE_REMOVE_ALIAS, SECURE_UPDATE_ALIAS, SERVICE_NAME
 
Constructor Summary
DbAliasService()
           
 
Method Summary
protected  void convertOld()
          Create a new table record for all old table records found, and delete the old.
 void init()
          Final initialization, once all dependencies are set.
protected  BaseAliasService.Storage newStorage()
          Construct a Storage object.
 void setAutoDdl(String value)
          Configuration: to run the ddl on init or not.
 void setCheckOld(String value)
          Configuration: set the locks-in-db
 void setConvertOld(String value)
          Configuration: run the from-old conversion.
 void setExternalLocks(String value)
          Configuration: set the external locks value.
 void setSqlService(SqlService service)
          Dependency: SqlService.
 
Methods inherited from class org.sakaiproject.component.legacy.alias.BaseAliasService
add, addLiveProperties, addLiveUpdateProperties, aliasId, aliasReference, allowAdd, allowEdit, allowRemoveAlias, allowRemoveTargetAliases, allowSetAlias, archive, cancel, commit, countAliases, countSearchAliases, destroy, edit, getAccessPoint, getAliases, getAliases, getAliases, getDate, getEntity, getEntityAuthzGroups, getEntityDescription, getEntityResourceProperties, getEntityUrl, getHttpAccess, getLabel, getOwnerId, getTarget, importEntities, isDraft, merge, newContainer, newContainer, newContainer, newContainerEdit, newContainerEdit, newContainerEdit, newResource, newResource, newResource, newResourceEdit, newResourceEdit, newResourceEdit, parseEntityReference, remove, removeAlias, removeTargetAliases, searchAliases, setAlias, setCacheCleanerMinutes, setCacheMinutes, setEntityManager, setLogger, setMemoryService, setServerConfigurationService, storageFields, syncWithSiteChange, unlock, unlockCheck, unlockTargetCheck, willArchiveMerge, willImport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_tableName

protected String m_tableName
Table name for aliases.


m_propTableName

protected String m_propTableName
Table name for properties.


m_idFieldName

protected String m_idFieldName
ID field.


m_fieldNames

protected String[] m_fieldNames
All fields.


m_useExternalLocks

protected boolean m_useExternalLocks
If true, we do our locks in the remote database, otherwise we do them here.


m_convertOld

protected boolean m_convertOld
Set if we are to run the from-old conversion.


m_sqlService

protected SqlService m_sqlService
Dependency: SqlService


m_checkOld

protected boolean m_checkOld
Configuration: check the old table, too.


m_autoDdl

protected boolean m_autoDdl
Configuration: to run the ddl on init or not.

Constructor Detail

DbAliasService

public DbAliasService()
Method Detail

setConvertOld

public void setConvertOld(String value)
Configuration: run the from-old conversion.

Parameters:
value - The conversion desired value.

setSqlService

public void setSqlService(SqlService service)
Dependency: SqlService.

Parameters:
service - The SqlService.

setExternalLocks

public void setExternalLocks(String value)
Configuration: set the external locks value.

Parameters:
value - The external locks value.

setCheckOld

public void setCheckOld(String value)
Configuration: set the locks-in-db

Parameters:
value - The locks-in-db value.

setAutoDdl

public void setAutoDdl(String value)
Configuration: to run the ddl on init or not.

Parameters:
value - the auto ddl value.

init

public void init()
Final initialization, once all dependencies are set.

Overrides:
init in class BaseAliasService

newStorage

protected BaseAliasService.Storage newStorage()
Construct a Storage object.

Specified by:
newStorage in class BaseAliasService
Returns:
The new storage object.

convertOld

protected void convertOld()
Create a new table record for all old table records found, and delete the old.