Class RepositoryGovernanceContext

java.lang.Object
org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceContext
Direct Known Subclasses:
RepositoryGovernanceServiceContext

public abstract class RepositoryGovernanceContext extends Object
RepositoryGovernanceContext provides the archive service with access to information about the archive request along with the open metadata repository interfaces.
  • Field Details

    • userId

      protected String userId
    • requestType

      protected String requestType
    • requestParameters

      protected Map<String,String> requestParameters
  • Constructor Details

    • RepositoryGovernanceContext

      public RepositoryGovernanceContext(String userId, String requestType, Map<String,String> requestParameters, List<RequestSourceElement> requestSourceElements, List<ActionTargetElement> actionTargetElements)
      Constructor sets up the key parameters for processing the request to the governance action service.
      Parameters:
      userId - calling user
      requestType - unique identifier of the asset that the annotations should be attached to
      requestParameters - name-value properties to control the governance action service
      requestSourceElements - metadata elements associated with the request to the governance action service
      actionTargetElements - metadata elements that need to be worked on by the governance action service
  • Method Details

    • getRequestType

      public String getRequestType()
      Return the unique identifier of the asset being discovered.
      Returns:
      string guid
    • getRequestParameters

      public Map<String,String> getRequestParameters()
      Return the properties that hold the parameters used to drive the governance action service's processing.
      Returns:
      property map
    • getRequestSourceElements

      public List<RequestSourceElement> getRequestSourceElements()
      Return the list of metadata elements associated with the request to the governance action service. This list will not change during the lifetime of the service.
      Returns:
      list of request source elements
    • getActionTargetElements

      public List<ActionTargetElement> getActionTargetElements()
      Return the list of elements that this governance action service should work on.
      Returns:
      cached list of action target metadata elements
    • getMetadataCollectionId

      public abstract String getMetadataCollectionId() throws RepositoryErrorException
      Returns the identifier of the metadata repository. This is the identifier used to register the metadata repository with the metadata repository cohort. It is also the identifier used to identify the home repository of a metadata instance.
      Returns:
      String metadata collection id.
      Throws:
      RepositoryErrorException - there is a problem communicating with the metadata repository.
    • registerListener

      Register a listener to receive events about changes to metadata elements in the open metadata repositories.
      Parameters:
      listener - listener object to receive events
      Throws:
      InvalidParameterException - one or more of the type names are unrecognized
      UserNotAuthorizedException - user is not authorized to register a listener
      RepositoryErrorException - the metadata server is not available or in error
      ConnectionCheckedException - the connection to the event topic is in error
      ConnectorCheckedException - the connector to the event topic is in error
    • disconnectFromEnterpriseTopic

      public abstract void disconnectFromEnterpriseTopic() throws ConnectorCheckedException
      Disconnect from the topic connector - events will no longer be passed to the registered listeners.
      Throws:
      ConnectorCheckedException - problem with the topic connector
    • getAllTypes

      Returns the list of different types of metadata organized into two groups. The first are the attribute type definitions (AttributeTypeDefs). These provide types for properties in full type definitions. Full type definitions (TypeDefs) describe types for entities, relationships and classifications.
      Returns:
      TypeDefGallery List of different categories of type definitions.
      Throws:
      InvalidParameterException - the userId is null
      RepositoryErrorException - there is a problem communicating with the metadata repository.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findTypesByName

      Returns a list of type definitions that have the specified name. Type names should be unique. This method allows wildcard character to be included in the name. These are * (asterisk) for an arbitrary string of characters and ampersand for an arbitrary character.
      Parameters:
      name - name of the TypeDefs to return (including wildcard characters).
      Returns:
      TypeDefGallery list.
      Throws:
      InvalidParameterException - the name of the TypeDef is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findTypeDefsByCategory

      Returns all the TypeDefs for a specific category.
      Parameters:
      category - enum value for the category of TypeDef to return.
      Returns:
      TypeDefs list.
      Throws:
      InvalidParameterException - the TypeDefCategory is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findAttributeTypeDefsByCategory

      Returns all the AttributeTypeDefs for a specific category.
      Parameters:
      category - enum value for the category of an AttributeTypeDef to return.
      Returns:
      TypeDefs list.
      Throws:
      InvalidParameterException - the TypeDefCategory is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findTypeDefsByProperty

      public abstract List<TypeDef> findTypeDefsByProperty(TypeDefProperties matchCriteria) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException
      Return the TypeDefs that have the properties matching the supplied match criteria.
      Parameters:
      matchCriteria - TypeDefProperties a list of property names.
      Returns:
      TypeDefs list.
      Throws:
      InvalidParameterException - the matchCriteria is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findTypesByExternalID

      public abstract List<TypeDef> findTypesByExternalID(String standard, String organization, String identifier) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException
      Return the types that are linked to the elements from the specified standard.
      Parameters:
      standard - name of the standard null means any.
      organization - name of the organization null means any.
      identifier - identifier of the element in the standard null means any.
      Returns:
      TypeDefs list each entry in the list contains a typedef. This is a structure describing the TypeDef's category and properties.
      Throws:
      InvalidParameterException - all attributes of the external id are null.
      RepositoryErrorException - there is a problem communicating with the metadata repository.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • searchForTypeDefs

      public abstract List<TypeDef> searchForTypeDefs(String searchCriteria) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException
      Return the TypeDefs that match the search criteria.
      Parameters:
      searchCriteria - String search criteria.
      Returns:
      TypeDefs list each entry in the list contains a typedef. This is a structure describing the TypeDef's category and properties.
      Throws:
      InvalidParameterException - the searchCriteria is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getTypeDefByGUID

      Return the TypeDef identified by the GUID.
      Parameters:
      guid - String unique id of the TypeDef.
      Returns:
      TypeDef structure describing its category and properties.
      Throws:
      InvalidParameterException - the guid is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      TypeDefNotKnownException - The requested TypeDef is not known in the metadata collection.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getAttributeTypeDefByGUID

      Return the AttributeTypeDef identified by the GUID.
      Parameters:
      guid - String unique id of the TypeDef
      Returns:
      TypeDef structure describing its category and properties.
      Throws:
      InvalidParameterException - the guid is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      TypeDefNotKnownException - The requested TypeDef is not known in the metadata collection.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getTypeDefByName

      Return the TypeDef identified by the unique name.
      Parameters:
      name - String name of the TypeDef.
      Returns:
      TypeDef structure describing its category and properties.
      Throws:
      InvalidParameterException - the name is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      TypeDefNotKnownException - the requested TypeDef is not found in the metadata collection.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getAttributeTypeDefByName

      Return the AttributeTypeDef identified by the unique name.
      Parameters:
      name - String name of the TypeDef.
      Returns:
      TypeDef structure describing its category and properties.
      Throws:
      InvalidParameterException - the name is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      TypeDefNotKnownException - the requested TypeDef is not found in the metadata collection.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • isEntityKnown

      Returns the entity if the entity is stored in the metadata collection, otherwise null.
      Parameters:
      guid - String unique identifier for the entity
      Returns:
      the entity details if the entity is found in the metadata collection; otherwise return null
      Throws:
      InvalidParameterException - the guid is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getEntitySummary

      Return the header and classifications for a specific entity. The returned entity summary may be from a full entity object or an entity proxy.
      Parameters:
      guid - String unique identifier for the entity
      Returns:
      EntitySummary structure
      Throws:
      InvalidParameterException - the guid is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      EntityNotKnownException - the requested entity instance is not known in the metadata collection.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getEntityDetail

      Return the header, classifications and properties of a specific entity.
      Parameters:
      guid - String unique identifier for the entity.
      Returns:
      EntityDetail structure.
      Throws:
      InvalidParameterException - the guid is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      EntityNotKnownException - the requested entity instance is not known in the metadata collection.
      EntityProxyOnlyException - the requested entity instance is only a proxy in the metadata collection.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getEntityDetail

      Return a historical version of an entity includes the header, classifications and properties of the entity.
      Parameters:
      guid - String unique identifier for the entity.
      asOfTime - the time used to determine which version of the entity that is desired.
      Returns:
      EntityDetail structure.
      Throws:
      InvalidParameterException - the guid or date is null, or the asOfTime property is for a future time
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      EntityNotKnownException - the requested entity instance is not known in the metadata collection at the time requested.
      EntityProxyOnlyException - the requested entity instance is only a proxy in the metadata collection.
      FunctionNotSupportedException - the repository does not support the asOfTime parameter.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getEntityDetailHistory

      public abstract List<EntityDetail> getEntityDetailHistory(String guid, Date fromTime, Date toTime, int startFromElement, int pageSize, HistorySequencingOrder sequencingOrder) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, EntityProxyOnlyException, FunctionNotSupportedException, UserNotAuthorizedException
      Return all historical versions of an entity within the bounds of the provided timestamps. To retrieve all historical versions of an entity, set both the 'fromTime' and 'toTime' to null.
      Parameters:
      guid - String unique identifier for the entity.
      fromTime - the earliest point in time from which to retrieve historical versions of the entity (inclusive)
      toTime - the latest point in time from which to retrieve historical versions of the entity (exclusive)
      startFromElement - the starting element number of the historical versions to return. This is used when retrieving versions beyond the first page of results. Zero means start from the first element.
      pageSize - the maximum number of result versions that can be returned on this request. Zero means unrestricted return results size.
      sequencingOrder - Enum defining how the results should be ordered.
      Returns:
      List<EntityDetail> of each historical version of the entity detail within the bounds, and in the order requested.
      Throws:
      InvalidParameterException - the guid or date is null or fromTime is after the toTime
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      EntityNotKnownException - the requested entity instance is not known in the metadata collection at the time requested.
      EntityProxyOnlyException - the requested entity instance is only a proxy in the metadata collection.
      FunctionNotSupportedException - the repository does not support history.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getRelationshipsForEntity

      public abstract List<Relationship> getRelationshipsForEntity(String entityGUID, String relationshipTypeGUID, int fromRelationshipElement, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws InvalidParameterException, TypeErrorException, RepositoryErrorException, EntityNotKnownException, PropertyErrorException, PagingErrorException, FunctionNotSupportedException, UserNotAuthorizedException
      Return the relationships for a specific entity.
      Parameters:
      entityGUID - String unique identifier for the entity.
      relationshipTypeGUID - String GUID of the type of relationship required (null for all).
      fromRelationshipElement - the starting element number of the relationships to return. This is used when retrieving elements beyond the first page of results. Zero means start from the first element.
      limitResultsByStatus - By default, relationships in all statuses are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.
      asOfTime - Requests a historical query of the relationships for 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.
      pageSize - -- the maximum number of result classifications that can be returned on this request. Zero means unrestricted return results size.
      Returns:
      Relationships list. Null means no relationships associated with the entity.
      Throws:
      InvalidParameterException - a parameter is invalid or null.
      TypeErrorException - the type guid passed on the request is not known by the metadata collection.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      EntityNotKnownException - the requested entity instance is not known in the metadata collection.
      PropertyErrorException - the sequencing property is not valid for the attached classifications.
      PagingErrorException - the paging/sequencing parameters are set up incorrectly.
      FunctionNotSupportedException - the repository does not support the asOfTime parameter.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findEntities

      public abstract List<EntityDetail> findEntities(String entityTypeGUID, List<String> entitySubtypeGUIDs, SearchProperties matchProperties, int fromEntityElement, List<InstanceStatus> limitResultsByStatus, SearchClassifications matchClassifications, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, PagingErrorException, FunctionNotSupportedException, UserNotAuthorizedException
      Return a list of entities that match the supplied criteria. The results can be returned over many pages.
      Parameters:
      entityTypeGUID - String unique identifier for the entity type of interest (null means any entity type).
      entitySubtypeGUIDs - optional list of the unique identifiers (guids) for subtypes of the entityTypeGUID to include in the search results. Null means all subtypes.
      matchProperties - Optional list of entity property conditions to match.
      fromEntityElement - the starting element number of the entities to return. This is used when retrieving elements beyond the first page of results. Zero means start from the first element.
      limitResultsByStatus - By default, entities in all statuses are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.
      matchClassifications - Optional list of entity classifications to match.
      asOfTime - Requests a historical query of the entity. Null means return the present values.
      sequencingProperty - String name of the entity 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.
      pageSize - the maximum number of result entities that can be returned on this request. Zero means unrestricted return results size.
      Returns:
      a list of entities matching the supplied criteria; null means no matching entities in the metadata collection.
      Throws:
      InvalidParameterException - a parameter is invalid or null.
      TypeErrorException - the type guid passed on the request is not known by the metadata collection.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      PropertyErrorException - the properties specified are not valid for any of the requested types of entity.
      PagingErrorException - the paging/sequencing parameters are set up incorrectly.
      FunctionNotSupportedException - the repository does not support this optional method.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findEntitiesByProperty

      public abstract List<EntityDetail> findEntitiesByProperty(String entityTypeGUID, InstanceProperties matchProperties, MatchCriteria matchCriteria, int fromEntityElement, List<InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, PagingErrorException, FunctionNotSupportedException, UserNotAuthorizedException
      Return a list of entities that match the supplied properties according to the match criteria. The results can be returned over many pages.
      Parameters:
      entityTypeGUID - String unique identifier for the entity type of interest (null means any entity type).
      matchProperties - Optional list of entity properties to match (where any String property's value should be defined as a Java regular expression, even if it should be an exact match).
      matchCriteria - Enum defining how the match properties should be matched to the entities in the repository.
      fromEntityElement - the starting element number of the entities to return. This is used when retrieving elements beyond the first page of results. Zero means start from the first element.
      limitResultsByStatus - By default, entities in all statuses are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.
      limitResultsByClassification - List of classifications that must be present on all returned entities.
      asOfTime - Requests a historical query of the entity. Null means return the present values.
      sequencingProperty - String name of the entity 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.
      pageSize - the maximum number of result entities that can be returned on this request. Zero means unrestricted return results size.
      Returns:
      a list of entities matching the supplied criteria; null means no matching entities in the metadata collection.
      Throws:
      InvalidParameterException - a parameter is invalid or null.
      TypeErrorException - the type guid passed on the request is not known by the metadata collection.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      PropertyErrorException - the properties specified are not valid for any of the requested types of entity.
      PagingErrorException - the paging/sequencing parameters are set up incorrectly.
      FunctionNotSupportedException - the repository does not support one of the provided parameters.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findEntitiesByClassification

      public abstract List<EntityDetail> findEntitiesByClassification(String entityTypeGUID, String classificationName, InstanceProperties matchClassificationProperties, MatchCriteria matchCriteria, int fromEntityElement, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws InvalidParameterException, TypeErrorException, RepositoryErrorException, ClassificationErrorException, PropertyErrorException, PagingErrorException, FunctionNotSupportedException, UserNotAuthorizedException
      Return a list of entities that have the requested type of classifications attached.
      Parameters:
      entityTypeGUID - unique identifier for the type of entity requested. Null means any type of entity (but could be slow so not recommended).
      classificationName - name of the classification, note a null is not valid.
      matchClassificationProperties - list of classification properties used to narrow the search (where any String property's value should be defined as a Java regular expression, even if it should be an exact match).
      matchCriteria - Enum defining how the match properties should be matched to the classifications in the repository.
      fromEntityElement - the starting element number of the entities to return. This is used when retrieving elements beyond the first page of results. Zero means start from the first element.
      limitResultsByStatus - By default, entities in all statuses are returned. However, it is possible to specify a list of statuses (eg 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 entity 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.
      pageSize - the maximum number of result entities that can be returned on this request. Zero means unrestricted return results size.
      Returns:
      a list of entities matching the supplied criteria; null means no matching entities in the metadata collection.
      Throws:
      InvalidParameterException - a parameter is invalid or null.
      TypeErrorException - the type guid passed on the request is not known by the metadata collection.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      ClassificationErrorException - the classification request is not known to the metadata collection.
      PropertyErrorException - the properties specified are not valid for the requested type of classification.
      PagingErrorException - the paging/sequencing parameters are set up incorrectly.
      FunctionNotSupportedException - the repository does not support one of the provided parameters.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findEntitiesByPropertyValue

      public abstract List<EntityDetail> findEntitiesByPropertyValue(String entityTypeGUID, String searchCriteria, int fromEntityElement, List<InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws InvalidParameterException, TypeErrorException, RepositoryErrorException, PropertyErrorException, PagingErrorException, FunctionNotSupportedException, UserNotAuthorizedException
      Return a list of entities whose string based property values match the search criteria. The search criteria may include regex style wild cards.
      Parameters:
      entityTypeGUID - GUID of the type of entity to search for. Null means all types will be searched (could be slow so not recommended).
      searchCriteria - String Java regular expression used to match against any of the String property values within the entities of the supplied type, even if it should be an exact match. (Retrieve all entities of the supplied type if this is either null or an empty string.)
      fromEntityElement - the starting element number of the entities to return. This is used when retrieving elements beyond the first page of results. Zero means start from the first element.
      limitResultsByStatus - By default, entities in all statuses are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.
      limitResultsByClassification - List of classifications that must be present on all returned entities.
      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.
      pageSize - the maximum number of result entities that can be returned on this request. Zero means unrestricted return results size.
      Returns:
      a list of entities matching the supplied criteria null means no matching entities in the metadata collection.
      Throws:
      InvalidParameterException - a parameter is invalid or null.
      TypeErrorException - the type guid passed on the request is not known by the metadata collection.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      PropertyErrorException - the sequencing property specified is not valid for any of the requested types of entity.
      PagingErrorException - the paging/sequencing parameters are set up incorrectly.
      FunctionNotSupportedException - the repository does not support one of the provided parameters.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • isRelationshipKnown

      Returns a boolean indicating if the relationship is stored in the metadata collection.
      Parameters:
      guid - String unique identifier for the relationship.
      Returns:
      relationship details if the relationship is found in the metadata collection; otherwise return null.
      Throws:
      InvalidParameterException - the guid is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getRelationship

      Return a requested relationship.
      Parameters:
      guid - String unique identifier for the relationship.
      Returns:
      a relationship structure.
      Throws:
      InvalidParameterException - the guid is null.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      RelationshipNotKnownException - the metadata collection does not have a relationship with the requested GUID stored.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getRelationship

      Return a historical version of a relationship.
      Parameters:
      guid - String unique identifier for the relationship.
      asOfTime - the time used to determine which version of the entity that is desired.
      Returns:
      Relationship structure.
      Throws:
      InvalidParameterException - the guid or date is null or the asOfTime property is for a future time.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      RelationshipNotKnownException - the requested entity instance is not known in the metadata collection at the time requested.
      FunctionNotSupportedException - the repository does not support the asOfTime parameter.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • getRelationshipHistory

      public abstract List<Relationship> getRelationshipHistory(String guid, Date fromTime, Date toTime, int startFromElement, int pageSize, HistorySequencingOrder sequencingOrder) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException
      Return all historical versions of a relationship within the bounds of the provided timestamps. To retrieve all historical versions of a relationship, set both the 'fromTime' and 'toTime' to null.
      Parameters:
      guid - String unique identifier for the entity.
      fromTime - the earliest point in time from which to retrieve historical versions of the entity (inclusive)
      toTime - the latest point in time from which to retrieve historical versions of the entity (exclusive)
      startFromElement - the starting element number of the historical versions to return. This is used when retrieving versions beyond the first page of results. Zero means start from the first element.
      pageSize - the maximum number of result versions that can be returned on this request. Zero means unrestricted return results size.
      sequencingOrder - Enum defining how the results should be ordered.
      Returns:
      List<Relationship> of each historical version of the relationship within the bounds, and in the order requested.
      Throws:
      InvalidParameterException - the guid or date is null or fromTime is after the toTime
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      RelationshipNotKnownException - the requested relationship instance is not known in the metadata collection at the time requested.
      FunctionNotSupportedException - the repository does not support history.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findRelationships

      public abstract List<Relationship> findRelationships(String relationshipTypeGUID, List<String> relationshipSubtypeGUIDs, SearchProperties matchProperties, int fromRelationshipElement, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws InvalidParameterException, TypeErrorException, RepositoryErrorException, PropertyErrorException, PagingErrorException, FunctionNotSupportedException, UserNotAuthorizedException
      Return a list of relationships that match the requested conditions. The results can be received as a series of pages.
      Parameters:
      relationshipTypeGUID - unique identifier (guid) for the new relationship's type. Null means all types (but may be slow so not recommended).
      relationshipSubtypeGUIDs - optional list of the unique identifiers (guids) for subtypes of the relationshipTypeGUID to include in the search results. Null means all subtypes.
      matchProperties - Optional list of relationship property conditions to match.
      fromRelationshipElement - the starting element number of the entities to return. This is used when retrieving elements beyond the first page of results. Zero means start from the first element.
      limitResultsByStatus - By default, relationships in all statuses are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.
      asOfTime - Requests a historical query of the relationships for 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.
      pageSize - the maximum number of result relationships that can be returned on this request. Zero means unrestricted return results size.
      Returns:
      a list of relationships. Null means no matching relationships.
      Throws:
      InvalidParameterException - one of the parameters is invalid or null.
      TypeErrorException - the type guid passed on the request is not known by the metadata collection.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      PropertyErrorException - the properties specified are not valid for any of the requested types of relationships.
      PagingErrorException - the paging/sequencing parameters are set up incorrectly.
      FunctionNotSupportedException - the repository does not support one of the provided parameters.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findRelationshipsByProperty

      public abstract List<Relationship> findRelationshipsByProperty(String relationshipTypeGUID, InstanceProperties matchProperties, MatchCriteria matchCriteria, int fromRelationshipElement, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws InvalidParameterException, TypeErrorException, RepositoryErrorException, PropertyErrorException, PagingErrorException, FunctionNotSupportedException, UserNotAuthorizedException
      Return a list of relationships that match the requested properties by the matching criteria. The results can be received as a series of pages.
      Parameters:
      relationshipTypeGUID - unique identifier (guid) for the new relationship's type. Null means all types (but may be slow so not recommended).
      matchProperties - Optional list of relationship properties to match (where any String property's value should be defined as a Java regular expression, even if it should be an exact match).
      matchCriteria - Enum defining how the properties should be matched to the relationships in the repository.
      fromRelationshipElement - the starting element number of the entities to return. This is used when retrieving elements beyond the first page of results. Zero means start from the first element.
      limitResultsByStatus - By default, relationships in all statuses are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.
      asOfTime - Requests a historical query of the relationships for 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.
      pageSize - the maximum number of result relationships that can be returned on this request. Zero means unrestricted return results size.
      Returns:
      a list of relationships. Null means no matching relationships.
      Throws:
      InvalidParameterException - one of the parameters is invalid or null.
      TypeErrorException - the type guid passed on the request is not known by the metadata collection.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      PropertyErrorException - the properties specified are not valid for any of the requested types of relationships.
      PagingErrorException - the paging/sequencing parameters are set up incorrectly.
      FunctionNotSupportedException - the repository does not support one of the provided parameters.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • findRelationshipsByPropertyValue

      public abstract List<Relationship> findRelationshipsByPropertyValue(String relationshipTypeGUID, String searchCriteria, int fromRelationshipElement, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws InvalidParameterException, TypeErrorException, RepositoryErrorException, PropertyErrorException, PagingErrorException, FunctionNotSupportedException, UserNotAuthorizedException
      Return a list of relationships whose string based property values match the search criteria. The search criteria may include regex style wild cards.
      Parameters:
      relationshipTypeGUID - GUID of the type of entity to search for. Null means all types will be searched (could be slow so not recommended).
      searchCriteria - String Java regular expression used to match against any of the String property values within the relationships of the supplied type, even if it should be an exact match.
      fromRelationshipElement - Element number of the results to skip to when building the results list to return. Zero means begin at the start of the results. This is used to retrieve the results over a number of pages.
      limitResultsByStatus - By default, relationships in all statuses are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.
      asOfTime - Requests a historical query of the relationships for 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.
      pageSize - the maximum number of result relationships that can be returned on this request. Zero means unrestricted return results size.
      Returns:
      a list of relationships. Null means no matching relationships.
      Throws:
      InvalidParameterException - one of the parameters is invalid or null.
      TypeErrorException - the type guid passed on the request is not known by the metadata collection.
      RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
      PropertyErrorException - there is a problem with one of the other parameters.
      PagingErrorException - the paging/sequencing parameters are set up incorrectly.
      FunctionNotSupportedException - the repository does not support one of the provided parameters.
      UserNotAuthorizedException - the user is not permitted to perform this operation.
    • recordCompletionStatus

      public abstract void recordCompletionStatus(CompletionStatus status, List<String> outputGuards, Map<String,String> newRequestParameters, List<NewActionTarget> newActionTargets, String completionMessage) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Declare that all the processing for the governance action service is finished and the status of the work.
      Parameters:
      status - completion status enum value
      outputGuards - optional guard strings for triggering subsequent action(s)
      newRequestParameters - additional request parameters. These override/augment any request parameters defined for the next invoked service
      newActionTargets - list of action target names to GUIDs for the resulting governance action service
      completionMessage - message to describe completion results or reasons for failure
      Throws:
      InvalidParameterException - the completion status is null
      UserNotAuthorizedException - the governance action service is not authorized to update the governance action service completion status
      PropertyServerException - there is a problem connecting to the metadata store
    • getCompletionStatus

      public abstract CompletionStatus getCompletionStatus()
      Return any completion status from the governance action service.
      Returns:
      completion status enum
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class Object
      Returns:
      print out of variables in a JSON-style