java.lang.Object
org.odpi.openmetadata.frameworkservices.omf.client.handlers.CollectionHandler
Direct Known Subclasses:
CollectionsClient

public class CollectionHandler extends Object
The CollectionsClient supports requests related to collections.
  • Constructor Details

    • CollectionHandler

      public CollectionHandler(String localServerName, String serverName, String serverPlatformURLRoot, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) throws InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      localServerName - name of this server (view server)
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      auditLog - logging destination
      accessServiceURLMarker - which access service to call
      serviceName - local service name
      maxPageSize - maximum number of results supported by this server
      Throws:
      InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • CollectionHandler

      public CollectionHandler(String localServerName, String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) throws InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      localServerName - name of this server (view server)
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      maxPageSize - maximum number of results supported by this server
      auditLog - logging destination
      accessServiceURLMarker - which access service to call
      serviceName - local service name
      Throws:
      InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
  • Method Details

    • getAttachedCollections

      public List<CollectionElement> getAttachedCollections(String userId, String parentGUID, String collectionType, TemplateFilter templateFilter, List<ElementStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingProperty, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Returns the list of collections that are linked off of the supplied element.
      Parameters:
      userId - userId of user making request
      parentGUID - unique identifier of referenceable object (typically a personal profile, project or community) that the collections hang off of
      collectionType - filter response by collection type - if null, any value will do
      templateFilter - should templates be returned?
      limitResultsByStatus - control the status of the elements to retrieve - default is everything but Deleted
      asOfTime - repository time to use
      sequencingOrder - order to retrieve results
      sequencingProperty - property to use for sequencing order
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - the retrieved elements are for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      effectiveTime - only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      Returns:
      a list of collections
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • findCollections

      public List<CollectionElement> findCollections(String userId, String classificationName, String searchString, TemplateFilter templateFilter, List<ElementStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingProperty, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Returns the list of collections matching the search string - this is coded as a regular expression.
      Parameters:
      userId - userId of user making request
      classificationName - option name of a collection classification
      searchString - string to search for
      templateFilter - should templates be returned?
      limitResultsByStatus - control the status of the elements to retrieve - default is everything but Deleted
      asOfTime - repository time to use
      sequencingOrder - order to retrieve results
      sequencingProperty - property to use for sequencing order
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - the retrieved elements are for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      effectiveTime - only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      Returns:
      a list of collections
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getCollectionsByName

      public List<CollectionElement> getCollectionsByName(String userId, String classificationName, String name, TemplateFilter templateFilter, List<ElementStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingProperty, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Returns the list of collections with a particular name.
      Parameters:
      userId - userId of user making request
      classificationName - option name of a collection classification
      name - name of the collections to return - match is full text match in qualifiedName or name
      limitResultsByStatus - control the status of the elements to retrieve - default is everything but Deleted
      asOfTime - repository time to use
      sequencingOrder - order to retrieve results
      sequencingProperty - property to use for sequencing order
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - the retrieved elements are for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      effectiveTime - only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      Returns:
      a list of collections
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getCollectionsByType

      public List<CollectionElement> getCollectionsByType(String userId, String classificationName, String collectionType, TemplateFilter templateFilter, List<ElementStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingProperty, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Returns the list of collections with a particular collectionType. This is an optional text field in the collection element.
      Parameters:
      userId - userId of user making request
      classificationName - option name of a collection classification
      collectionType - the collection type value to match on. If it is null, all collections with a null collectionType are returned
      templateFilter - should templates be returned?
      limitResultsByStatus - control the status of the elements to retrieve - default is everything but Deleted
      asOfTime - repository time to use
      sequencingOrder - order to retrieve results
      sequencingProperty - property to use for sequencing order
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - the retrieved elements are for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      effectiveTime - only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      Returns:
      a list of collections
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getCollection

      public CollectionElement getCollection(String userId, String collectionGUID, Date asOfTime, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Return the properties of a specific collection.
      Parameters:
      userId - userId of user making request
      collectionGUID - unique identifier of the required collection
      asOfTime - repository time to use
      forLineage - the retrieved elements are for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      effectiveTime - only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      Returns:
      collection properties
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • createCollection

      public String createCollection(String userId, String anchorGUID, boolean isOwnAnchor, String anchorScopeGUID, String optionalClassification, CollectionProperties properties, ElementStatus initialStatus, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Create a new generic collection.
      Parameters:
      userId - userId of user making request.
      anchorGUID - unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.
      isOwnAnchor - boolean flag to day that the element should be classified as its own anchor once its element is created in the repository.
      anchorScopeGUID - optional scope of the anchor
      optionalClassification - classification of the collections - typically RootCollection, Set or Folder
      properties - properties for the collection.
      initialStatus - initial status for the collection
      parentGUID - unique identifier of optional parent entity
      parentRelationshipTypeName - type of relationship to connect the new element to the parent
      parentRelationshipProperties - properties to include in parent relationship
      parentAtEnd1 - which end should the parent GUID go in the relationship
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Returns:
      unique identifier of the newly created Collection
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • createCollectionFromTemplate

      public String createCollectionFromTemplate(String userId, String anchorGUID, boolean isOwnAnchor, String anchorScopeGUID, Date effectiveFrom, Date effectiveTo, String templateGUID, ElementProperties replacementProperties, Map<String,String> placeholderProperties, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a collection using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new collection.
      Parameters:
      userId - calling user
      anchorGUID - unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.
      isOwnAnchor - boolean flag to day that the element should be classified as its own anchor once its element is created in the repository.
      anchorScopeGUID - optional scope of the anchor
      effectiveFrom - the date when this element is active - null for active on creation
      effectiveTo - the date when this element becomes inactive - null for active until deleted
      templateGUID - the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema connection etc)
      replacementProperties - properties of the new metadata element. These override the template values
      placeholderProperties - property name-to-property value map to replace any placeholder values in the template element - and their anchored elements, which are also copied as part of this operation.
      parentGUID - unique identifier of optional parent entity
      parentRelationshipTypeName - type of relationship to connect the new element to the parent
      parentRelationshipProperties - properties to include in parent relationship
      parentAtEnd1 - which end should the parent GUID go in the relationship
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Returns:
      unique identifier of the new metadata element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • updateCollection

      public void updateCollection(String userId, String collectionGUID, boolean replaceAllProperties, CollectionProperties properties, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Update the properties of a collection.
      Parameters:
      userId - userId of user making request.
      collectionGUID - unique identifier of the collection (returned from create)
      replaceAllProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.
      properties - properties for the collection.
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • updateCollectionStatus

      public void updateCollectionStatus(String userId, String externalSourceGUID, String externalSourceName, String collectionGUID, ElementStatus status, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Update the status of a digital product.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      collectionGUID - unique identifier of the digital product (returned from create)
      status - new status for the element.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getElementStatus

      public ElementStatus getElementStatus(DigitalProductStatus status)
      Return the corresponding element status.
      Parameters:
      status - status that the digital product can be set
      Returns:
      element status
    • getElementStatus

      public ElementStatus getElementStatus(AgreementStatus status)
      Return the corresponding element status.
      Parameters:
      status - status that the agreement can be set
      Returns:
      element status
    • attachCollection

      public void attachCollection(String userId, String externalSourceGUID, String externalSourceName, String collectionGUID, String parentGUID, ResourceListProperties collectionUse, boolean makeAnchor, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Connect an existing collection to an element using the ResourceList relationship (0019).
      Parameters:
      userId - userId of user making request
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      collectionGUID - unique identifier of the collection
      parentGUID - unique identifier of referenceable object that the collection should be attached to
      collectionUse - description of how the collection will be used.
      makeAnchor - like the lifecycle of the collection to that of the parent so that if the parent is deleted, so is the collection
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • detachCollection

      public void detachCollection(String userId, String externalSourceGUID, String externalSourceName, String collectionGUID, String parentGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Detach an existing collection from an element. If the collection is anchored to the element, it is deleted.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      collectionGUID - unique identifier of the collection.
      parentGUID - unique identifier of referenceable object that the collection should be attached to.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • linkDigitalProductDependency

      public void linkDigitalProductDependency(String userId, String externalSourceGUID, String externalSourceName, String consumerDigitalProductGUID, String consumedDigitalProductGUID, DigitalProductDependencyProperties relationshipProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Link two dependent products.
      Parameters:
      userId - userId of user making request
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      consumerDigitalProductGUID - unique identifier of the digital product that has the dependency.
      consumedDigitalProductGUID - unique identifier of the digital product that it is using.
      relationshipProperties - description of the relationship.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • detachDigitalProductDependency

      public void detachDigitalProductDependency(String userId, String externalSourceGUID, String externalSourceName, String consumerDigitalProductGUID, String consumedDigitalProductGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Unlink dependent products.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      consumerDigitalProductGUID - unique identifier of the digital product that has the dependency.
      consumedDigitalProductGUID - unique identifier of the digital product that it is using.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • linkSubscriber

      public void linkSubscriber(String userId, String externalSourceGUID, String externalSourceName, String digitalSubscriberGUID, String digitalSubscriptionGUID, DigitalSubscriberProperties relationshipProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Attach a subscriber to a subscription.
      Parameters:
      userId - userId of user making request
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      digitalSubscriberGUID - unique identifier of the subscriber (referenceable)
      digitalSubscriptionGUID - unique identifier of the digital subscription agreement
      relationshipProperties - description of the relationship.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • detachSubscriber

      public void detachSubscriber(String userId, String externalSourceGUID, String externalSourceName, String digitalSubscriberGUID, String digitalSubscriptionGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Detach a subscriber from a subscription.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      digitalSubscriberGUID - unique identifier of the subscriber (referenceable)
      digitalSubscriptionGUID - unique identifier of the digital subscription agreement
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • linkProductManager

      public void linkProductManager(String userId, String externalSourceGUID, String externalSourceName, String digitalProductGUID, String digitalProductManagerGUID, RelationshipProperties relationshipProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Attach a product manager to a digital product.
      Parameters:
      userId - userId of user making request
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      digitalProductGUID - unique identifier of the digital product
      digitalProductManagerGUID - unique identifier of the product manager role
      relationshipProperties - description of the relationship.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • detachProductManager

      public void detachProductManager(String userId, String externalSourceGUID, String externalSourceName, String digitalProductGUID, String digitalProductManagerGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Detach a product manager from a digital product.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      digitalProductGUID - unique identifier of the digital product
      digitalProductManagerGUID - unique identifier of the product manager role
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • linkAgreementActor

      public String linkAgreementActor(String userId, String externalSourceGUID, String externalSourceName, String agreementGUID, String actorGUID, AgreementActorProperties relationshipProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Attach an actor to an agreement.
      Parameters:
      userId - userId of user making request
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      agreementGUID - unique identifier of the agreement
      actorGUID - unique identifier of the actor
      relationshipProperties - description of the relationship.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Returns:
      unique identifier of the relationship
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • detachAgreementActor

      public void detachAgreementActor(String userId, String externalSourceGUID, String externalSourceName, String agreementActorRelationshipGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Detach an actor from an agreement.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      agreementActorRelationshipGUID - unique identifier of the element being described
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • linkAgreementItem

      public void linkAgreementItem(String userId, String externalSourceGUID, String externalSourceName, String agreementGUID, String agreementItemGUID, AgreementItemProperties relationshipProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Attach an agreement to an element involved in its definition.
      Parameters:
      userId - userId of user making request
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      agreementGUID - unique identifier of the agreement
      agreementItemGUID - unique identifier of the agreement item
      relationshipProperties - description of the relationship.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • detachAgreementItem

      public void detachAgreementItem(String userId, String externalSourceGUID, String externalSourceName, String agreementGUID, String agreementItemGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Detach an agreement from an element involved in its definition.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      agreementGUID - unique identifier of the agreement
      agreementItemGUID - unique identifier of the agreement item
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • linkContract

      public void linkContract(String userId, String externalSourceGUID, String externalSourceName, String agreementGUID, String externalReferenceGUID, ContractLinkProperties relationshipProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Attach an agreement to an external reference element that describes the location of the contract documents.
      Parameters:
      userId - userId of user making request
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      agreementGUID - unique identifier of the agreement
      externalReferenceGUID - unique identifier of the external reference describing the location of the contract
      relationshipProperties - description of the relationship.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • detachContract

      public void detachContract(String userId, String externalSourceGUID, String externalSourceName, String agreementGUID, String externalReferenceGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Detach an agreement from an external reference describing the location of the contract documents.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      agreementGUID - unique identifier of the agreement
      externalReferenceGUID - unique identifier of the external reference describing the location of the contract
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • deleteCollection

      public void deleteCollection(String userId, String collectionGUID, boolean cascadedDelete) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Delete a collection. It is detached from all parent elements. If members are anchored to the collection then they are also deleted.
      Parameters:
      userId - userId of user making request.
      collectionGUID - unique identifier of the collection
      cascadedDelete - should any nested collections be deleted? If false, the delete fails if there are nested collections. If true, nested collections are delete - but not member elements unless they are anchored to the collection
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getCollectionMembers

      public List<CollectionMember> getCollectionMembers(String userId, String collectionGUID, List<ElementStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Return a list of elements that are a member of a collection.
      Parameters:
      userId - userId of user making request.
      collectionGUID - unique identifier of the collection.
      limitResultsByStatus - By default, relationships in all statuses (other than DELETE) are returned. However, it is possible to specify a list of statuses (for example ACTIVE) to restrict the results to. Null means all status values.
      asOfTime - Requests a historical query of the entity. Null means return the present values.
      sequencingProperty - String name of the property that is to be used to sequence the results. Null means do not sequence on a property name (see SequencingOrder).
      sequencingOrder - Enum defining how the results should be ordered.
      forLineage - the retrieved element is for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      effectiveTime - only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of member details
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getCollectionGraph

      public CollectionGraph getCollectionGraph(String userId, String collectionGUID, List<ElementStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Return a graph of elements that are the nested members of a collection along with elements immediately connected to the starting collection. The result includes a mermaid graph of the returned elements.
      Parameters:
      userId - userId of user making request.
      collectionGUID - unique identifier of the collection.
      limitResultsByStatus - By default, relationships in all statuses (other than DELETE) are returned. However, it is possible to specify a list of statuses (for example ACTIVE) to restrict the results to. Null means all status values.
      asOfTime - Requests a historical query of the entity. Null means return the present values.
      sequencingProperty - String name of the property that is to be used to sequence the results. Null means do not sequence on a property name (see SequencingOrder).
      sequencingOrder - Enum defining how the results should be ordered.
      forLineage - the retrieved element is for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      effectiveTime - only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of member details
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • addToCollection

      public void addToCollection(String userId, String collectionGUID, CollectionMembershipProperties membershipProperties, String elementGUID, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Add an element to a collection.
      Parameters:
      userId - userId of user making request.
      collectionGUID - unique identifier of the collection.
      membershipProperties - properties describing the membership characteristics.
      elementGUID - unique identifier of the element.
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      PropertyServerException - there is a problem updating information in the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • updateCollectionMembership

      public void updateCollectionMembership(String userId, String collectionGUID, boolean replaceAllProperties, CollectionMembershipProperties membershipProperties, String elementGUID, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Update an element's membership to a collection.
      Parameters:
      userId - userId of user making request.
      collectionGUID - unique identifier of the collection.
      replaceAllProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.
      membershipProperties - properties describing the membership characteristics.
      elementGUID - unique identifier of the element.
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      PropertyServerException - there is a problem updating information in the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • removeFromCollection

      public void removeFromCollection(String userId, String collectionGUID, String elementGUID, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Remove an element from a collection.
      Parameters:
      userId - userId of user making request.
      collectionGUID - unique identifier of the collection.
      elementGUID - unique identifier of the element.
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      PropertyServerException - there is a problem updating information in the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.