com.stratelia.webactiv.beans.admin
Class AbstractDomainDriver

java.lang.Object
  extended by com.stratelia.webactiv.beans.admin.AbstractDomainDriver
All Implemented Interfaces:
DomainDriver
Direct Known Subclasses:
DomainDriverManager, LDAPDriver, SilverpeasDriver, SQLDriver

public abstract class AbstractDomainDriver
extends Object
implements DomainDriver


Field Summary
protected  int domainId
           
protected  List<DomainProperty> domainProperties
           
protected  String[] keys
           
protected  String[] m_mapParameters
           
protected  Map<String,HashMap<String,String>> m_PropertiesDescriptions
           
protected  Map<String,HashMap<String,String>> m_PropertiesLabels
           
protected  String m_PropertiesMultilang
           
protected  boolean synchroInProcess
           
protected  boolean x509Enabled
           
 
Fields inherited from interface com.stratelia.webactiv.beans.admin.DomainDriver
ACTION_CREATE_GROUP, ACTION_CREATE_USER, ACTION_DELETE_GROUP, ACTION_DELETE_USER, ACTION_EDIT_USER_IN_GROUP, ACTION_IMPORT_GROUP, ACTION_IMPORT_USER, ACTION_MASK_ALL, ACTION_MASK_MIXED_GROUPS, ACTION_MASK_RO, ACTION_MASK_RW, ACTION_NONE, ACTION_READ_GROUP, ACTION_READ_USER, ACTION_REMOVE_GROUP, ACTION_REMOVE_USER, ACTION_SYNCHRO_GROUP, ACTION_SYNCHRO_USER, ACTION_UPDATE_GROUP, ACTION_UPDATE_USER, ACTION_X509_USER
 
Constructor Summary
AbstractDomainDriver()
           
 
Method Summary
 void addPropertiesToImport(List<DomainProperty> props)
           
 void addPropertiesToImport(List<DomainProperty> props, Map<String,String> theDescriptions)
           
 void beginSynchronization()
          Called when Admin starts the synchronization
 String endSynchronization(boolean cancelSynchro)
          Called when Admin ends the synchronization
 long getDriverActions()
          Called when Admin starts the synchronization
 String[] getMapParameters()
           
 Map<String,String> getPropertiesDescriptions(String language)
           
 Map<String,String> getPropertiesLabels(String language)
           
 String[] getPropertiesNames()
           
 List<DomainProperty> getPropertiesToImport(String language)
           
 DomainProperty getProperty(String propName)
           
 String getTimeStamp(String minTimeStamp)
           
 String getTimeStampField()
           
protected static int idAsInt(String id)
           
protected static String idAsString(int id)
          Convert int Id to String Id
 void init(int domainId, String initParam, String authenticationServer)
          Initialize the domain driver with the initialization parameter stocked in table This parameter could be a table name or a ressource file name or whatever specified by the domain driver Default : ressource file name
 void initFromProperties(ResourceLocator rs)
          Virtual method that performs extra initialization from a properties file.
 boolean isGroupsInheritProfiles()
           
 boolean isSynchroInProcess()
           
 boolean isSynchroOnLoginEnabled()
           
 boolean isSynchroOnLoginRecursToGroups()
           
 boolean isSynchroThreaded()
           
 boolean isX509CertificateEnabled()
           
 boolean mustImportUsers()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.stratelia.webactiv.beans.admin.DomainDriver
commit, createGroup, createUser, deleteGroup, deleteUser, getAllChangedGroups, getAllChangedUsers, getAllGroups, getAllRootGroups, getAllUsers, getGroup, getGroupByName, getGroupMemberGroupIds, getGroups, getUser, getUserAttributes, getUserFull, getUserMemberGroupIds, getUsersByQuery, getUsersBySpecificProperty, importGroup, importUser, removeGroup, removeUser, resetEncryptedPassword, resetPassword, rollback, startTransaction, synchroGroup, synchroUser, updateGroup, updateUserDetail, updateUserFull
 

Field Detail

domainId

protected int domainId

domainProperties

protected List<DomainProperty> domainProperties

keys

protected String[] keys

m_PropertiesMultilang

protected String m_PropertiesMultilang

m_PropertiesLabels

protected Map<String,HashMap<String,String>> m_PropertiesLabels

m_PropertiesDescriptions

protected Map<String,HashMap<String,String>> m_PropertiesDescriptions

