Class StandardAgreementService

java.lang.Object
wt.services.StandardManager
wt.access.agreement.StandardAgreementService
All Implemented Interfaces:
Serializable, AgreementService, wt.access.agreement.AgreementServiceSvr, wt.fc._NetFactor, NetFactor, wt.services.Manager

public class StandardAgreementService extends StandardManager implements AgreementService, wt.access.agreement.AgreementServiceSvr
This is the standard implementation of the authorization agreement service interfaces. It is mainly responsible for managing authorization agreements in the system. It also maintains an agreements cache for performance reasons.

Use the newStandardAgreementService static factory method(s), not the StandardAgreementService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
  • Method Details

    • createAuthorizationAgreement

      public ObjectReference createAuthorizationAgreement(AgreementAttributes agreementAttributes, WTCollection authorizedObjects, WTCollection authorizedPrincipals, ObjectReference authorizationDocumentReference) throws WTException, WTPropertyVetoException
      Creates an agreement object based on the required attributes and persists it. This API also associates the related authorized objects, authorized principals, and authorization document.

      The session user must be an agreement manager. The user must also have create permission for agreement objects and read permission for all of the associated authorized objects, principals, and document.

      Supported API: true

      Specified by:
      createAuthorizationAgreement in interface AgreementService
      Parameters:
      agreementAttributes - The attributes to use in creating the agreement. This parameter is required (must not be null).
      authorizedObjects - The authorized objects to associate to this agreement. The WTCollection must contain only SecurityLabeled and/or AgreementAuthorizedObject objects. In order to specify version ranges for authorized objects, an AgreementAuthorizedObject must be used. See the Javadoc for: AgreementAuthorizedObject.newAgreementAuthorizedObject(WTReference,ObjectReference,String,String,Integer,Integer). Duplicates will be ignored. Conflicting version ranges for the same object will result in an AgreementCollectionException. This parameter may be null or empty.
      authorizedPrincipals - The authorized principals to associate to this agreement. The WTCollection must contain only WTGroup and/or WTUser objects. Any duplicates will be ignored. This parameter may be null or empty.
      authorizationDocumentReference - The authorization document to reference for this agreement. The ObjectReference must refer to a WTDocument object. This parameter may be null.
      Returns:
      ObjectReference - A reference to the persisted agreement object
      Throws:
      WTException - If any error occurs while creating and persisting the agreement
      WTPropertyVetoException - If any attributes specified are invalid
    • createAgreement

      @Deprecated public AuthorizationAgreement createAgreement(AgreementAttributes agreementAttributes, WTCollection authorizedObjects, WTCollection authorizedPrincipals, ObjectReference authorizationDocumentReference) throws WTException, WTPropertyVetoException
      Creates an agreement object based on the required attributes and persists it. This API also associates the related authorized objects, authorized principals, and authorization document.

      The session user must be an agreement manager. The user must also have create permission for agreement objects and read permission for all of the associated authorized objects, principals, and document.

      Supported API: true

      Specified by:
      createAgreement in interface AgreementService
      Parameters:
      agreementAttributes - The attributes to use in creating the agreement. This parameter is required (must not be null).
      authorizedObjects - The authorized objects to associate to this agreement. The WTCollection must contain only SecurityLabeled and/or AgreementAuthorizedObject objects. In order to specify version ranges for authorized objects, an AgreementAuthorizedObject must be used. See the Javadoc for: AgreementAuthorizedObject.newAgreementAuthorizedObject(WTReference,ObjectReference,String,String,Integer,Integer). Duplicates will be ignored. Conflicting version ranges for the same object will result in an AgreementCollectionException. This parameter may be null or empty.
      authorizedPrincipals - The authorized principals to associate to this agreement. The WTCollection must contain only WTGroup and/or WTUser objects. Any duplicates will be ignored. This parameter may be null or empty.
      authorizationDocumentReference - The authorization document to reference for this agreement. The ObjectReference must refer to a WTDocument object. This parameter may be null.
      Returns:
      AuthorizationAgreement - The persisted agreement object (null if the session user does not have read permission)
      Throws:
      WTException - If any error occurs while creating and persisting the agreement
      WTPropertyVetoException - If any attributes specified are invalid