org.lsc.beans.syncoptions
Class ForceSyncOptions

java.lang.Object
  extended by org.lsc.beans.syncoptions.ForceSyncOptions
All Implemented Interfaces:
ISyncOptions

public class ForceSyncOptions
extends Object
implements ISyncOptions

Always return a Force status.

Author:
Sebastien Bahloul <seb@lsc-project.org>

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.lsc.beans.syncoptions.ISyncOptions
ISyncOptions.STATUS_TYPE
 
Constructor Summary
ForceSyncOptions()
           
 
Method Summary
 String getCondition(JndiModificationType operation)
          Returns the condition for this operation
 Set<String> getCreateAttributeNames()
          Return the names of attributes to be created.
 String getCreateCondition()
          Returns the condition for a creation
 String getCreateValue(String id, String attributeName)
           
 List<String> getCreateValues(String id, String attributeName)
          Return the create value for a given attribute name.
 String getDefaultValue(String id, String attributeName)
           
 Set<String> getDefaultValuedAttributeNames()
          Return the default valued attributes
 List<String> getDefaultValues(String id, String attributeName)
          Return the default values for a given attribute name.
 String getDeleteCondition()
          Returns the condition for a delete
 String getDn()
          Get the setting to generate a DN
 Set<String> getForceValuedAttributeNames()
          Return the force valued attributes
 List<String> getForceValues(String id, String attributeName)
          Return the force value for a given attribute name.
 String getModrdnCondition()
          Returns the condition for a modrdn
 ISyncOptions.STATUS_TYPE getStatus(String id, String attributeName)
          Analyze the context to get the right synchronization status to apply.
 String getTaskName()
          Get the task name
 String getUpdateCondition()
          Returns the condition for an update
 List<String> getWriteAttributes()
          Get all the attributes that must be written in the destination
 void initialize(String taskname)
          Initialize the synchronization options policy.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForceSyncOptions

public ForceSyncOptions()
Method Detail

getStatus

public final ISyncOptions.STATUS_TYPE getStatus(String id,
                                                String attributeName)
Description copied from interface: ISyncOptions
Analyze the context to get the right synchronization status to apply.

Specified by:
getStatus in interface ISyncOptions
Parameters:
id - the object identifier according to the datasource
attributeName - the attribute name
Returns:
the default or create value

getDefaultValue

public final String getDefaultValue(String id,
                                    String attributeName)

getCreateValue

public final String getCreateValue(String id,
                                   String attributeName)

initialize

public final void initialize(String taskname)
Description copied from interface: ISyncOptions
Initialize the synchronization options policy.

Specified by:
initialize in interface ISyncOptions
Parameters:
taskname - the task name on which applying syncopts

getCreateAttributeNames

public final Set<String> getCreateAttributeNames()
Description copied from interface: ISyncOptions
Return the names of attributes to be created.

Specified by:
getCreateAttributeNames in interface ISyncOptions
Returns:
the created attributes names

getDefaultValuedAttributeNames

public final Set<String> getDefaultValuedAttributeNames()
Description copied from interface: ISyncOptions
Return the default valued attributes

Specified by:
getDefaultValuedAttributeNames in interface ISyncOptions
Returns:
the default valued attributes names

getForceValuedAttributeNames

public Set<String> getForceValuedAttributeNames()
Description copied from interface: ISyncOptions
Return the force valued attributes

Specified by:
getForceValuedAttributeNames in interface ISyncOptions
Returns:
the force valued attributes names

getCreateValues

public List<String> getCreateValues(String id,
                                    String attributeName)
Description copied from interface: ISyncOptions
Return the create value for a given attribute name. The create value replace a missing value in the source datasource only while creating a new entry. For coherence, implementation classes must guarantee that a default value override a create value

Specified by:
getCreateValues in interface ISyncOptions
Parameters:
id - the object identifier according to the datasource
attributeName - the attribute name
Returns:
the create value

getDefaultValues

public List<String> getDefaultValues(String id,
                                     String attributeName)
Description copied from interface: ISyncOptions
Return the default values for a given attribute name. The default values replace a missing value in the source datasource

Specified by:
getDefaultValues in interface ISyncOptions
Parameters:
id - the object identifier according to the datasource
attributeName - the attribute name
Returns:
the default value

getWriteAttributes

public List<String> getWriteAttributes()
Description copied from interface: ISyncOptions
Get all the attributes that must be written in the destination

Specified by:
getWriteAttributes in interface ISyncOptions
Returns:
the attributes to write in the destination

getCreateCondition

public String getCreateCondition()
Description copied from interface: ISyncOptions
Returns the condition for a creation

Specified by:
getCreateCondition in interface ISyncOptions
Returns:
the condition or "true" if none is specified (default)

getDeleteCondition

public String getDeleteCondition()
Description copied from interface: ISyncOptions
Returns the condition for a delete

Specified by:
getDeleteCondition in interface ISyncOptions
Returns:
the condition or "true" if none is specified (default)

getUpdateCondition

public String getUpdateCondition()
Description copied from interface: ISyncOptions
Returns the condition for an update

Specified by:
getUpdateCondition in interface ISyncOptions
Returns:
the condition or "true" if none is specified (default)

getModrdnCondition

public String getModrdnCondition()
Description copied from interface: ISyncOptions
Returns the condition for a modrdn

Specified by:
getModrdnCondition in interface ISyncOptions
Returns:
the condition or "true" if none is specified (default)

getCondition

public String getCondition(JndiModificationType operation)
Description copied from interface: ISyncOptions
Returns the condition for this operation

Specified by:
getCondition in interface ISyncOptions
Parameters:
operation - The operation type
Returns:
the condition or "true" if none is specified (default)

getDn

public String getDn()
Description copied from interface: ISyncOptions
Get the setting to generate a DN

Specified by:
getDn in interface ISyncOptions
Returns:
String The script to generate a DN

getForceValues

public List<String> getForceValues(String id,
                                   String attributeName)
Description copied from interface: ISyncOptions
Return the force value for a given attribute name. The force value forces a value in the desination directory

Specified by:
getForceValues in interface ISyncOptions
Parameters:
id - the object identifier according to the datasource
attributeName - the attribute name
Returns:
the force value

getTaskName

public String getTaskName()
Description copied from interface: ISyncOptions
Get the task name

Specified by:
getTaskName in interface ISyncOptions
Returns:
String The current task name.


Copyright © 2005-2010 LSC project. All Rights Reserved.