Class ConsumerAgreement


public class ConsumerAgreement extends ShadowAgreement
Consumer agreement object.
Since:
15.0
Author:
mv
  • 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 null
      state - Entry representing the state, can be null if not read
      ds - Isode directory session, must not be null
      Throws:
      ConfigOpFailedException - if mandatory attributes are not loaded
  • Method Details

    • load

      public void load(Entry entry) throws ConfigOpFailedException
      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 class ManagedObject
      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

      public DN getSubtreeReference()
      Get the subtree reference, i.e. destination GDAM.
      Returns:
      Destination GDAM
    • setSubtreeReference

      public void setSubtreeReference(DN refDN)
      Set the destination GDAM.
      Parameters:
      refDN - GDAM DN, which must not be null
    • getSupplierMaster

      public Boolean getSupplierMaster()
      Get the supplier is master flag.
      Returns:
      Supplier is master flag
    • setSupplierMaster

      public void setSupplierMaster(Boolean isSupplierMaster)
      Set the supplier is master flag.
      Parameters:
      isSupplierMaster - Supplier is master flag, null to clear
    • getPermitIncrReplay

      public Boolean getPermitIncrReplay()
      Get the permit increment replay flag.
      Returns:
      Permit incremental replay flag
    • setPermitIncrReplay

      public void setPermitIncrReplay(Boolean permitReplay)
      Set the permit increment replay flag.
      Parameters:
      permitReplay - Permit incremental replay flag, null to clear
    • toString

      public String toString()
      Overrides:
      toString in class ShadowAgreement