Class OMRSMetadataCollection
java.lang.Object
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection
- All Implemented Interfaces:
AuditLoggingComponent
- Direct Known Subclasses:
OMRSMetadataCollectionBase
,OMRSRESTMetadataCollection
OMRSMetadataInstanceStore is the common interface for working with the contents of a metadata repository. Within a metadata collection are the type definitions (TypeDefs) and metadata instances (Entities and Relationships). The methods on OMRSMetadataInstanceStore are in the following major groups:
- Methods to retrieve information about the metadata repository - Used to retrieve or confirm the identity of the metadata repository
- Methods for working with typedefs - Typedefs are used to define the type model for open metadata. The open metadata support had a comprehensive set of typedefs implemented, and these can be augmented by different vendors or applications. The typedefs can be queried, created, updated and deleted though the metadata collection.
- Methods for querying Entities and Relationships - The metadata repository stores instances of the typedefs as metadata instances. Principally these are entities (nodes in the graph) and relationships (links between nodes). Both the entities and relationships can have properties. The entity may also have structured properties called classifications attached. This second group of methods supports a range of queries to retrieve these instances.
- Methods for maintaining the instances - The fourth group of methods supports the maintenance of the metadata instances. Each instance as a status (see InstanceStatus) that allows an instance to be proposed, drafted and approved before it becomes active. The instances can also be soft-deleted and restored or purged from the metadata collection.
- Methods for repairing the metadata collections of the cohort - The fifth group of methods are for editing the control information of entities and relationships to manage changes in the cohort. These methods are advanced methods and are rarely used.
- Methods for local maintenance of a metadata collection The final group of methods are for removing reference copies of the metadata instances. These updates are not broadcast to the rest of the Cohort as events.
OMRSEventProcessingContext.addAsyncProcessingResult(java.util.concurrent.Future)
with a Future
that can be used to monitor the status of the processing.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected AuditLog
protected String
protected String
protected OMRSRepositoryConnector
protected OMRSRepositoryHelper
protected String
protected OMRSRepositoryValidator
-
Constructor Summary
ConstructorDescriptionOMRSMetadataCollection
(String metadataCollectionId) Deprecated.OMRSMetadataCollection
(OMRSRepositoryConnector parentConnector, String repositoryName, String metadataCollectionId, OMRSRepositoryHelper repositoryHelper, OMRSRepositoryValidator repositoryValidator) Constructor to save the metadata collection id, repository helper and repository validator. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
addAttributeTypeDef
(String userId, AttributeTypeDef newAttributeTypeDef) Create a definition of a new AttributeTypeDef.abstract EntityDetail
addEntity
(String userId, String entityTypeGUID, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) Create a new entity and put it in the requested state.abstract void
addEntityProxy
(String userId, EntityProxy entityProxy) Create an entity proxy in the metadata collection.addExternalEntity
(String userId, String entityTypeGUID, String externalSourceGUID, String externalSourceName, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) Save a new entity that is sourced from an external technology.addExternalRelationship
(String userId, String relationshipTypeGUID, String externalSourceGUID, String externalSourceName, InstanceProperties initialProperties, String entityOneGUID, String entityTwoGUID, InstanceStatus initialStatus) Save a new relationship that is sourced from an external technology.abstract Relationship
addRelationship
(String userId, String relationshipTypeGUID, InstanceProperties initialProperties, String entityOneGUID, String entityTwoGUID, InstanceStatus initialStatus) Add a new relationship between two entities to the metadata collection.abstract void
addTypeDef
(String userId, TypeDef newTypeDef) Create a definition of a new TypeDef.abstract void
addTypeDefGallery
(String userId, TypeDefGallery newTypes) Create a collection of related types.protected void
basicRequestValidation
(String userId, String methodName) Verify that the repository is valid, active and there is a userId present.classifyEntity
(String userId, String entityGUID, String classificationName, String externalSourceGUID, String externalSourceName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties classificationProperties) Add the requested classification to a specific entity.abstract EntityDetail
classifyEntity
(String userId, String entityGUID, String classificationName, InstanceProperties classificationProperties) Add the requested classification to a specific entity.classifyEntity
(String userId, EntityProxy entityProxy, String classificationName, String externalSourceGUID, String externalSourceName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties classificationProperties) Add the requested classification to a specific entity.classifyEntity
(String userId, EntityProxy entityProxy, String classificationName, InstanceProperties classificationProperties) Add the requested classification to a specific entity.abstract EntityDetail
declassifyEntity
(String userId, String entityGUID, String classificationName) Remove a specific classification from an entity.declassifyEntity
(String userId, EntityProxy entityProxy, String classificationName) Remove a specific classification from an entity.abstract void
deleteAttributeTypeDef
(String userId, String obsoleteTypeDefGUID, String obsoleteTypeDefName) Delete an AttributeTypeDef.abstract EntityDetail
deleteEntity
(String userId, String typeDefGUID, String typeDefName, String obsoleteEntityGUID) Delete an entity.void
deleteEntityReferenceCopy
(String userId, EntityDetail entity) Remove a reference copy of the entity from the local repository.abstract Relationship
deleteRelationship
(String userId, String typeDefGUID, String typeDefName, String obsoleteRelationshipGUID) Delete a specific relationship.void
deleteRelationshipReferenceCopy
(String userId, Relationship relationship) Remove the reference copy of the relationship from the local repository.abstract void
deleteTypeDef
(String userId, String obsoleteTypeDefGUID, String obsoleteTypeDefName) Delete the TypeDef.abstract List<AttributeTypeDef>
findAttributeTypeDefsByCategory
(String userId, AttributeTypeDefCategory category) Returns all the AttributeTypeDefs for a specific category.abstract List<EntityDetail>
findEntities
(String userId, String entityTypeGUID, List<String> entitySubtypeGUIDs, SearchProperties matchProperties, int fromEntityElement, List<InstanceStatus> limitResultsByStatus, SearchClassifications matchClassifications, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) Return a list of entities that match the supplied criteria.abstract List<EntityDetail>
findEntitiesByClassification
(String userId, String entityTypeGUID, String classificationName, InstanceProperties matchClassificationProperties, MatchCriteria matchCriteria, int fromEntityElement, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) Return a list of entities that have the requested type of classifications attached.abstract List<EntityDetail>
findEntitiesByProperty
(String userId, String entityTypeGUID, InstanceProperties matchProperties, MatchCriteria matchCriteria, int fromEntityElement, List<InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) Return a list of entities that match the supplied properties according to the match criteria.abstract List<EntityDetail>
findEntitiesByPropertyValue
(String userId, String entityTypeGUID, String searchCriteria, int fromEntityElement, List<InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) Return a list of entities whose string based property values match the search criteria.abstract List<Relationship>
findRelationships
(String userId, String relationshipTypeGUID, List<String> relationshipSubtypeGUIDs, SearchProperties matchProperties, int fromRelationshipElement, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) Return a list of relationships that match the requested conditions.abstract List<Relationship>
findRelationshipsByProperty
(String userId, String relationshipTypeGUID, InstanceProperties matchProperties, MatchCriteria matchCriteria, int fromRelationshipElement, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) Return a list of relationships that match the requested properties by the matching criteria.abstract List<Relationship>
findRelationshipsByPropertyValue
(String userId, String relationshipTypeGUID, String searchCriteria, int fromRelationshipElement, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) Return a list of relationships whose string based property values match the search criteria.findTypeDefsByCategory
(String userId, TypeDefCategory category) Returns all the TypeDefs for a specific category.findTypeDefsByProperty
(String userId, TypeDefProperties matchCriteria) Return the TypeDefs that have the properties matching the supplied match criteria.findTypesByExternalID
(String userId, String standard, String organization, String identifier) Return the types that are linked to the elements from the specified standard.abstract TypeDefGallery
findTypesByName
(String userId, String name) Returns a list of type definitions that have the specified name.abstract TypeDefGallery
getAllTypes
(String userId) Returns the list of different types of metadata organized into two groups.abstract AttributeTypeDef
getAttributeTypeDefByGUID
(String userId, String guid) Return the AttributeTypeDef identified by the GUID.abstract AttributeTypeDef
getAttributeTypeDefByName
(String userId, String name) Return the AttributeTypeDef identified by the unique name.Return the component description that is used by this connector in the audit log.abstract EntityDetail
getEntityDetail
(String userId, String guid) Return the header, classifications and properties of a specific entity.abstract EntityDetail
getEntityDetail
(String userId, String guid, Date asOfTime) Return a historical version of an entity.abstract List<EntityDetail>
getEntityDetailHistory
(String userId, String guid, Date fromTime, Date toTime, int startFromElement, int pageSize, HistorySequencingOrder sequencingOrder) Return all historical versions of an entity within the bounds of the provided timestamps.abstract InstanceGraph
getEntityNeighborhood
(String userId, String entityGUID, List<String> entityTypeGUIDs, List<String> relationshipTypeGUIDs, List<InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, Date asOfTime, int level) Return the entities and relationships that radiate out from the supplied entity GUID.abstract EntitySummary
getEntitySummary
(String userId, String guid) Return the header and classifications for a specific entity.getHomeClassifications
(String userId, String entityGUID) Retrieve any locally homed classifications assigned to the requested entity.getHomeClassifications
(String userId, String entityGUID, Date asOfTime) Retrieve any locally homed classifications assigned to the requested entity.abstract InstanceGraph
getLinkingEntities
(String userId, String startEntityGUID, String endEntityGUID, List<InstanceStatus> limitResultsByStatus, Date asOfTime) Return all the relationships and intermediate entities that connect the startEntity with the endEntity.Deprecated.getMetadataCollectionId
(String userId) Returns the identifier of the metadata repository.abstract List<EntityDetail>
getRelatedEntities
(String userId, String startEntityGUID, List<String> entityTypeGUIDs, int fromEntityElement, List<InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) Return the list of entities that are of the types listed in entityTypeGUIDs and are connected, either directly or indirectly to the entity identified by startEntityGUID.abstract Relationship
getRelationship
(String userId, String guid) Return the current version of a requested relationship.abstract Relationship
getRelationship
(String userId, String guid, Date asOfTime) Return a historical version of a relationship.abstract List<Relationship>
getRelationshipHistory
(String userId, String guid, Date fromTime, Date toTime, int startFromElement, int pageSize, HistorySequencingOrder sequencingOrder) Return all historical versions of a relationship within the bounds of the provided timestamps.abstract List<Relationship>
getRelationshipsForEntity
(String userId, String entityGUID, String relationshipTypeGUID, int fromRelationshipElement, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) Return the relationships for a specific entity.abstract TypeDef
getTypeDefByGUID
(String userId, String guid) Return the TypeDef identified by the GUID.abstract TypeDef
getTypeDefByName
(String userId, String name) Return the TypeDef identified by the unique name.abstract EntityDetail
isEntityKnown
(String userId, String guid) Returns the entity if the entity is stored in the metadata collection, otherwise null.abstract Relationship
isRelationshipKnown
(String userId, String guid) Returns a relationship indicating if the relationship is stored in the metadata collection.void
purgeClassificationReferenceCopy
(String userId, EntityDetail entity, Classification classification) Remove the reference copy of the classification from the local repository.void
purgeClassificationReferenceCopy
(String userId, EntityProxy entity, Classification classification) Remove the reference copy of the classification from the local repository.abstract void
purgeEntity
(String userId, String typeDefGUID, String typeDefName, String deletedEntityGUID) Permanently removes a deleted entity from the metadata collection.abstract void
purgeEntityReferenceCopy
(String userId, String entityGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId) Remove a reference copy of the entity from the local repository.void
purgeEntityReferenceCopy
(String userId, EntityDetail entity) Remove a reference copy of the entity from the local repository.abstract void
purgeRelationship
(String userId, String typeDefGUID, String typeDefName, String deletedRelationshipGUID) Permanently delete the relationship from the repository.abstract void
purgeRelationshipReferenceCopy
(String userId, String relationshipGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId) Typically this method is called when a remote repository calls Remove the reference copy of the relationship from the local repository.void
purgeRelationshipReferenceCopy
(String userId, Relationship relationship) This method is called when a remote repository calls the variant of purgeRelationship that passes the relationship object.abstract void
refreshEntityReferenceCopy
(String userId, String entityGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId) The local repository has requested that the repository that hosts the home metadata collection for the specified entity sends out the details of this entity so the local repository can create a reference copy.abstract void
refreshRelationshipReferenceCopy
(String userId, String relationshipGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId) The local server has requested that the repository that hosts the home metadata collection for the specified relationship sends out the details of this relationship so the local repository can create a reference copy.reHomeEntity
(String userId, String entityGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId) Deprecated.reHomeEntity
(String userId, String entityGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Change the home of an existing entity.reHomeRelationship
(String userId, String relationshipGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId) Deprecated.reHomeRelationship
(String userId, String relationshipGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Change the home of an existing relationship.abstract AttributeTypeDef
reIdentifyAttributeTypeDef
(String userId, String originalAttributeTypeDefGUID, String originalAttributeTypeDefName, String newAttributeTypeDefGUID, String newAttributeTypeDefName) Change the guid or name of an existing TypeDef to a new value.abstract EntityDetail
reIdentifyEntity
(String userId, String typeDefGUID, String typeDefName, String entityGUID, String newEntityGUID) Change the guid of an existing entity to a new value.abstract Relationship
reIdentifyRelationship
(String userId, String typeDefGUID, String typeDefName, String relationshipGUID, String newRelationshipGUID) Change the guid of an existing relationship.abstract TypeDef
reIdentifyTypeDef
(String userId, String originalTypeDefGUID, String originalTypeDefName, String newTypeDefGUID, String newTypeDefName) Change the guid or name of an existing TypeDef to a new value.protected void
reportUnsupportedOptionalFunction
(String methodName) Return an exception to indicate that the method is unsupported but this is ok because it is optional.abstract EntityDetail
restoreEntity
(String userId, String deletedEntityGUID) Restore the requested entity to the state it was before it was deleted.abstract Relationship
restoreRelationship
(String userId, String deletedRelationshipGUID) Restore a deleted relationship into the metadata collection.abstract EntityDetail
reTypeEntity
(String userId, String entityGUID, TypeDefSummary currentTypeDefSummary, TypeDefSummary newTypeDefSummary) Change the existing entity's type.abstract Relationship
reTypeRelationship
(String userId, String relationshipGUID, TypeDefSummary currentTypeDefSummary, TypeDefSummary newTypeDefSummary) Change the existing relationship's type.void
saveClassificationReferenceCopy
(String userId, EntityDetail entity, Classification classification) Save the classification as a reference copy.void
saveClassificationReferenceCopy
(String userId, EntityProxy entity, Classification classification) Save the classification as a reference copy.abstract void
saveEntityReferenceCopy
(String userId, EntityDetail entity) Save the entity as a reference copy.void
saveInstanceReferenceCopies
(String userId, InstanceGraph instances) Save the entities and relationships supplied in the instance graph as a reference copies.abstract void
saveRelationshipReferenceCopy
(String userId, Relationship relationship) Save the relationship as a reference copy.searchForTypeDefs
(String userId, String searchCriteria) Return the TypeDefs that match the search criteria.void
setAuditLog
(AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.abstract EntityDetail
undoEntityUpdate
(String userId, String entityGUID) Undo the last update to an entity and return the previous content.abstract Relationship
undoRelationshipUpdate
(String userId, String relationshipGUID) Undo the latest change to a relationship (either a change of properties or status).abstract EntityDetail
updateEntityClassification
(String userId, String entityGUID, String classificationName, InstanceProperties properties) Update one or more properties in one of an entity's classifications.updateEntityClassification
(String userId, EntityProxy entityProxy, String classificationName, InstanceProperties properties) Update one or more properties in one of an entity's classifications.abstract EntityDetail
updateEntityProperties
(String userId, String entityGUID, InstanceProperties properties) Update selected properties in an entity.abstract EntityDetail
updateEntityStatus
(String userId, String entityGUID, InstanceStatus newStatus) Update the status for a specific entity.abstract Relationship
updateRelationshipProperties
(String userId, String relationshipGUID, InstanceProperties properties) Update the properties of a specific relationship.abstract Relationship
updateRelationshipStatus
(String userId, String relationshipGUID, InstanceStatus newStatus) Update the status of a specific relationship.abstract TypeDef
updateTypeDef
(String userId, TypeDefPatch typeDefPatch) Update one or more properties of the TypeDef.void
validateRepositoryConnector
(String methodName) Verify that a metadata collection is operating with a parent connector.abstract boolean
verifyAttributeTypeDef
(String userId, AttributeTypeDef attributeTypeDef) Verify that a definition of an AttributeTypeDef is either new or matches the definition already stored.abstract boolean
verifyTypeDef
(String userId, TypeDef typeDef) Verify that a definition of a TypeDef is either new or matches the definition already stored.
-
Field Details
-
metadataCollectionId
-
metadataCollectionName
-
repositoryHelper
-
repositoryValidator
-
parentConnector
-
repositoryName
-
auditLog
-
-
Constructor Details
-
OMRSMetadataCollection
Deprecated.Constructor to save the metadata collection id.- Parameters:
metadataCollectionId
- unique identifier for the metadata collection
-
OMRSMetadataCollection
public OMRSMetadataCollection(OMRSRepositoryConnector parentConnector, String repositoryName, String metadataCollectionId, OMRSRepositoryHelper repositoryHelper, OMRSRepositoryValidator repositoryValidator) Constructor to save the metadata collection id, repository helper and repository validator.- Parameters:
parentConnector
- connector that this metadata collection supports. The connector has the information to call the metadata repository.repositoryName
- name of this repository.repositoryHelper
- helper class for building types and instancesrepositoryValidator
- validator class for checking open metadata repository objects and parameters.metadataCollectionId
- unique identifier for the metadata collection
-
-
Method Details
-
setAuditLog
Receive an audit log object that can be used to record audit log messages. The caller has initialized it with the correct component description and log destinations.- Specified by:
setAuditLog
in interfaceAuditLoggingComponent
- Parameters:
auditLog
- audit log object
-
getConnectorComponentDescription
Return the component description that is used by this connector in the audit log.- Specified by:
getConnectorComponentDescription
in interfaceAuditLoggingComponent
- Returns:
- id, name, description, wiki page URL.
-
validateRepositoryConnector
Verify that a metadata collection is operating with a parent connector. This should always be the case but if the metadata collection is being consumed in an unorthodox manner then this exception will catch it.- Parameters:
methodName
- name of method called- Throws:
RepositoryErrorException
- null repository connector
-
basicRequestValidation
protected void basicRequestValidation(String userId, String methodName) throws InvalidParameterException, RepositoryErrorException Verify that the repository is valid, active and there is a userId present.- Parameters:
userId
- calling usermethodName
- calling method- Throws:
InvalidParameterException
- userId is invalidRepositoryErrorException
- repository is not valid or active
-
getMetadataCollectionId
Deprecated.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. This request has been deprecated because it does not work in a server without security (no userId) and to open up a secured server to allow requests without userIds is not a good idea.- Returns:
- String metadata collection id.
- Throws:
RepositoryErrorException
- there is a problem communicating with the metadata repository.
-
getMetadataCollectionId
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.- Parameters:
userId
- calling user- Returns:
- String metadata collection id.
- Throws:
RepositoryErrorException
- there is a problem communicating with the metadata repository.
-
getAllTypes
public abstract TypeDefGallery getAllTypes(String userId) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException 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.- Parameters:
userId
- unique identifier for requesting user.- Returns:
- TypeDefGallery List of different categories of type definitions.
- Throws:
InvalidParameterException
- the userId is nullRepositoryErrorException
- there is a problem communicating with the metadata repository.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
findTypesByName
public abstract TypeDefGallery findTypesByName(String userId, String name) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException 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:
userId
- unique identifier for requesting user.name
- name of the TypeDefs to return (including wildcard characters).- Returns:
- TypeDefGallery List of different categories of type definitions.
- Throws:
InvalidParameterException
- the name of the TypeDef is null.RepositoryErrorException
- there is a problem communicating with the metadata repository.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
findTypeDefsByCategory
public abstract List<TypeDef> findTypeDefsByCategory(String userId, TypeDefCategory category) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException Returns all the TypeDefs for a specific category.- Parameters:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
findAttributeTypeDefsByCategory
public abstract List<AttributeTypeDef> findAttributeTypeDefsByCategory(String userId, AttributeTypeDefCategory category) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException Returns all the AttributeTypeDefs for a specific category.- Parameters:
userId
- unique identifier for requesting user.category
- enum value for the category of an AttributeTypeDef to return.- Returns:
- AttributeTypeDefs list.
- Throws:
InvalidParameterException
- the TypeDefCategory is null.RepositoryErrorException
- there is a problem communicating with the metadata repository.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
findTypeDefsByProperty
public abstract List<TypeDef> findTypeDefsByProperty(String userId, TypeDefProperties matchCriteria) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException Return the TypeDefs that have the properties matching the supplied match criteria.- Parameters:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
findTypesByExternalID
public abstract List<TypeDef> findTypesByExternalID(String userId, String standard, String organization, String identifier) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException Return the types that are linked to the elements from the specified standard.- Parameters:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
searchForTypeDefs
public abstract List<TypeDef> searchForTypeDefs(String userId, String searchCriteria) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException Return the TypeDefs that match the search criteria.- Parameters:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
getTypeDefByGUID
public abstract TypeDef getTypeDefByGUID(String userId, String guid) throws InvalidParameterException, RepositoryErrorException, TypeDefNotKnownException, UserNotAuthorizedException Return the TypeDef identified by the GUID.- Parameters:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
getAttributeTypeDefByGUID
public abstract AttributeTypeDef getAttributeTypeDefByGUID(String userId, String guid) throws InvalidParameterException, RepositoryErrorException, TypeDefNotKnownException, UserNotAuthorizedException Return the AttributeTypeDef identified by the GUID.- Parameters:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
getTypeDefByName
public abstract TypeDef getTypeDefByName(String userId, String name) throws InvalidParameterException, RepositoryErrorException, TypeDefNotKnownException, UserNotAuthorizedException Return the TypeDef identified by the unique name.- Parameters:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
getAttributeTypeDefByName
public abstract AttributeTypeDef getAttributeTypeDefByName(String userId, String name) throws InvalidParameterException, RepositoryErrorException, TypeDefNotKnownException, UserNotAuthorizedException Return the AttributeTypeDef identified by the unique name.- Parameters:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
addTypeDefGallery
public abstract void addTypeDefGallery(String userId, TypeDefGallery newTypes) throws InvalidParameterException, RepositoryErrorException, TypeDefNotSupportedException, TypeDefKnownException, TypeDefConflictException, InvalidTypeDefException, FunctionNotSupportedException, UserNotAuthorizedException Create a collection of related types.- Parameters:
userId
- unique identifier for requesting user.newTypes
- TypeDefGalleryResponse structure describing the new AttributeTypeDefs and TypeDefs.- Throws:
InvalidParameterException
- the new TypeDef is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeDefNotSupportedException
- the repository is not able to support this TypeDef.TypeDefKnownException
- the TypeDef is already stored in the repository.TypeDefConflictException
- the new TypeDef conflicts with an existing TypeDef.InvalidTypeDefException
- the new TypeDef has invalid contents.FunctionNotSupportedException
- the repository does not support this call.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
addTypeDef
public abstract void addTypeDef(String userId, TypeDef newTypeDef) throws InvalidParameterException, RepositoryErrorException, TypeDefNotSupportedException, TypeDefKnownException, TypeDefConflictException, InvalidTypeDefException, FunctionNotSupportedException, UserNotAuthorizedException Create a definition of a new TypeDef.- Parameters:
userId
- unique identifier for requesting user.newTypeDef
- TypeDef structure describing the new TypeDef.- Throws:
InvalidParameterException
- the new TypeDef is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeDefNotSupportedException
- the repository is not able to support this TypeDef.TypeDefKnownException
- the TypeDef is already stored in the repository.TypeDefConflictException
- the new TypeDef conflicts with an existing TypeDef.InvalidTypeDefException
- the new TypeDef has invalid contents.FunctionNotSupportedException
- the repository does not support this call.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
addAttributeTypeDef
public abstract void addAttributeTypeDef(String userId, AttributeTypeDef newAttributeTypeDef) throws InvalidParameterException, RepositoryErrorException, TypeDefNotSupportedException, TypeDefKnownException, TypeDefConflictException, InvalidTypeDefException, FunctionNotSupportedException, UserNotAuthorizedException Create a definition of a new AttributeTypeDef.- Parameters:
userId
- unique identifier for requesting user.newAttributeTypeDef
- TypeDef structure describing the new TypeDef.- Throws:
InvalidParameterException
- the new TypeDef is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeDefNotSupportedException
- the repository is not able to support this TypeDef.TypeDefKnownException
- the TypeDef is already stored in the repository.TypeDefConflictException
- the new TypeDef conflicts with an existing TypeDef.InvalidTypeDefException
- the new TypeDef has invalid contents.FunctionNotSupportedException
- the repository does not support this call.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
verifyTypeDef
public abstract boolean verifyTypeDef(String userId, TypeDef typeDef) throws InvalidParameterException, RepositoryErrorException, TypeDefNotSupportedException, TypeDefConflictException, InvalidTypeDefException, UserNotAuthorizedException Verify that a definition of a TypeDef is either new or matches the definition already stored.- Parameters:
userId
- unique identifier for requesting user.typeDef
- TypeDef structure describing the TypeDef to test.- Returns:
- boolean true means the TypeDef matches the local definition; false means the TypeDef is not known.
- Throws:
InvalidParameterException
- the TypeDef is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeDefNotSupportedException
- the repository is not able to support this TypeDef.TypeDefConflictException
- the new TypeDef conflicts with an existing TypeDef.InvalidTypeDefException
- the new TypeDef has invalid contents.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
verifyAttributeTypeDef
public abstract boolean verifyAttributeTypeDef(String userId, AttributeTypeDef attributeTypeDef) throws InvalidParameterException, RepositoryErrorException, TypeDefNotSupportedException, TypeDefConflictException, InvalidTypeDefException, UserNotAuthorizedException Verify that a definition of an AttributeTypeDef is either new or matches the definition already stored.- Parameters:
userId
- unique identifier for requesting user.attributeTypeDef
- TypeDef structure describing the TypeDef to test.- Returns:
- boolean where true means the TypeDef matches the local definition; false means the TypeDef is not known.
- Throws:
InvalidParameterException
- the TypeDef is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeDefNotSupportedException
- the repository is not able to support this TypeDef.TypeDefConflictException
- the new TypeDef conflicts with an existing TypeDef.InvalidTypeDefException
- the new TypeDef has invalid contents.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
updateTypeDef
public abstract TypeDef updateTypeDef(String userId, TypeDefPatch typeDefPatch) throws InvalidParameterException, RepositoryErrorException, TypeDefNotKnownException, PatchErrorException, FunctionNotSupportedException, UserNotAuthorizedException Update one or more properties of the TypeDef. The TypeDefPatch controls what types of updates are safe to make to the TypeDef.- Parameters:
userId
- unique identifier for requesting user.typeDefPatch
- TypeDef patch describing change to TypeDef.- Returns:
- updated TypeDef
- Throws:
InvalidParameterException
- the TypeDefPatch 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.PatchErrorException
- the TypeDef can not be updated because the supplied patch is incompatible with the stored TypeDef.FunctionNotSupportedException
- the repository does not support this call.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
deleteTypeDef
public abstract void deleteTypeDef(String userId, String obsoleteTypeDefGUID, String obsoleteTypeDefName) throws InvalidParameterException, RepositoryErrorException, TypeDefNotKnownException, TypeDefInUseException, FunctionNotSupportedException, UserNotAuthorizedException Delete the TypeDef. This is only possible if the TypeDef has never been used to create instances or any instances of this TypeDef have been purged from the metadata collection.- Parameters:
userId
- unique identifier for requesting user.obsoleteTypeDefGUID
- String unique identifier for the TypeDef.obsoleteTypeDefName
- String unique name for the TypeDef.- Throws:
InvalidParameterException
- the one of TypeDef identifiers 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.TypeDefInUseException
- the TypeDef can not be deleted because there are instances of this type in the metadata collection. These instances need to be purged before the TypeDef can be deleted.FunctionNotSupportedException
- the repository does not support this call.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
deleteAttributeTypeDef
public abstract void deleteAttributeTypeDef(String userId, String obsoleteTypeDefGUID, String obsoleteTypeDefName) throws InvalidParameterException, RepositoryErrorException, TypeDefNotKnownException, TypeDefInUseException, FunctionNotSupportedException, UserNotAuthorizedException Delete an AttributeTypeDef. This is only possible if the AttributeTypeDef has never been used to create instances or any instances of this AttributeTypeDef have been purged from the metadata collection.- Parameters:
userId
- unique identifier for requesting user.obsoleteTypeDefGUID
- String unique identifier for the AttributeTypeDef.obsoleteTypeDefName
- String unique name for the AttributeTypeDef.- Throws:
InvalidParameterException
- the one of AttributeTypeDef identifiers is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeDefNotKnownException
- the requested AttributeTypeDef is not found in the metadata collection.TypeDefInUseException
- the AttributeTypeDef can not be deleted because there are instances of this type in the metadata collection. These instances need to be purged before the AttributeTypeDef can be deleted.FunctionNotSupportedException
- the repository does not support this call.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
reIdentifyTypeDef
public abstract TypeDef reIdentifyTypeDef(String userId, String originalTypeDefGUID, String originalTypeDefName, String newTypeDefGUID, String newTypeDefName) throws InvalidParameterException, RepositoryErrorException, TypeDefNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Change the guid or name of an existing TypeDef to a new value. This is used if two different TypeDefs are discovered to have the same guid. This is extremely unlikely but not impossible so the open metadata protocol has provision for this.- Parameters:
userId
- unique identifier for requesting user.originalTypeDefGUID
- the original guid of the TypeDef.originalTypeDefName
- the original name of the TypeDef.newTypeDefGUID
- the new identifier for the TypeDef.newTypeDefName
- new name for this TypeDef.- Returns:
- typeDef new values for this TypeDef, including the new guid/name.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeDefNotKnownException
- the TypeDef identified by the original guid/name is not found in the metadata collection.FunctionNotSupportedException
- the repository does not support this call.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
reIdentifyAttributeTypeDef
public abstract AttributeTypeDef reIdentifyAttributeTypeDef(String userId, String originalAttributeTypeDefGUID, String originalAttributeTypeDefName, String newAttributeTypeDefGUID, String newAttributeTypeDefName) throws InvalidParameterException, RepositoryErrorException, TypeDefNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Change the guid or name of an existing TypeDef to a new value. This is used if two different TypeDefs are discovered to have the same guid. This is extremely unlikely but not impossible so the open metadata protocol has provision for this.- Parameters:
userId
- unique identifier for requesting user.originalAttributeTypeDefGUID
- the original guid of the AttributeTypeDef.originalAttributeTypeDefName
- the original name of the AttributeTypeDef.newAttributeTypeDefGUID
- the new identifier for the AttributeTypeDef.newAttributeTypeDefName
- new name for this AttributeTypeDef.- Returns:
- attributeTypeDef contains new values for this AttributeTypeDef, including the new guid/name.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeDefNotKnownException
- the AttributeTypeDef identified by the original guid/name is not found in the metadata collection.FunctionNotSupportedException
- the repository does not support this call.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
isEntityKnown
public abstract EntityDetail isEntityKnown(String userId, String guid) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException Returns the entity if the entity is stored in the metadata collection, otherwise null. Notice that entities in DELETED state are returned by this call.- Parameters:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
getEntitySummary
public abstract EntitySummary getEntitySummary(String userId, String guid) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, UserNotAuthorizedException 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:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
getEntityDetail
public abstract EntityDetail getEntityDetail(String userId, String guid) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, EntityProxyOnlyException, UserNotAuthorizedException Return the header, classifications and properties of a specific entity. This requires the full entity object to be available.- Parameters:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
getEntityDetail
public abstract EntityDetail getEntityDetail(String userId, String guid, Date asOfTime) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, EntityProxyOnlyException, FunctionNotSupportedException, UserNotAuthorizedException Return a historical version of an entity. Thi includes the header, classifications and properties of the entity.- Parameters:
userId
- unique identifier for requesting user.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 date is for future timeRepositoryErrorException
- 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 asOfTime parameter.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
getEntityDetailHistory
public abstract List<EntityDetail> getEntityDetailHistory(String userId, 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:
userId
- unique identifier for requesting user.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 toTimeRepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the requested entity instance is not active 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 userId is not permitted to perform this operation.
-
getRelationshipsForEntity
public abstract List<Relationship> getRelationshipsForEntity(String userId, 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:
userId
- unique identifier for requesting user.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 non-DELETED 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 except DELETED.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 retrieved relationships.PagingErrorException
- the paging/sequencing parameters are set up incorrectly.FunctionNotSupportedException
- the repository does not support the asOfTime parameter.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
findEntities
public abstract List<EntityDetail> findEntities(String userId, 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:
userId
- unique identifier for requesting user.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 non-DELETED 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 except DELETED.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 userId is not permitted to perform this operation.
-
findEntitiesByProperty
public abstract List<EntityDetail> findEntitiesByProperty(String userId, 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:
userId
- unique identifier for requesting user.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 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 non-DELETED 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 except DELETED.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 userId is not permitted to perform this operation.- See Also:
-
findEntitiesByClassification
public abstract List<EntityDetail> findEntitiesByClassification(String userId, 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:
userId
- unique identifier for requesting user.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 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 non-DELETED 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 except DELETED.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 userId is not permitted to perform this operation.- See Also:
-
findEntitiesByPropertyValue
public abstract List<EntityDetail> findEntitiesByPropertyValue(String userId, 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:
userId
- unique identifier for requesting user.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 entity instances of the specified type(s). This parameter must not be null.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 non-DELETED 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 except DELETED.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 userId is not permitted to perform this operation.- See Also:
-
isRelationshipKnown
public abstract Relationship isRelationshipKnown(String userId, String guid) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException Returns a relationship indicating if the relationship is stored in the metadata collection. Notice that relationships in DELETED state are returned by this call.- Parameters:
userId
- unique identifier for requesting user.guid
- String unique identifier for the relationship.- Returns:
- relationship 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 userId is not permitted to perform this operation.
-
getRelationship
public abstract Relationship getRelationship(String userId, String guid) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, UserNotAuthorizedException Return the current version of a requested relationship.- Parameters:
userId
- unique identifier for requesting user.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 userId is not permitted to perform this operation.
-
getRelationship
public abstract Relationship getRelationship(String userId, String guid, Date asOfTime) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Return a historical version of a relationship.- Parameters:
userId
- unique identifier for requesting user.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 date is for a future timeRepositoryErrorException
- 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 the asOfTime parameter.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
getRelationshipHistory
public abstract List<Relationship> getRelationshipHistory(String userId, 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:
userId
- unique identifier for requesting user.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 toTimeRepositoryErrorException
- 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 userId is not permitted to perform this operation.
-
findRelationships
public abstract List<Relationship> findRelationships(String userId, 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:
userId
- unique identifier for requesting user.relationshipTypeGUID
- unique identifier (guid) for the 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 non-DELETED 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 except DELETED.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 userId is not permitted to perform this operation.- See Also:
-
findRelationshipsByProperty
public abstract List<Relationship> findRelationshipsByProperty(String userId, 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:
userId
- unique identifier for requesting user.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 non-DELETED 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 except DELETED.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 userId is not permitted to perform this operation.- See Also:
-
findRelationshipsByPropertyValue
public abstract List<Relationship> findRelationshipsByPropertyValue(String userId, 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:
userId
- unique identifier for requesting user.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 relationship instances of the specified type(s). This parameter must not be null.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 non-DELETED 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 except DELETED.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 userId is not permitted to perform this operation.- See Also:
-
getLinkingEntities
public abstract InstanceGraph getLinkingEntities(String userId, String startEntityGUID, String endEntityGUID, List<InstanceStatus> limitResultsByStatus, Date asOfTime) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, PropertyErrorException, FunctionNotSupportedException, UserNotAuthorizedException Return all the relationships and intermediate entities that connect the startEntity with the endEntity.- Parameters:
userId
- unique identifier for requesting user.startEntityGUID
- The entity that is used to anchor the query.endEntityGUID
- the other entity that defines the scope of the query.limitResultsByStatus
- By default, relationships in all non-DELETED 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 except DELETED.asOfTime
- Requests a historical query of the relationships for the entity. Null means return the present values.- Returns:
- InstanceGraph the sub-graph that represents the returned linked entities and their relationships.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by either the startEntityGUID or the endEntityGUID is not found in the metadata collection.PropertyErrorException
- there is a problem with one of the other parameters.FunctionNotSupportedException
- the repository does not support the asOfTime parameter.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
getEntityNeighborhood
public abstract InstanceGraph getEntityNeighborhood(String userId, String entityGUID, List<String> entityTypeGUIDs, List<String> relationshipTypeGUIDs, List<InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, Date asOfTime, int level) throws InvalidParameterException, TypeErrorException, RepositoryErrorException, EntityNotKnownException, PropertyErrorException, FunctionNotSupportedException, UserNotAuthorizedException Return the entities and relationships that radiate out from the supplied entity GUID. The results are scoped both the instance type guids and the level.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- the starting point of the query.entityTypeGUIDs
- list of entity types to include in the query results. Null means include all entities found, irrespective of their type.relationshipTypeGUIDs
- list of relationship types to include in the query results. Null means include all relationships found, irrespective of their type.limitResultsByStatus
- By default, relationships in all non-DELETED 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 except DELETED.limitResultsByClassification
- List of classifications that must be present on all returned entities.asOfTime
- Requests a historical query of the relationships for the entity. Null means return the present values.level
- the number of the relationships out from the starting entity that the query will traverse to gather results.- Returns:
- InstanceGraph the sub-graph that represents the returned linked entities and their relationships.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.TypeErrorException
- one of the type guids 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 entity identified by the entityGUID is not found in the metadata collection.PropertyErrorException
- there is a problem with one of the other parameters.FunctionNotSupportedException
- the repository does not support the asOfTime parameter.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
getRelatedEntities
public abstract List<EntityDetail> getRelatedEntities(String userId, String startEntityGUID, List<String> entityTypeGUIDs, int fromEntityElement, List<InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws InvalidParameterException, TypeErrorException, RepositoryErrorException, EntityNotKnownException, PropertyErrorException, PagingErrorException, FunctionNotSupportedException, UserNotAuthorizedException Return the list of entities that are of the types listed in entityTypeGUIDs and are connected, either directly or indirectly to the entity identified by startEntityGUID.- Parameters:
userId
- unique identifier for requesting user.startEntityGUID
- unique identifier of the starting entity.entityTypeGUIDs
- list of guids for types to search for. Null means any type.fromEntityElement
- starting element for results list. Used in paging. Zero means first element.limitResultsByStatus
- By default, relationships in all non-DELETED 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 except DELETED.limitResultsByClassification
- List of classifications that must be present on all returned entities.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 entities that can be returned on this request. Zero means unrestricted return results size.- Returns:
- list of entities either directly or indirectly connected to the start entity
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.TypeErrorException
- one of 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 entity identified by the startEntityGUID is not found in the metadata collection.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 the asOfTime parameter.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
addEntity
public abstract EntityDetail addEntity(String userId, String entityTypeGUID, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, ClassificationErrorException, StatusNotSupportedException, FunctionNotSupportedException, UserNotAuthorizedException Create a new entity and put it in the requested state. The new entity is returned.- Parameters:
userId
- unique identifier for requesting user.entityTypeGUID
- unique identifier (guid) for the new entity's type.initialProperties
- initial list of properties for the new entity; null means no properties.initialClassifications
- initial list of classifications for the new entity null means no classifications.initialStatus
- initial status typically DRAFT, PREPARED or ACTIVE.- Returns:
- EntityDetail showing the new header plus the requested properties and classifications. The entity will not have any relationships at this stage.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this entity's type.ClassificationErrorException
- one or more of the requested classifications are either not known or not defined for this entity type.StatusNotSupportedException
- the metadata repository hosting the metadata collection does not support the requested status.FunctionNotSupportedException
- the repository does not support maintenance of metadata.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
addExternalEntity
public EntityDetail addExternalEntity(String userId, String entityTypeGUID, String externalSourceGUID, String externalSourceName, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, ClassificationErrorException, StatusNotSupportedException, FunctionNotSupportedException, UserNotAuthorizedException Save a new entity that is sourced from an external technology. The external technology is identified by a GUID and a name. These can be recorded in a Software Server Capability (guid and qualifiedName respectively). The new entity is assigned a new GUID and put in the requested state. The new entity is returned.- Parameters:
userId
- unique identifier for requesting user.entityTypeGUID
- unique identifier (guid) for the new entity's type.externalSourceGUID
- unique identifier (guid) for the external source.externalSourceName
- unique name for the external source.initialProperties
- initial list of properties for the new entity; null means no properties.initialClassifications
- initial list of classifications for the new entity null means no classifications.initialStatus
- initial status typically DRAFT, PREPARED or ACTIVE.- Returns:
- EntityDetail showing the new header plus the requested properties and classifications. The entity will not have any relationships at this stage.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this entity's type.ClassificationErrorException
- one or more of the requested classifications are either not known or not defined for this entity type.StatusNotSupportedException
- the metadata repository hosting the metadata collection does not support the requested status.FunctionNotSupportedException
- the repository does not support maintenance of metadata.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
addEntityProxy
public abstract void addEntityProxy(String userId, EntityProxy entityProxy) throws InvalidParameterException, RepositoryErrorException, FunctionNotSupportedException, UserNotAuthorizedException Create an entity proxy in the metadata collection. This is used to store relationships that span metadata repositories.- Parameters:
userId
- unique identifier for requesting user.entityProxy
- details of entity to add.- Throws:
InvalidParameterException
- the entity proxy is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.FunctionNotSupportedException
- the repository does not support entity proxies as first class elements.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
updateEntityStatus
public abstract EntityDetail updateEntityStatus(String userId, String entityGUID, InstanceStatus newStatus) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, StatusNotSupportedException, UserNotAuthorizedException, FunctionNotSupportedException Update the status for a specific entity.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- unique identifier (guid) for the requested entity.newStatus
- new InstanceStatus for the entity.- Returns:
- EntityDetail showing the current entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collection.StatusNotSupportedException
- invalid status for instance.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
updateEntityProperties
public abstract EntityDetail updateEntityProperties(String userId, String entityGUID, InstanceProperties properties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Update selected properties in an entity.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.properties
- a list of properties to change.- Returns:
- EntityDetail showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionPropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this entity's typeUserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
undoEntityUpdate
public abstract EntityDetail undoEntityUpdate(String userId, String entityGUID) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Undo the last update to an entity and return the previous content.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.- Returns:
- EntityDetail showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- the guid is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collection.FunctionNotSupportedException
- the repository does not support undo.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
deleteEntity
public abstract EntityDetail deleteEntity(String userId, String typeDefGUID, String typeDefName, String obsoleteEntityGUID) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Delete an entity. The entity is soft-deleted. This means it is still in the graph, but it is no longer returned on queries. All relationships to the entity are also soft-deleted and will no longer be usable. To completely eliminate the entity from the graph requires a call to the purgeEntity() method after the delete() call. The restoreEntity() method will switch an entity back to Active status to restore the entity to normal use.- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- unique identifier of the type of the entity to delete.typeDefName
- unique name of the type of the entity to delete.obsoleteEntityGUID
- String unique identifier (guid) for the entity- Returns:
- deleted entity
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collection.FunctionNotSupportedException
- the metadata repository hosting the metadata collection does not support soft-deletes use purgeEntity() to remove the entity permanently.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
purgeEntity
public abstract void purgeEntity(String userId, String typeDefGUID, String typeDefName, String deletedEntityGUID) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, EntityNotDeletedException, UserNotAuthorizedException, FunctionNotSupportedException Permanently removes a deleted entity from the metadata collection. This request can not be undone.- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- unique identifier of the type of the entity to purge.typeDefName
- unique name of the type of the entity to purge.deletedEntityGUID
- String unique identifier (guid) for the entity.- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionEntityNotDeletedException
- the entity is not in DELETED status and so can not be purgedUserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
restoreEntity
public abstract EntityDetail restoreEntity(String userId, String deletedEntityGUID) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, EntityNotDeletedException, FunctionNotSupportedException, UserNotAuthorizedException Restore the requested entity to the state it was before it was deleted.- Parameters:
userId
- unique identifier for requesting user.deletedEntityGUID
- String unique identifier (guid) for the entity.- Returns:
- EntityDetail showing the restored entity header, properties and classifications.
- Throws:
InvalidParameterException
- the guid is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionEntityNotDeletedException
- the entity is currently not in DELETED status and so it can not be restoredFunctionNotSupportedException
- the repository does not support soft-deletes.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
classifyEntity
public abstract EntityDetail classifyEntity(String userId, String entityGUID, String classificationName, InstanceProperties classificationProperties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Add the requested classification to a specific entity.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.classificationName
- String name for the classification.classificationProperties
- list of properties to set in the classification.- Returns:
- EntityDetail showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is either not known or not valid for the entity.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeUserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
classifyEntity
public Classification classifyEntity(String userId, EntityProxy entityProxy, String classificationName, InstanceProperties classificationProperties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Add the requested classification to a specific entity. If the provided entityProxy does not exist, it should be created, classified, and stored in the repository by this method.- Parameters:
userId
- unique identifier for requesting user.entityProxy
- entity as a proxyclassificationName
- String name for the classification.classificationProperties
- list of properties to set in the classification.- Returns:
- Classification newly added classification
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity proxy was not found and could not be createdClassificationErrorException
- the requested classification is either not known or not valid for the entity.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeUserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
classifyEntity
public EntityDetail classifyEntity(String userId, String entityGUID, String classificationName, String externalSourceGUID, String externalSourceName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties classificationProperties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Add the requested classification to a specific entity.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.classificationName
- String name for the classification.externalSourceGUID
- unique identifier (guid) for the external source.externalSourceName
- unique name for the external source.classificationOrigin
- source of the classificationclassificationOriginGUID
- if the classification is propagated, this is the unique identifier of the entity whereclassificationProperties
- list of properties to set in the classification.- Returns:
- EntityDetail showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is either not known or not valid for the entity.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeUserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
classifyEntity
public Classification classifyEntity(String userId, EntityProxy entityProxy, String classificationName, String externalSourceGUID, String externalSourceName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties classificationProperties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Add the requested classification to a specific entity. If the provided entityProxy does not exist, it should be created, classified, and stored in the repository by this method.- Parameters:
userId
- unique identifier for requesting user.entityProxy
- entity as a proxyclassificationName
- String name for the classification.externalSourceGUID
- unique identifier (guid) for the external source.externalSourceName
- unique name for the external source.classificationOrigin
- source of the classificationclassificationOriginGUID
- if the classification is propagated, this is the unique identifier of the entity whereclassificationProperties
- list of properties to set in the classification.- Returns:
- Classification newly added classification
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is either not known or not valid for the entity.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeUserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
declassifyEntity
public abstract EntityDetail declassifyEntity(String userId, String entityGUID, String classificationName) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, UserNotAuthorizedException, FunctionNotSupportedException Remove a specific classification from an entity.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.classificationName
- String name for the classification.- Returns:
- EntityDetail showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is not set on the entity.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
declassifyEntity
public Classification declassifyEntity(String userId, EntityProxy entityProxy, String classificationName) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, UserNotAuthorizedException, FunctionNotSupportedException Remove a specific classification from an entity.- Parameters:
userId
- unique identifier for requesting user.entityProxy
- identifier (proxy) for the entity.classificationName
- String name for the classification.- Returns:
- Classification showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity proxy was not found and could not be createdClassificationErrorException
- the requested classification is not set on the entity.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
updateEntityClassification
public abstract EntityDetail updateEntityClassification(String userId, String entityGUID, String classificationName, InstanceProperties properties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Update one or more properties in one of an entity's classifications.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.classificationName
- String name for the classification.properties
- list of properties for the classification.- Returns:
- EntityDetail showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is not attached to the classification.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeUserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
updateEntityClassification
public Classification updateEntityClassification(String userId, EntityProxy entityProxy, String classificationName, InstanceProperties properties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Update one or more properties in one of an entity's classifications.- Parameters:
userId
- unique identifier for requesting user.entityProxy
- identifier (proxy) for the entity.classificationName
- String name for the classification.properties
- list of properties for the classification.- Returns:
- Classification showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is not attached to the classification.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeUserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
addRelationship
public abstract Relationship addRelationship(String userId, String relationshipTypeGUID, InstanceProperties initialProperties, String entityOneGUID, String entityTwoGUID, InstanceStatus initialStatus) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, EntityNotKnownException, StatusNotSupportedException, UserNotAuthorizedException, FunctionNotSupportedException Add a new relationship between two entities to the metadata collection.- Parameters:
userId
- unique identifier for requesting user.relationshipTypeGUID
- unique identifier (guid) for the new relationship's type.initialProperties
- initial list of properties for the new entity; null means no properties.entityOneGUID
- the unique identifier of one of the entities that the relationship is connecting together.entityTwoGUID
- the unique identifier of the other entity that the relationship is connecting together.initialStatus
- initial status; typically DRAFT, PREPARED or ACTIVE.- Returns:
- Relationship structure with the new header, requested entities and properties.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this relationship's type.EntityNotKnownException
- one of the requested entities is not known in the metadata collection.StatusNotSupportedException
- the metadata repository hosting the metadata collection does not support the requested status.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
addExternalRelationship
public Relationship addExternalRelationship(String userId, String relationshipTypeGUID, String externalSourceGUID, String externalSourceName, InstanceProperties initialProperties, String entityOneGUID, String entityTwoGUID, InstanceStatus initialStatus) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, EntityNotKnownException, StatusNotSupportedException, UserNotAuthorizedException, FunctionNotSupportedException Save a new relationship that is sourced from an external technology. The external technology is identified by a GUID and a name. These can be recorded in a Software Server Capability (guid and qualifiedName respectively). The new relationship is assigned a new GUID and put in the requested state. The new relationship is returned.- Parameters:
userId
- unique identifier for requesting user.relationshipTypeGUID
- unique identifier (guid) for the new relationship's type.externalSourceGUID
- unique identifier (guid) for the external source.externalSourceName
- unique name for the external source.initialProperties
- initial list of properties for the new entity; null means no properties.entityOneGUID
- the unique identifier of one of the entities that the relationship is connecting together.entityTwoGUID
- the unique identifier of the other entity that the relationship is connecting together.initialStatus
- initial status; typically DRAFT, PREPARED or ACTIVE.- Returns:
- Relationship structure with the new header, requested entities and properties.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this relationship's type.EntityNotKnownException
- one of the requested entities is not known in the metadata collection.StatusNotSupportedException
- the metadata repository hosting the metadata collection does not support the requested status.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
updateRelationshipStatus
public abstract Relationship updateRelationshipStatus(String userId, String relationshipGUID, InstanceStatus newStatus) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, StatusNotSupportedException, UserNotAuthorizedException, FunctionNotSupportedException Update the status of a specific relationship.- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- String unique identifier (guid) for the relationship.newStatus
- new InstanceStatus for the relationship.- Returns:
- Resulting relationship structure with the new status set.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the requested relationship is not known in the metadata collection.StatusNotSupportedException
- invalid status for instance.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
updateRelationshipProperties
public abstract Relationship updateRelationshipProperties(String userId, String relationshipGUID, InstanceProperties properties) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Update the properties of a specific relationship.- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- String unique identifier (guid) for the relationship.properties
- list of the properties to update.- Returns:
- Resulting relationship structure with the new properties set.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the requested relationship is not known in the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this relationship's type.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
undoRelationshipUpdate
public abstract Relationship undoRelationshipUpdate(String userId, String relationshipGUID) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Undo the latest change to a relationship (either a change of properties or status).- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- String unique identifier (guid) for the relationship.- Returns:
- Relationship structure with the new current header, requested entities and properties.
- Throws:
InvalidParameterException
- the guid is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the requested relationship is not known in the metadata collection.FunctionNotSupportedException
- the repository does not support undo.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
deleteRelationship
public abstract Relationship deleteRelationship(String userId, String typeDefGUID, String typeDefName, String obsoleteRelationshipGUID) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Delete a specific relationship. This is a soft-delete which means the relationship's status is updated to DELETED, and it is no longer available for queries. To remove the relationship permanently from the metadata collection, use purgeRelationship().- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- unique identifier of the type of the relationship to delete.typeDefName
- unique name of the type of the relationship to delete.obsoleteRelationshipGUID
- String unique identifier (guid) for the relationship.- Returns:
- deleted relationship
- Throws:
InvalidParameterException
- one of the parameters is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the requested relationship is not known in the metadata collection.FunctionNotSupportedException
- the metadata repository hosting the metadata collection does not support soft-deletes.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
purgeRelationship
public abstract void purgeRelationship(String userId, String typeDefGUID, String typeDefName, String deletedRelationshipGUID) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, RelationshipNotDeletedException, UserNotAuthorizedException, FunctionNotSupportedException Permanently delete the relationship from the repository. There is no means to undo this request.- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- unique identifier of the type of the relationship to purge.typeDefName
- unique name of the type of the relationship to purge.deletedRelationshipGUID
- String unique identifier (guid) for the relationship.- Throws:
InvalidParameterException
- one of the parameters is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the requested relationship is not known in the metadata collection.RelationshipNotDeletedException
- the requested relationship is not in DELETED status.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
restoreRelationship
public abstract Relationship restoreRelationship(String userId, String deletedRelationshipGUID) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, RelationshipNotDeletedException, FunctionNotSupportedException, UserNotAuthorizedException Restore a deleted relationship into the metadata collection. The new status will be ACTIVE and the restored details of the relationship are returned to the caller.- Parameters:
userId
- unique identifier for requesting user.deletedRelationshipGUID
- String unique identifier (guid) for the relationship.- Returns:
- Relationship structure with the restored header, requested entities and properties.
- Throws:
InvalidParameterException
- the guid is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the requested relationship is not known in the metadata collection.RelationshipNotDeletedException
- the requested relationship is not in DELETED status.FunctionNotSupportedException
- the repository does not support soft-deletes.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
reIdentifyEntity
public abstract EntityDetail reIdentifyEntity(String userId, String typeDefGUID, String typeDefName, String entityGUID, String newEntityGUID) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Change the guid of an existing entity to a new value. This is used if two different entities are discovered to have the same guid. This is extremely unlikely but not impossible so the open metadata protocol has provision for this.- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- the guid of the TypeDef for the entity used to verify the entity identity.typeDefName
- the name of the TypeDef for the entity used to verify the entity identity.entityGUID
- the existing identifier for the entity.newEntityGUID
- new unique identifier for this entity.- Returns:
- entity new values for this entity, including the new guid.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collection.FunctionNotSupportedException
- the repository does not support the re-identification of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
reTypeEntity
public abstract EntityDetail reTypeEntity(String userId, String entityGUID, TypeDefSummary currentTypeDefSummary, TypeDefSummary newTypeDefSummary) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, ClassificationErrorException, EntityNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Change the existing entity's type. Typically, this action is taken to move an entity's type to either a super type (so the subtype can be deleted) or a new subtype (so additional properties can be added.) However, the type can be changed to any compatible type and the properties adjusted.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- the unique identifier for the entity to change.currentTypeDefSummary
- the current details of the TypeDef for the entity used to verify the entity identitynewTypeDefSummary
- details of this entity's new TypeDef.- Returns:
- entity new values for this entity, including the new type information.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.PropertyErrorException
- The properties in the instance are incompatible with the requested type.ClassificationErrorException
- the entity's classifications are not valid for the new type.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collection.FunctionNotSupportedException
- the repository does not support the re-typing of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
reHomeEntity
public EntityDetail reHomeEntity(String userId, String entityGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Change the home of an existing entity. This action is taken for example, if the original home repository becomes permanently unavailable, or if the user community updating this entity move to working from a different repository in the open metadata repository cohort.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- the unique identifier for the entity to change.typeDefGUID
- the guid of the TypeDef for the entity used to verify the entity identity.typeDefName
- the name of the TypeDef for the entity used to verify the entity identity.homeMetadataCollectionId
- the existing identifier for this entity's home.newHomeMetadataCollectionId
- unique identifier for the new home metadata collection/repository.newHomeMetadataCollectionName
- display name for the new home metadata collection/repository.- Returns:
- entity new values for this entity, including the new home information.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collection.FunctionNotSupportedException
- the repository does not support the re-homing of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
reHomeEntity
@Deprecated public EntityDetail reHomeEntity(String userId, String entityGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Deprecated.Change the home of an existing entity. This action is taken for example, if the original home repository becomes permanently unavailable, or if the user community updating this entity move to working from a different repository in the open metadata repository cohort.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- the unique identifier for the entity to change.typeDefGUID
- the guid of the TypeDef for the entity used to verify the entity identity.typeDefName
- the name of the TypeDef for the entity used to verify the entity identity.homeMetadataCollectionId
- the existing identifier for this entity's home.newHomeMetadataCollectionId
- unique identifier for the new home metadata collection/repository.- Returns:
- entity new values for this entity, including the new home information.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collection.FunctionNotSupportedException
- the repository does not support the re-homing of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
reIdentifyRelationship
public abstract Relationship reIdentifyRelationship(String userId, String typeDefGUID, String typeDefName, String relationshipGUID, String newRelationshipGUID) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Change the guid of an existing relationship. This is used if two different relationships are discovered to have the same guid. This is extremely unlikely but not impossible so the open metadata protocol has provision for this.- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- the guid of the TypeDef for the relationship used to verify the relationship identity.typeDefName
- the name of the TypeDef for the relationship used to verify the relationship identity.relationshipGUID
- the existing identifier for the relationship.newRelationshipGUID
- the new unique identifier for the relationship.- Returns:
- relationship new values for this relationship, including the new guid.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the relationship identified by the guid is not found in the metadata collection.FunctionNotSupportedException
- the repository does not support the re-identification of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
reTypeRelationship
public abstract Relationship reTypeRelationship(String userId, String relationshipGUID, TypeDefSummary currentTypeDefSummary, TypeDefSummary newTypeDefSummary) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, RelationshipNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Change the existing relationship's type. Typically, this action is taken to move a relationship's type to either a super type (so the subtype can be deleted) or a new subtype (so additional properties can be added.) However, the type can be changed to any compatible type.- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- the unique identifier for the relationship.currentTypeDefSummary
- the details of the TypeDef for the relationship used to verify the relationship identity.newTypeDefSummary
- details of this relationship's new TypeDef.- Returns:
- relationship new values for this relationship, including the new type information.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.PropertyErrorException
- The properties in the instance are incompatible with the requested type.RelationshipNotKnownException
- the relationship identified by the guid is not found in the metadata collection.FunctionNotSupportedException
- the repository does not support the re-typing of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
reHomeRelationship
public Relationship reHomeRelationship(String userId, String relationshipGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Change the home of an existing relationship. This action is taken for example, if the original home repository becomes permanently unavailable, or if the user community updating this relationship move to working from a different repository in the open metadata repository cohort.- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- the unique identifier for the relationship.typeDefGUID
- the guid of the TypeDef for the relationship used to verify the relationship identity.typeDefName
- the name of the TypeDef for the relationship used to verify the relationship identity.homeMetadataCollectionId
- the existing identifier for this relationship's home.newHomeMetadataCollectionId
- unique identifier for the new home metadata collection/repository.newHomeMetadataCollectionName
- display name for the new home metadata collection/repository.- Returns:
- relationship new values for this relationship, including the new home information.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the relationship identified by the guid is not found in the metadata collection.FunctionNotSupportedException
- the repository does not support the re-homing of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
reHomeRelationship
@Deprecated public Relationship reHomeRelationship(String userId, String relationshipGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, FunctionNotSupportedException, UserNotAuthorizedException Deprecated.Change the home of an existing relationship. This action is taken for example, if the original home repository becomes permanently unavailable, or if the user community updating this relationship move to working from a different repository in the open metadata repository cohort.- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- the unique identifier for the relationship.typeDefGUID
- the guid of the TypeDef for the relationship used to verify the relationship identity.typeDefName
- the name of the TypeDef for the relationship used to verify the relationship identity.homeMetadataCollectionId
- the existing identifier for this relationship's home.newHomeMetadataCollectionId
- unique identifier for the new home metadata collection/repository.- Returns:
- relationship new values for this relationship, including the new home information.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the relationship identified by the guid is not found in the metadata collection.FunctionNotSupportedException
- the repository does not support the re-homing of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
saveEntityReferenceCopy
public abstract void saveEntityReferenceCopy(String userId, EntityDetail entity) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, HomeEntityException, EntityConflictException, InvalidEntityException, FunctionNotSupportedException, UserNotAuthorizedException Save the entity as a reference copy. The id of the home metadata collection is already set up in the entity.- Parameters:
userId
- unique identifier for requesting user.entity
- details of the entity to save.- Throws:
InvalidParameterException
- the entity is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this entity's type.HomeEntityException
- the entity belongs to the local repository so creating a reference copy would be invalid.EntityConflictException
- the new entity conflicts with an existing entity.InvalidEntityException
- the new entity has invalid contents.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
getHomeClassifications
public List<Classification> getHomeClassifications(String userId, String entityGUID) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, UserNotAuthorizedException, FunctionNotSupportedException Retrieve any locally homed classifications assigned to the requested entity. This method is implemented by repository connectors that are able to store classifications for entities that are homed in another repository.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- unique identifier of the entity with classifications to retrieve- Returns:
- list of all the classifications for this entity that are homed in this repository
- Throws:
InvalidParameterException
- the entity is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity is not recognized by this repositoryUserNotAuthorizedException
- to calling user is not authorized to retrieve this metadataFunctionNotSupportedException
- this method is not supported
-
getHomeClassifications
public List<Classification> getHomeClassifications(String userId, String entityGUID, Date asOfTime) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, UserNotAuthorizedException, FunctionNotSupportedException Retrieve any locally homed classifications assigned to the requested entity. This method is implemented by repository connectors that are able to store classifications for entities that are homed in another repository.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- unique identifier of the entity with classifications to retrieveasOfTime
- the time used to determine which version of the entity that is desired.- Returns:
- list of all the classifications for this entity that are homed in this repository
- Throws:
InvalidParameterException
- the entity is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity is not recognized by this repositoryUserNotAuthorizedException
- to calling user is not authorized to retrieve this metadataFunctionNotSupportedException
- this method is not supported
-
deleteEntityReferenceCopy
public void deleteEntityReferenceCopy(String userId, EntityDetail entity) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, HomeEntityException, EntityConflictException, InvalidEntityException, FunctionNotSupportedException, UserNotAuthorizedException Remove a reference copy of the entity from the local repository. This method can be used to remove reference copies from the local cohort, repositories that have left the cohort, or entities that have come from open metadata archives. It is also an opportunity to remove or soft delete relationships attached to the entity.- Parameters:
userId
- unique identifier for requesting user.entity
- details of the entity to purge.- Throws:
InvalidParameterException
- the entity is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this entity's type.HomeEntityException
- the entity belongs to the local repository so creating a reference copy would be invalid.EntityConflictException
- the new entity conflicts with an existing entity.InvalidEntityException
- the new entity has invalid contents.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
purgeEntityReferenceCopy
public void purgeEntityReferenceCopy(String userId, EntityDetail entity) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, HomeEntityException, EntityConflictException, InvalidEntityException, FunctionNotSupportedException, UserNotAuthorizedException Remove a reference copy of the entity from the local repository. This method can be used to remove reference copies from the local cohort, repositories that have left the cohort, or entities that have come from open metadata archives. It is also an opportunity to remove relationships attached to the entity. This method is called when a remote repository calls the variant of purgeEntity that passes the EntityDetail object. This is typically used if purge is called without a previous soft-delete. However, it may also be used to purge after a soft-delete.- Parameters:
userId
- unique identifier for requesting user.entity
- details of the entity to purge.- Throws:
InvalidParameterException
- the entity is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this entity's type.HomeEntityException
- the entity belongs to the local repository so creating a reference copy would be invalid.EntityConflictException
- the new entity conflicts with an existing entity.InvalidEntityException
- the new entity has invalid contents.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
purgeEntityReferenceCopy
public abstract void purgeEntityReferenceCopy(String userId, String entityGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, HomeEntityException, FunctionNotSupportedException, UserNotAuthorizedException Remove a reference copy of the entity from the local repository. This method can be used to remove reference copies from the local cohort, repositories that have left the cohort, or entities that have come from open metadata archives.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- the unique identifier for the entity.typeDefGUID
- the guid of the TypeDef for the relationship used to verify the relationship identity.typeDefName
- the name of the TypeDef for the relationship used to verify the relationship identity.homeMetadataCollectionId
- identifier of the metadata collection that is the home to this entity.- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is either a proxy or not found in the metadata collection.HomeEntityException
- the entity belongs to the local repository so creating a reference copy would be invalid.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
refreshEntityReferenceCopy
public abstract void refreshEntityReferenceCopy(String userId, String entityGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, HomeEntityException, FunctionNotSupportedException, UserNotAuthorizedException The local repository has requested that the repository that hosts the home metadata collection for the specified entity sends out the details of this entity so the local repository can create a reference copy.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- unique identifier of requested entity.typeDefGUID
- unique identifier of requested entity's TypeDef.typeDefName
- unique name of requested entity's TypeDef.homeMetadataCollectionId
- identifier of the metadata collection that is the home to this entity.- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collection.HomeEntityException
- the entity belongs to the local repository so creating a reference copy would be invalid.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
saveClassificationReferenceCopy
public void saveClassificationReferenceCopy(String userId, EntityDetail entity, Classification classification) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, EntityConflictException, InvalidEntityException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Save the classification as a reference copy. The id of the home metadata collection is already set up in the classification. The entity may be either a locally homed entity or a reference copy.- Parameters:
userId
- unique identifier for requesting user.entity
- entity that the classification is attached to.classification
- classification to save.- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification type.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.EntityConflictException
- the new entity conflicts with an existing entity.InvalidEntityException
- the new entity has invalid contents.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
saveClassificationReferenceCopy
public void saveClassificationReferenceCopy(String userId, EntityProxy entity, Classification classification) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, EntityConflictException, InvalidEntityException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Save the classification as a reference copy. The id of the home metadata collection is already set up in the classification. The entity may be either a locally homed entity or a reference copy.- Parameters:
userId
- unique identifier for requesting user.entity
- entity that the classification is attached to.classification
- classification to save.- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification type.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.EntityConflictException
- the new entity conflicts with an existing entity.InvalidEntityException
- the new entity has invalid contents.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
purgeClassificationReferenceCopy
public void purgeClassificationReferenceCopy(String userId, EntityDetail entity, Classification classification) throws InvalidParameterException, TypeErrorException, PropertyErrorException, EntityConflictException, InvalidEntityException, RepositoryErrorException, UserNotAuthorizedException, FunctionNotSupportedException Remove the reference copy of the classification from the local repository. This method can be used to remove reference copies from the local cohort, repositories that have left the cohort, or relationships that have come from open metadata archives.- Parameters:
userId
- unique identifier for requesting user.entity
- entity that the classification is attached to.classification
- classification to purge.- Throws:
InvalidParameterException
- one of the parameters is invalid or null.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification type.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.EntityConflictException
- the new entity conflicts with an existing entity.InvalidEntityException
- the new entity has invalid contents.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
purgeClassificationReferenceCopy
public void purgeClassificationReferenceCopy(String userId, EntityProxy entity, Classification classification) throws InvalidParameterException, TypeErrorException, PropertyErrorException, EntityConflictException, InvalidEntityException, RepositoryErrorException, UserNotAuthorizedException, FunctionNotSupportedException Remove the reference copy of the classification from the local repository. This method can be used to remove reference copies from the local cohort, repositories that have left the cohort, or relationships that have come from open metadata archives.- Parameters:
userId
- unique identifier for requesting user.entity
- entity that the classification is attached to.classification
- classification to purge.- Throws:
InvalidParameterException
- one of the parameters is invalid or null.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification type.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.EntityConflictException
- the new entity conflicts with an existing entity.InvalidEntityException
- the new entity has invalid contents.UserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
saveRelationshipReferenceCopy
public abstract void saveRelationshipReferenceCopy(String userId, Relationship relationship) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, EntityNotKnownException, PropertyErrorException, HomeRelationshipException, RelationshipConflictException, InvalidRelationshipException, FunctionNotSupportedException, UserNotAuthorizedException Save the relationship as a reference copy. The id of the home metadata collection is already set up in the relationship.- Parameters:
userId
- unique identifier for requesting user.relationship
- relationship to save.- Throws:
InvalidParameterException
- the relationship is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.EntityNotKnownException
- one of the entities identified by the relationship is not found in the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this relationship's type.HomeRelationshipException
- the relationship belongs to the local repository so creating a reference copy would be invalid.RelationshipConflictException
- the new relationship conflicts with an existing relationship.InvalidRelationshipException
- the new relationship has invalid contents.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
deleteRelationshipReferenceCopy
public void deleteRelationshipReferenceCopy(String userId, Relationship relationship) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, EntityNotKnownException, PropertyErrorException, HomeRelationshipException, RelationshipConflictException, InvalidRelationshipException, FunctionNotSupportedException, UserNotAuthorizedException Remove the reference copy of the relationship from the local repository. This method can be used to remove reference copies from the local cohort, repositories that have left the cohort, or relationships that have come from open metadata archives.- Parameters:
userId
- unique identifier for requesting user.relationship
- relationship to purge.- Throws:
InvalidParameterException
- the relationship is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.EntityNotKnownException
- one of the entities identified by the relationship is not found in the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this relationship's type.HomeRelationshipException
- the relationship belongs to the local repository so creating a reference copy would be invalid.RelationshipConflictException
- the new relationship conflicts with an existing relationship.InvalidRelationshipException
- the new relationship has invalid contents.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
purgeRelationshipReferenceCopy
public void purgeRelationshipReferenceCopy(String userId, Relationship relationship) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, EntityNotKnownException, PropertyErrorException, HomeRelationshipException, RelationshipConflictException, InvalidRelationshipException, FunctionNotSupportedException, UserNotAuthorizedException This method is called when a remote repository calls the variant of purgeRelationship that passes the relationship object. This is typically used if purge is called without a previous soft-delete. However, it may also be used to purge after a soft-delete. Remove the reference copy of the relationship from the local repository. This method can be used to remove reference copies from the local cohort, repositories that have left the cohort, or relationships that have come from open metadata archives.- Parameters:
userId
- unique identifier for requesting user.relationship
- the purged relationship.- Throws:
InvalidParameterException
- the relationship is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.EntityNotKnownException
- one of the entities identified by the relationship is not found in the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this relationship's type.HomeRelationshipException
- the relationship belongs to the local repository so creating a reference copy would be invalid.RelationshipConflictException
- the new relationship conflicts with an existing relationship.InvalidRelationshipException
- the new relationship has invalid contents.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
purgeRelationshipReferenceCopy
public abstract void purgeRelationshipReferenceCopy(String userId, String relationshipGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, HomeRelationshipException, FunctionNotSupportedException, UserNotAuthorizedException Typically this method is called when a remote repository calls Remove the reference copy of the relationship from the local repository. This method can be used to remove reference copies from the local cohort, repositories that have left the cohort, or relationships that have come from open metadata archives.- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- the unique identifier for the relationship.typeDefGUID
- the guid of the TypeDef for the relationship used to verify the relationship identity.typeDefName
- the name of the TypeDef for the relationship used to verify the relationship identity.homeMetadataCollectionId
- unique identifier for the home repository for this relationship.- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the relationship is not know in the metadata collection.HomeRelationshipException
- the relationship belongs to the local repository so creating a reference copy would be invalid.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
refreshRelationshipReferenceCopy
public abstract void refreshRelationshipReferenceCopy(String userId, String relationshipGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId) throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, HomeRelationshipException, FunctionNotSupportedException, UserNotAuthorizedException The local server has requested that the repository that hosts the home metadata collection for the specified relationship sends out the details of this relationship so the local repository can create a reference copy.- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- unique identifier of the relationship.typeDefGUID
- the guid of the TypeDef for the relationship used to verify the relationship identity.typeDefName
- the name of the TypeDef for the relationship used to verify the relationship identity.homeMetadataCollectionId
- unique identifier for the home repository for this relationship.- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the relationship identifier is not recognized.HomeRelationshipException
- the relationship belongs to the local repository so creating a reference copy would be invalid.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
saveInstanceReferenceCopies
public void saveInstanceReferenceCopies(String userId, InstanceGraph instances) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, EntityNotKnownException, PropertyErrorException, EntityConflictException, RelationshipConflictException, InvalidEntityException, InvalidRelationshipException, FunctionNotSupportedException, UserNotAuthorizedException Save the entities and relationships supplied in the instance graph as a reference copies. The id of the home metadata collection is already set up in the instances. Any instances from the home metadata collection are ignored.- Parameters:
userId
- unique identifier for requesting user.instances
- instances to save.- Throws:
InvalidParameterException
- the relationship is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.EntityNotKnownException
- one of the entities identified by the relationship is not found in the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this relationship's type.EntityConflictException
- the new entity conflicts with an existing entity.InvalidEntityException
- the new entity has invalid contents.RelationshipConflictException
- the new relationship conflicts with an existing relationship.InvalidRelationshipException
- the new relationship has invalid contents.FunctionNotSupportedException
- the repository does not support reference copies of instances.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
reportUnsupportedOptionalFunction
protected void reportUnsupportedOptionalFunction(String methodName) throws FunctionNotSupportedException Return an exception to indicate that the method is unsupported but this is ok because it is optional.- Parameters:
methodName
- calling method- Throws:
FunctionNotSupportedException
- optional function not supported
-