public interface SyncOperation
Modifier and Type | Method and Description |
---|---|
void |
addModifiedDestinationAttribute(java.lang.String attributeName)
Add the name of a destination attribute that should be synchronized.
|
void |
addModifiedSourceAttribute(java.lang.String attributeName)
Add an additional source attribute that should be synchronized to the
destination.
|
java.lang.Object |
getAttachment(java.lang.Object key)
Returns an attachment from the operation that was previously set with a
call to
putAttachment(java.lang.Object, java.lang.Object) . |
ChangeLogEntry |
getChangeLogEntry()
Return the original changelog entry that was detected for this operation.
|
ChangeRecord |
getChangeRecord()
Return the original change record that was detected for this operation.
|
DatabaseChangeRecord |
getDatabaseChangeRecord()
Return the DatabaseChangeRecord that was detected from a RDBMS.
|
Entry |
getDestinationEntryAfterChange()
Returns a representation of the target destination entry after it is
modified or renamed.
|
Entry |
getDestinationEntryBeforeChange()
Returns a representation of the target destination entry before it is
modified or renamed.
|
java.lang.String |
getIdentifiableInfo()
Return a String that can be used to correlate this change back to the
source entry.
|
java.util.Collection<java.lang.String> |
getModifiedSourceAttributes()
Return the names of the attributes that were modified at the source.
|
Entry |
getSourceEntry()
Return the Entry that was fetched from the sync source.
|
SyncClass |
getSyncClass()
Return the
SyncClass for the operation being processed. |
java.lang.String |
getSyncClassName()
Return the name of the Sync Class for the operation being processed.
|
java.lang.String |
getSyncPipeName()
Return the name of the Sync Pipe for the operation being processed.
|
SyncOperationType |
getType()
Return the type of this SynchronizationOperation.
|
UnboundIDChangeLogEntry |
getUnboundIDChangeLogEntry()
Return the original changelog entry that was detected for this operation.
|
java.lang.String |
getUniqueId()
Return a unique ID for this
SyncOperation . |
java.util.List<java.lang.String> |
getWarnings()
Returns a list of warning messages (if any) about this SyncOperation.
|
boolean |
isIgnored()
Get the "ignored" flag.
|
boolean |
isModifyDN()
Determines whether this SyncOperation represents a modify DN operation on
the source entry (if the source is an LDAP directory).
|
void |
logDebug(java.lang.String message)
Logs a debug message to the synchronization log for this change.
|
void |
logError(java.lang.String message)
Logs an error message to the synchronization log for this change.
|
void |
logInfo(java.lang.String message)
Logs an informational message to the synchronization log for this change.
|
void |
putAttachment(java.lang.Object key,
java.lang.Object value)
Stores an attachment in the operation.
|
void |
removeModifiedSourceAttribute(java.lang.String attributeName)
Remove a source attribute that should not be synchronized to the
destination.
|
void |
setIgnored()
Sets the "ignored" flag to true.
|
void |
setSourceEntry(Entry sourceEntry,
boolean isDeletedEntry)
Sets the entry that was fetched from the sync source.
|
SyncOperationType getType()
java.lang.String getIdentifiableInfo()
java.lang.String getUniqueId()
SyncOperation
. This ID is used in
log messages.Entry getSourceEntry()
void setSourceEntry(Entry sourceEntry, boolean isDeletedEntry)
sourceEntry
- The entry that was fetched from the source.isDeletedEntry
- true
if and only if the entry was deleted
at the source.ChangeLogEntry getChangeLogEntry()
Note that this is the raw changelog entry and does not have any mappings or filterings applied to it.
ChangeLogEntry
instance, or null if the source endpoint
does not use an LDAP changelog for change detection.UnboundIDChangeLogEntry getUnboundIDChangeLogEntry()
Note that this is the raw changelog entry and does not have any mappings or filterings applied to it.
UnboundIDChangeLogEntry
instance, or null if the source
endpoint is not a Ping Identity Directory Server.ChangeRecord getChangeRecord()
SyncSource
or
ScriptedSyncSource
extension type.ChangeRecord
instance, or null if the source endpoint
is not an instance of SyncSource
or
ScriptedSyncSource
.DatabaseChangeRecord getDatabaseChangeRecord()
boolean isModifyDN()
Entry getDestinationEntryBeforeChange()
This value is only defined after the SyncOperation has made it past the post-mapping stage in the SyncPipe.
Entry
instance.Entry getDestinationEntryAfterChange()
This value is only defined after the SyncOperation has made it past the post-mapping stage in the SyncPipe.
The returned entry is modifiable and can be used to influence
the final list of modifications to apply at the destination. The
Data Sync Server computes a diff between this entry and the
existing entry returned from the destination. Any modifications to this
entry would have to take place in either
LDAPSyncDestinationPlugin.preFetch
or
LDAPSyncDestinationPlugin.postFetch
.
Entry
instance.java.util.Collection<java.lang.String> getModifiedSourceAttributes()
void addModifiedSourceAttribute(java.lang.String attributeName)
attributeName
- The attribute to add to the set of attributes to
synchronize.void removeModifiedSourceAttribute(java.lang.String attributeName)
attributeName
- The attribute to remove from the set of attributes
to synchronize.void addModifiedDestinationAttribute(java.lang.String attributeName)
attributeName
- The name of the destination attribute to
synchronize.java.lang.String getSyncPipeName()
java.lang.String getSyncClassName()
SyncClass getSyncClass()
SyncClass
for the operation being processed. This can
be used to determine the correlation attributes and other properties
configured for this type of change.void putAttachment(java.lang.Object key, java.lang.Object value)
key
- The key of the attachment. To avoid conflicts, the
fully-qualified class name of the extension should be used
as a prefix of the key.value
- The value of the attachment.java.lang.Object getAttachment(java.lang.Object key)
putAttachment(java.lang.Object, java.lang.Object)
.key
- The key of the attachment.null
if no attachment was
set for the specified key.java.util.List<java.lang.String> getWarnings()
void logError(java.lang.String message)
SyncServerContext
message
- The message to log.void logInfo(java.lang.String message)
SyncServerContext
message
- The message to log.void logDebug(java.lang.String message)
SyncServerContext
. To see messages logged with
this API the Sync Log Publisher should include plugin-debug. For resyncs
pass "--logLevel debug".message
- The message to log.boolean isIgnored()
void setIgnored()