Class Configuration.Sync
- java.lang.Object
-
- com.nimbusds.ldapsync.Configuration.Sync
-
- Enclosing class:
- Configuration
public static class Configuration.Sync extends Object
The directory entry synchronisation settings.Property keys: sync.*
-
-
Field Summary
Fields Modifier and Type Field Description AttributeNameMap
attributeMap
Specifies the attributes for upload and their mapping.static boolean
DEFAULT_HALT_ON_EXCEPTION
The default halt on exception policy.static int
DEFAULT_PERIOD
The default synchronisation period, in minutes (4 hours).boolean
haltOnException
Iftrue
the synchronisation task will halt and return immediately if an exception (such as an LDAP error) is encountered during the upload or update of an entry.int
period
The synchronisation period, in minutes.static Pattern
SOURCE_ATTRIBUTE_NAME_PATTERN
Matches the attribute name in a attribute map spec.
-
Constructor Summary
Constructors Constructor Description Sync(Properties props)
Creates a new synchronisation settings instance from the specified properties.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
parseSourceAttributeName(String spec)
Parses a source attribute name from a property value which may include anAttributeValueTransform
spec.
-
-
-
Field Detail
-
period
public final int period
The synchronisation period, in minutes. If set to zero the synchronisation task will be run once only.Property key: sync.period
-
DEFAULT_PERIOD
public static final int DEFAULT_PERIOD
The default synchronisation period, in minutes (4 hours).- See Also:
- Constant Field Values
-
haltOnException
public final boolean haltOnException
Iftrue
the synchronisation task will halt and return immediately if an exception (such as an LDAP error) is encountered during the upload or update of an entry. Iffalse
the task will continue despite such exceptions.Note that this setting doesn't affect the dispatch of
SyncTaskExceptionEvent
s.Property key: sync.haltOnException
-
DEFAULT_HALT_ON_EXCEPTION
public static final boolean DEFAULT_HALT_ON_EXCEPTION
The default halt on exception policy.- See Also:
- Constant Field Values
-
attributeMap
public final AttributeNameMap attributeMap
Specifies the attributes for upload and their mapping.Mapping between attribute names may be required in situations when the source and target directories employ different object classes (schemas) for a particular detail, e.g. name, email or postal address.
The source attributes must be present in the source directory schema and accessible by the configured source directory user. The target attributes must be present in the target directory schema and accessible by the configured target directory user.
Note that the target attributes must include all mandatory ones specified by the object class schema (see
Configuration.TargetDirectory.entryObjectClasses
).Example (target attribute <-> source attribute):
sync.attributeMap.userID=uid sync.attributeMap.fullName=cn sync.attributeMap.surname=sn sync.attributeMap.email=mail sync.attributeMap.mobileTel=mobile sync.attributeMap.userPhoto=jpegPhoto ...
Property keys: sync.attributeMap.* where * is the name of the mapped target attribute.
-
SOURCE_ATTRIBUTE_NAME_PATTERN
public static final Pattern SOURCE_ATTRIBUTE_NAME_PATTERN
Matches the attribute name in a attribute map spec.
-
-
Constructor Detail
-
Sync
public Sync(Properties props) throws com.thetransactioncompany.util.PropertyParseException
Creates a new synchronisation settings instance from the specified properties.- Parameters:
props
- The properties.- Throws:
com.thetransactioncompany.util.PropertyParseException
- On a missing or invalid property.
-
-
Method Detail
-
parseSourceAttributeName
public static String parseSourceAttributeName(String spec)
Parses a source attribute name from a property value which may include anAttributeValueTransform
spec.- Parameters:
spec
- The spec string.- Returns:
- The source attribute name.
-
-