org.sakaiproject.component.legacy.authzGroup
Class DbAuthzGroupService

java.lang.Object
  extended byorg.sakaiproject.component.legacy.authzGroup.BaseAuthzGroupService
      extended byorg.sakaiproject.component.legacy.authzGroup.DbAuthzGroupService
All Implemented Interfaces:
AuthzGroupService, EntityProducer, StorageUser

public class DbAuthzGroupService
extends BaseAuthzGroupService

DbAuthzGroupService is an extension of the BaseAuthzGroupService with database storage.

Version:
$Revision: 3668 $
Author:
University of Michigan, Sakai Software Development Team

Nested Class Summary
protected  class DbAuthzGroupService.DbStorage
          Covers for the BaseXmlFileStorage, providing AuthzGroup and RealmEdit parameters
 
Nested classes inherited from class org.sakaiproject.component.legacy.authzGroup.BaseAuthzGroupService
BaseAuthzGroupService.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_convertOld
          Set if we are to run the from-old conversion.
protected  Collection m_functionCache
          All the event functions we know exist on the db.
protected  String m_realmDbidField
          AuthzGroup dbid field.
protected  String m_realmIdFieldName
          ID field for realm.
protected  String[] m_realmInsertFieldNames
          All "fields" for realm insert.
protected  String[] m_realmInsertValueNames
          All "field values" for realm insert.
protected  String m_realmPropTableName
          Table name for realm properties.
protected  String[] m_realmReadFieldNames
          All "fields" for realm reading.
protected  String m_realmTableName
          Table name for realms.
protected  String[] m_realmUpdateFieldNames
          All "fields" for realm update.
protected  Collection m_roleNameCache
          All the event role names we know exist on the db.
protected  SqlService m_sqlService
          Dependency: SqlService
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.authzGroup.BaseAuthzGroupService
m_entityManager, m_logger, m_provider, m_relativeAccessPoint, m_serverConfigurationService, m_storage
 
Fields inherited from interface org.sakaiproject.service.legacy.authzGroup.AuthzGroupService
ANON_ROLE, AUTH_ROLE, REFERENCE_ROOT, SECURE_ADD_AUTHZ_GROUP, SECURE_REMOVE_AUTHZ_GROUP, SECURE_UPDATE_AUTHZ_GROUP, SECURE_UPDATE_OWN_AUTHZ_GROUP, SERVICE_NAME
 
Constructor Summary
DbAuthzGroupService()
           
 
Method Summary
protected  void cacheFunctionNames()
          Read all the function records, caching them
protected  void cacheRoleNames()
          Read all the role records, caching them
protected  void checkFunctionName(String name)
          Check / assure this function name is defined.
protected  void checkRoleName(String name)
          Check / assure this role name is defined.
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  BaseAuthzGroupService.Storage newStorage()
          Construct a Storage object.
protected  String orInClause(Collection c, String field)
          Form a SQL IN() clause, but break it up with ORs to keep the size of each IN below 100
 void setAutoDdl(String value)
          Configuration: to run the ddl on init or not.
 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.authzGroup.BaseAuthzGroupService
addAuthzGroup, addAuthzGroup, addLiveProperties, addLiveUpdateProperties, allowAdd, allowJoinGroup, allowRemove, allowUnjoinGroup, allowUpdate, archive, authzGroupId, authzGroupReference, completeSave, countAuthzGroups, destroy, getAccessPoint, getAllowedFunctions, getAuthzGroup, getAuthzGroups, getAuthzGroupsIsAllowed, getDate, getEntity, getEntityAuthzGroups, getEntityDescription, getEntityResourceProperties, getEntityUrl, getHttpAccess, getLabel, getOwnerId, getUserRole, getUsersIsAllowed, getUsersRole, importEntities, isAllowed, isAllowed, isDraft, joinGroup, merge, newAuthzGroup, newContainer, newContainer, newContainer, newContainerEdit, newContainerEdit, newContainerEdit, newResource, newResource, newResource, newResourceEdit, newResourceEdit, newResourceEdit, parseEntityReference, refreshUser, removeAuthzGroup, removeAuthzGroup, removeSiteSecurity, save, setEntityManager, setLogger, setProvider, setServerConfigurationService, storageFields, syncWithSiteChange, unjoinGroup, unlock, unlockCheck, updateSiteSecurity, willArchiveMerge, willImport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_functionCache

protected Collection m_functionCache
All the event functions we know exist on the db.


m_roleNameCache

protected Collection m_roleNameCache
All the event role names we know exist on the db.


m_realmTableName

protected String m_realmTableName
Table name for realms.


m_realmPropTableName

protected String m_realmPropTableName
Table name for realm properties.


m_realmIdFieldName

protected String m_realmIdFieldName
ID field for realm.


m_realmDbidField

protected String m_realmDbidField
AuthzGroup dbid field.


m_realmReadFieldNames

protected String[] m_realmReadFieldNames
All "fields" for realm reading.


m_realmUpdateFieldNames

protected String[] m_realmUpdateFieldNames
All "fields" for realm update.


m_realmInsertFieldNames

protected String[] m_realmInsertFieldNames
All "fields" for realm insert.


m_realmInsertValueNames

protected String[] m_realmInsertValueNames
All "field values" for realm insert.


m_sqlService

protected SqlService m_sqlService
Dependency: SqlService


m_convertOld

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


m_useExternalLocks

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


m_autoDdl

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

Constructor Detail

DbAuthzGroupService

public DbAuthzGroupService()
Method Detail

setSqlService

public void setSqlService(SqlService service)
Dependency: SqlService.

Parameters:
service - The SqlService.

setConvertOld

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

Parameters:
value - The conversion desired value.

setExternalLocks

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

Parameters:
value - The external locks 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 BaseAuthzGroupService

newStorage

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

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

checkRoleName

protected void checkRoleName(String name)
Check / assure this role name is defined.

Parameters:
name - the role name.

cacheRoleNames

protected void cacheRoleNames()
Read all the role records, caching them


checkFunctionName

protected void checkFunctionName(String name)
Check / assure this function name is defined.

Parameters:
name - the role name.

cacheFunctionNames

protected void cacheFunctionNames()
Read all the function records, caching them


convertOld

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


orInClause

protected String orInClause(Collection c,
                            String field)
Form a SQL IN() clause, but break it up with ORs to keep the size of each IN below 100

Parameters:
c - The collection site
field - The field name
Returns:
a SQL IN() with ORs clause this large.