m_mapParameters

protected String[] m_mapParameters

synchroInProcess

protected boolean synchroInProcess

x509Enabled

protected boolean x509Enabled
Constructor Detail

AbstractDomainDriver

public AbstractDomainDriver()
Method Detail

init

public void init(int domainId,
                 String initParam,
                 String authenticationServer)
          throws Exception
Initialize the domain driver with the initialization parameter stocked in table This parameter could be a table name or a ressource file name or whatever specified by the domain driver Default : ressource file name

Specified by:
init in interface DomainDriver
Parameters:
domainId - id of domain
initParam - name of resource file
authenticationServer - name of the authentication server (no more used yet)
Throws:
Exception

getPropertiesNames

public String[] getPropertiesNames()
Specified by:
getPropertiesNames in interface DomainDriver

getProperty

public DomainProperty getProperty(String propName)
Specified by:
getProperty in interface DomainDriver

getMapParameters

public String[] getMapParameters()
Specified by:
getMapParameters in interface DomainDriver

getPropertiesToImport

public List<DomainProperty> getPropertiesToImport(String language)
Specified by:
getPropertiesToImport in interface DomainDriver

addPropertiesToImport

public void addPropertiesToImport(List<DomainProperty> props)
Specified by:
addPropertiesToImport in interface DomainDriver

addPropertiesToImport

public void addPropertiesToImport(List<DomainProperty> props,
                                  Map<String,String> theDescriptions)
Specified by:
addPropertiesToImport in interface DomainDriver
Parameters:
props -
theDescriptions -

getPropertiesLabels

public Map<String,String> getPropertiesLabels(String language)
Specified by:
getPropertiesLabels in interface DomainDriver

getPropertiesDescriptions

public Map<String,String> getPropertiesDescriptions(String language)
Specified by:
getPropertiesDescriptions in interface DomainDriver

initFromProperties

public void initFromProperties(ResourceLocator rs)
                        throws Exception
Virtual method that performs extra initialization from a properties file. To overload by the class who need it.

Specified by:
initFromProperties in interface DomainDriver
Parameters:
rs - name of resource file
Throws:
Exception

getDriverActions

public long getDriverActions()
Called when Admin starts the synchronization

Specified by:
getDriverActions in interface DomainDriver

isSynchroOnLoginEnabled

public boolean isSynchroOnLoginEnabled()
Specified by:
isSynchroOnLoginEnabled in interface DomainDriver

isSynchroThreaded

public boolean isSynchroThreaded()
Specified by:
isSynchroThreaded in interface DomainDriver

isSynchroOnLoginRecursToGroups

public boolean isSynchroOnLoginRecursToGroups()
Specified by:
isSynchroOnLoginRecursToGroups in interface DomainDriver

isGroupsInheritProfiles

public boolean isGroupsInheritProfiles()
Specified by:
isGroupsInheritProfiles in interface DomainDriver

mustImportUsers

public boolean mustImportUsers()
Specified by:
mustImportUsers in interface DomainDriver

getTimeStamp

public String getTimeStamp(String minTimeStamp)
                    throws Exception
Specified by:
getTimeStamp in interface DomainDriver
Throws:
Exception

getTimeStampField

public String getTimeStampField()
                         throws Exception
Specified by:
getTimeStampField in interface DomainDriver
Throws:
Exception

isX509CertificateEnabled

public boolean isX509CertificateEnabled()
Specified by:
isX509CertificateEnabled in interface DomainDriver

beginSynchronization

public void beginSynchronization()
                          throws Exception
Called when Admin starts the synchronization

Specified by:
beginSynchronization in interface DomainDriver
Throws:
Exception

isSynchroInProcess

public boolean isSynchroInProcess()
                           throws Exception
Specified by:
isSynchroInProcess in interface DomainDriver
Throws:
Exception

endSynchronization

public String endSynchronization(boolean cancelSynchro)
                          throws Exception
Called when Admin ends the synchronization

Specified by:
endSynchronization in interface DomainDriver
Parameters:
cancelSynchro - true if the synchronization is cancelled, false if it ends normally
Throws:
Exception

idAsInt

protected static int idAsInt(String id)

idAsString

protected static String idAsString(int id)
Convert int Id to String Id

Parameters:
id - id to convert


Copyright © 2016 Silverpeas. All Rights Reserved.