Package com.isode.dsapi.config
Class ConsumerAgreement
java.lang.Object
com.isode.dsapi.config.ManagedObject
com.isode.dsapi.config.ShadowAgreement
com.isode.dsapi.config.ConsumerAgreement
Consumer agreement object.
- Since:
- 15.0
- Author:
- mv
-
Nested Class Summary
Nested classes/interfaces inherited from class com.isode.dsapi.config.ShadowAgreement
ShadowAgreement.ShadowError
-
Field Summary
Fields inherited from class com.isode.dsapi.config.ShadowAgreement
agreementId, agreementVersion, beginTimeStr, isEnabled, isOtherTimes, lastError, lastErrorTime, lastSuccessTime, lastUpdateTime, onChange, peerDsaDN, prefixDN, supplierInitiated, updateInterval, windowSize
Fields inherited from class com.isode.dsapi.config.ManagedObject
logger
-
Constructor Summary
ConstructorsConstructorDescriptionConsumerAgreement
(Entry agreement, Entry state, IsodeDirectorySession ds) Construct from the entry object. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConsumerAgreement
create
(IsodeDirectorySession ds, DN dsaDN, Integer id, Integer version, DN prefixDN, Boolean enabled, DN subtreeDN, Boolean isSuppMaster) Create a basic on change agreement and update DB.Get the permit increment replay flag.Get the subtree reference, i.e.Get the supplier is master flag.void
Load values from an entry.void
setPermitIncrReplay
(Boolean permitReplay) Set the permit increment replay flag.void
setSubtreeReference
(DN refDN) Set the destination GDAM.void
setSupplierMaster
(Boolean isSupplierMaster) Set the supplier is master flag.toString()
Methods inherited from class com.isode.dsapi.config.ShadowAgreement
buildDN, create, forceUpdate, getAgreementID, getAgreementVersion, getBeginTime, getEnabled, getForceNowTime, getOnChange, getOtherTimes, getPeer, getShadowError, getShadowPrefix, getSupplierInitiated, getUpdateInterval, getWindowSize, lastError, lastErrorString, lastErrorTime, lastSuccessTime, lastUpdateTime, loadAgreement, loadState, setAgreementVersion, setBeginTime, setEnabled, setOnChange, setOtherTimes, setSupplierInitiated, setUpdateInterval, setWindowSize
Methods inherited from class com.isode.dsapi.config.ManagedObject
addAttribute, addAttribute, addAttribute, addAttributeValue, addAttributeValue, addEntry, addOC, checkMandatory, checkMandatory, checkMandatory, checkMandatory, commit, 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
-
ConsumerAgreement
public ConsumerAgreement(Entry agreement, Entry state, IsodeDirectorySession ds) throws ConfigOpFailedException Construct from the entry object.- Parameters:
agreement
- Entry representing the agreement, must not be nullstate
- Entry representing the state, can be null if not readds
- Isode directory session, must not be null- Throws:
ConfigOpFailedException
- if mandatory attributes are not loaded
-
-
Method Details
-
load
Description copied from class:ManagedObject
Load values from an entry. No directory operation should be done in this method.Mandatory variables are assigned only after everything is ok. This is done so during re-loading, if there are exceptions and even then the object is used, there is no crash by using mandatory variables that are assumed to have non-null values.
- 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
-
create
public static ConsumerAgreement create(IsodeDirectorySession ds, DN dsaDN, Integer id, Integer version, DN prefixDN, Boolean enabled, DN subtreeDN, Boolean isSuppMaster) throws ConfigOpFailedException, ReadFailedException Create a basic on change agreement and update DB.- Parameters:
ds
- Isode directory session.dsaDN
- DSA DN.id
- Agreement ID.version
- Agreement version.prefixDN
- Prefix DN.enabled
- Enabled flag.subtreeDN
- Subtree reference.isSuppMaster
- Supplier is master flag.- Returns:
- The created consumer agreement.
- Throws:
ReadFailedException
- if there is a problem on reading the committed entry back.ConfigOpFailedException
- if there is any other problem on applying the changes.
-
getSubtreeReference
Get the subtree reference, i.e. destination GDAM.- Returns:
- Destination GDAM
-
setSubtreeReference
Set the destination GDAM.- Parameters:
refDN
- GDAM DN, which must not be null
-
getSupplierMaster
Get the supplier is master flag.- Returns:
- Supplier is master flag
-
setSupplierMaster
Set the supplier is master flag.- Parameters:
isSupplierMaster
- Supplier is master flag, null to clear
-
getPermitIncrReplay
Get the permit increment replay flag.- Returns:
- Permit incremental replay flag
-
setPermitIncrReplay
Set the permit increment replay flag.- Parameters:
permitReplay
- Permit incremental replay flag, null to clear
-
toString
- Overrides:
toString
in classShadowAgreement
-