Package com.isode.dsapi.config
Class FailoverAgreement
java.lang.Object
com.isode.dsapi.config.ManagedObject
com.isode.dsapi.config.FailoverAgreement
Failover agreement object. It is intended that no attributes of this class
should be modified.
TODO: it might be sensible to combine stuff in here with that in
ShadowAgreement, since they'll have the same set of fields trac 3031
- Since:
- 15.0
- Author:
- dsm
-
Field Summary
Fields inherited from class com.isode.dsapi.config.ManagedObject
logger
-
Constructor Summary
ConstructorsConstructorDescriptionFailoverAgreement
(Entry entry, IsodeDirectorySession ds, DN gdamDN) Construct from the entry object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
commit()
Override the superclass method with one that always throws a ConfigOpFailedException, since it's never expected that anyone write back this type of entry.getDsaDN()
getID()
int
Determine the value of the last error (if any).Determine the time when the last error was reportedDetermine the time when the last update was reported.void
Populate the fields in this object based on the contents of an Entry.Methods inherited from class com.isode.dsapi.config.ManagedObject
addAttribute, addAttribute, addAttribute, addAttributeValue, addAttributeValue, addEntry, addOC, checkMandatory, checkMandatory, checkMandatory, checkMandatory, commitNoRefresh, createAP, createAttributeType, createDN, createPA, createRDN, createRDN, getAttribute, getAttributeDefaultWhenNull, getDN, getIsodeDirectorySession, getMultiValueBer, getMultiValuedInteger, getMultiValuedInteger, getMultiValuedString, getMultiValuedString, getPA, getValue, getValueAttrTypeFromOID, getValueBer, getValueBoolean, getValueDate, getValueDate, getValueDN, getValueInteger, getValueInteger, getValueString, getValueString, getValueStringFromAttribute, hasAttributeChanged, hasChanges, remove, removeAttr, removeStringValue, reset, reset, updateAttr, updateAttr, updateAttr, updateBoolean, updateDN, updateInteger, updateMultiValuedBER, updateMultiValuedInteger, updateMultiValuedString, updatePA, updatePA, updateString
-
Constructor Details
-
FailoverAgreement
public FailoverAgreement(Entry entry, IsodeDirectorySession ds, DN gdamDN) throws ConfigOpFailedException Construct from the entry object.- Parameters:
entry
- Entry representing the config.ds
- Isode directory sessiongdamDN
- DN of GDAM. Must not be null.- Throws:
ConfigOpFailedException
- if mandatory attributes are not loaded
-
-
Method Details
-
load
Populate the fields in this object based on the contents of an Entry.The original class doc says that "It is intended that no attributes of this class should be modified" which I think means that there are no setters in the class, but it is possible for callers to call this method to refresh the object in line with the current DSA contents.
- Specified by:
load
in classManagedObject
- Parameters:
entry
- Entry representing the object, could be null if the existing entry has to be reloaded- Throws:
ConfigOpFailedException
- if mandatory attributes are not loaded
-
getID
- Returns:
- agreement/GDAM ID, will never be null
-
getGdamDN
- Returns:
- GDAM DN, will never be null
-
getDsaDN
- Returns:
- failover DSA DN, will never be null
-
getLastUpdateTime
Determine the time when the last update was reported.- Returns:
- last update time, which will be null if no update time is reported.
-
getLastErrorTime
Determine the time when the last error was reported- Returns:
- last error time, which will be null if no error time is reported.
-
getLastError
public int getLastError()Determine the value of the last error (if any).- Returns:
- last error, which will be zero if no error has been reported.
-
commit
Override the superclass method with one that always throws a ConfigOpFailedException, since it's never expected that anyone write back this type of entry.- Overrides:
commit
in classManagedObject
- Throws:
ConfigOpFailedException
- alwaysReadFailedException
- never- See Also:
-