Class OpenMetadataExchangeService
java.lang.Object
org.odpi.openmetadata.integrationservices.catalog.connector.OpenMetadataExchangeService
OpenMetadataExchangeService provides a native open metadata interface. It is possible to find and maintain any type of metadata through
this interface. However, it is recommended to only use this interface when the other, more specialized interfaces do not meet your needs.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
classifyMetadataElementInStore
(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo, ElementProperties properties, Date effectiveTime) Add a new classification to the metadata element.createMetadataElementInStore
(String metadataElementTypeName, ElementStatus initialStatus, Date effectiveFrom, Date effectiveTo, ElementProperties properties, String templateGUID) Create a new metadata element in the metadata store.createMetadataElementInStore
(String metadataElementTypeName, ElementStatus initialStatus, Map<String, ElementProperties> initialClassifications, String anchorGUID, Date effectiveFrom, Date effectiveTo, ElementProperties properties, String templateGUID, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1) Create a new metadata element in the metadata store.createRelatedElementsInStore
(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, Date effectiveFrom, Date effectiveTo, ElementProperties properties, Date effectiveTime) Create a relationship between two metadata elements.void
deleteMetadataElementInStore
(String metadataElementGUID, Date effectiveTime) Delete a specific metadata element.void
deleteRelatedElementsInStore
(String relationshipGUID, Date effectiveTime) Delete a relationship between two metadata elements.findMetadataElements
(String metadataElementTypeName, List<String> metadataElementSubtypeName, SearchProperties searchProperties, List<ElementStatus> limitResultsByStatus, SearchClassifications matchClassifications, String sequencingProperty, SequencingOrder sequencingOrder, Date effectiveTime, int startFrom, int pageSize) Return a list of metadata elements that match the supplied criteria.findMetadataElementsWithString
(String searchString, String typeName, Date effectiveTime, int startFrom, int pageSize) Retrieve the metadata elements of the requested type that contain the requested string.findMetadataElementsWithString
(String searchString, Date effectiveTime, int startFrom, int pageSize) Retrieve the metadata elements that contain the requested string.findRelationshipsBetweenMetadataElements
(String relationshipTypeName, SearchProperties searchProperties, String sequencingProperty, SequencingOrder sequencingOrder, Date effectiveTime, int startFrom, int pageSize) Return a list of relationships that match the requested conditions.getMetadataElementByGUID
(String elementGUID, Date effectiveTime) Retrieve the metadata element using its unique identifier.getMetadataElementByUniqueName
(String uniqueName, String uniquePropertyName, Date effectiveTime) Retrieve the metadata element using its unique name (typically the qualified name).getMetadataElementGUIDByUniqueName
(String uniqueName, String uniquePropertyName, Date effectiveTime) Retrieve the unique identifier of a metadata element using its unique name (typically the qualified name).getMetadataElementRelationships
(String metadataElementAtEnd1GUID, String metadataElementAtEnd2GUID, String relationshipTypeName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, int startFrom, int pageSize) Retrieve the relationships linking to the supplied elements.getRelatedMetadataElements
(String elementGUID, int startingAtEnd, String relationshipTypeName, Date effectiveTime, int startFrom, int pageSize) Retrieve the metadata elements connected to the supplied element.boolean
Return whether any metadata elements, classifications and relationships created though this interface will be members of the local cohort or members of an external metadata collection.boolean
Return whether retrieval requests from this service are to avoid merging duplicates or not.boolean
Return whether retrieval requests from this service are to include elements with the Memento classification attached or not.void
reclassifyMetadataElementInStore
(String metadataElementGUID, String classificationName, boolean replaceProperties, ElementProperties properties, Date effectiveTime) Update the properties of a classification that is currently attached to a specific metadata element.void
setAssetManagerIsHome
(boolean assetManagerIsHome) Set up whether any metadata elements, classifications and relationships created though this interface will be members of the local cohort or members of an external metadata collection.void
setForDuplicateProcessing
(boolean forDuplicateProcessing) Set up whether retrieval requests from this service are to avoid merging duplicates or not.void
setForLineage
(boolean forLineage) Set up whether retrieval requests from this service are to include elements with the Memento classification attached or not.void
unclassifyMetadataElementInStore
(String metadataElementGUID, String classificationName, Date effectiveTime) Remove the named classification from a specific metadata element.void
updateClassificationEffectivityInStore
(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo, Date effectiveTime) Update the effectivity dates of a specific classification attached to a metadata element.void
updateMetadataElementEffectivityInStore
(String metadataElementGUID, Date effectiveFrom, Date effectiveTo, Date effectiveTime) Update the status of specific metadata element.void
updateMetadataElementInStore
(String metadataElementGUID, boolean replaceProperties, ElementProperties properties, Date effectiveTime) Update the properties of a specific metadata element.void
updateMetadataElementStatusInStore
(String metadataElementGUID, ElementStatus newElementStatus, Date effectiveTime) Update the status of specific metadata element.void
updateRelatedElementsEffectivityInStore
(String relationshipGUID, Date effectiveFrom, Date effectiveTo, Date effectiveTime) Update the effectivity dates of a specific relationship between metadata elements.void
updateRelatedElementsInStore
(String relationshipGUID, boolean replaceProperties, ElementProperties properties, Date effectiveTime) Update the properties associated with a relationship.
-
Method Details
-
isAssetManagerHome
public boolean isAssetManagerHome()Return whether any metadata elements, classifications and relationships created though this interface will be members of the local cohort or members of an external metadata collection.- Returns:
- boolean flag
-
setAssetManagerIsHome
public void setAssetManagerIsHome(boolean assetManagerIsHome) Set up whether any metadata elements, classifications and relationships created though this interface will be members of the local cohort or members of an external metadata collection.- Parameters:
assetManagerIsHome
- boolean flag
-
isForLineage
public boolean isForLineage()Return whether retrieval requests from this service are to include elements with the Memento classification attached or not.- Returns:
- boolean flag
-
setForLineage
public void setForLineage(boolean forLineage) Set up whether retrieval requests from this service are to include elements with the Memento classification attached or not.- Parameters:
forLineage
- boolean flag
-
isForDuplicateProcessing
public boolean isForDuplicateProcessing()Return whether retrieval requests from this service are to avoid merging duplicates or not.- Returns:
- boolean flag
-
setForDuplicateProcessing
public void setForDuplicateProcessing(boolean forDuplicateProcessing) Set up whether retrieval requests from this service are to avoid merging duplicates or not.- Parameters:
forDuplicateProcessing
- boolean flag
-
getMetadataElementByGUID
public OpenMetadataElement getMetadataElementByGUID(String elementGUID, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the metadata element using its unique identifier.- Parameters:
elementGUID
- unique identifier for the metadata elementeffectiveTime
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.- Returns:
- metadata element properties
- Throws:
InvalidParameterException
- the unique identifier is null or not known.UserNotAuthorizedException
- the governance action service is not able to access the elementPropertyServerException
- there is a problem accessing the metadata store
-
getMetadataElementByUniqueName
public OpenMetadataElement getMetadataElementByUniqueName(String uniqueName, String uniquePropertyName, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the metadata element using its unique name (typically the qualified name).- Parameters:
uniqueName
- unique name for the metadata elementuniquePropertyName
- name of property name to test in the open metadata element - if null "qualifiedName" is usedeffectiveTime
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.- Returns:
- metadata element properties or null if not found
- Throws:
InvalidParameterException
- the unique identifier is null.UserNotAuthorizedException
- the governance action service is not able to access the elementPropertyServerException
- there is a problem accessing the metadata store
-
getMetadataElementGUIDByUniqueName
public String getMetadataElementGUIDByUniqueName(String uniqueName, String uniquePropertyName, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the unique identifier of a metadata element using its unique name (typically the qualified name).- Parameters:
uniqueName
- unique name for the metadata elementuniquePropertyName
- name of property name to test in the open metadata element - if null "qualifiedName" is usedeffectiveTime
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.- Returns:
- metadata element unique identifier (guid)
- Throws:
InvalidParameterException
- the unique identifier is null or not known.UserNotAuthorizedException
- the governance action service is not able to access the elementPropertyServerException
- there is a problem accessing the metadata store
-
findMetadataElementsWithString
public List<OpenMetadataElement> findMetadataElementsWithString(String searchString, Date effectiveTime, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the metadata elements that contain the requested string.- Parameters:
searchString
- name to retrieveeffectiveTime
- only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.startFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements (or null if no elements match the name)
- Throws:
InvalidParameterException
- the qualified name is nullUserNotAuthorizedException
- the governance action service is not able to access the elementPropertyServerException
- there is a problem accessing the metadata store
-
findMetadataElementsWithString
public List<OpenMetadataElement> findMetadataElementsWithString(String searchString, String typeName, Date effectiveTime, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the metadata elements of the requested type that contain the requested string.- Parameters:
searchString
- name to retrievetypeName
- name of the type to limit the results to (may be null to mean all types)effectiveTime
- only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.startFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements (or null if no elements match the name)
- Throws:
InvalidParameterException
- the qualified name is nullUserNotAuthorizedException
- the governance action service is not able to access the elementPropertyServerException
- there is a problem accessing the metadata store
-
getRelatedMetadataElements
public List<RelatedMetadataElement> getRelatedMetadataElements(String elementGUID, int startingAtEnd, String relationshipTypeName, Date effectiveTime, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the metadata elements connected to the supplied element.- Parameters:
elementGUID
- unique identifier for the starting metadata elementstartingAtEnd
- indicates which end to retrieve from (0 is "either end"; 1 is end1; 2 is end 2)relationshipTypeName
- type name of relationships to follow (or null for all)effectiveTime
- only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.startFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of related elements
- Throws:
InvalidParameterException
- the unique identifier is null or not known; the relationship type is invalidUserNotAuthorizedException
- the governance action service is not able to access the elementsPropertyServerException
- there is a problem accessing the metadata store
-
getMetadataElementRelationships
public List<RelatedMetadataElements> getMetadataElementRelationships(String metadataElementAtEnd1GUID, String metadataElementAtEnd2GUID, String relationshipTypeName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the relationships linking to the supplied elements.- Parameters:
metadataElementAtEnd1GUID
- unique identifier of the metadata element at end 1 of the relationshipmetadataElementAtEnd2GUID
- unique identifier of the metadata element at end 2 of the relationshiprelationshipTypeName
- type name of relationships to follow (or null for all)forLineage
- the retrieved element is for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved elements are for duplicate processing so do not combine results from known duplicates.effectiveTime
- only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.startFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of related elements
- Throws:
InvalidParameterException
- the unique identifier is null or not known; the relationship type is invalidUserNotAuthorizedException
- the governance action service is not able to access the elementsPropertyServerException
- there is a problem accessing the metadata store
-
findMetadataElements
public List<OpenMetadataElement> findMetadataElements(String metadataElementTypeName, List<String> metadataElementSubtypeName, SearchProperties searchProperties, List<ElementStatus> limitResultsByStatus, SearchClassifications matchClassifications, String sequencingProperty, SequencingOrder sequencingOrder, Date effectiveTime, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return a list of metadata elements that match the supplied criteria. The results can be returned over many pages.- Parameters:
metadataElementTypeName
- type of interest (null means any element type)metadataElementSubtypeName
- optional list of the subtypes of the metadataElementTypeName to include in the search results. Null means all subtypes.searchProperties
- Optional list of entity property conditions to match.limitResultsByStatus
- By default, entities in all statuses (other than DELETE) are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.matchClassifications
- Optional list of classifications to match.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.effectiveTime
- only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.startFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- a list of elements matching the supplied criteria; null means no matching elements in the metadata store.
- Throws:
InvalidParameterException
- one of the search parameters are is invalidUserNotAuthorizedException
- the governance action service is not able to access the elementsPropertyServerException
- there is a problem accessing the metadata store
-
findRelationshipsBetweenMetadataElements
public List<RelatedMetadataElements> findRelationshipsBetweenMetadataElements(String relationshipTypeName, SearchProperties searchProperties, String sequencingProperty, SequencingOrder sequencingOrder, Date effectiveTime, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return a list of relationships that match the requested conditions. The results can be received as a series of pages.- Parameters:
relationshipTypeName
- relationship's type. Null means all types (but may be slow so not recommended).searchProperties
- Optional list of relationship property conditions to match.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.effectiveTime
- only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.startFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- a list of relationships. Null means no matching relationships.
- Throws:
InvalidParameterException
- one of the search parameters are is invalidUserNotAuthorizedException
- the governance action service is not able to access the elementsPropertyServerException
- there is a problem accessing the metadata store
-
createMetadataElementInStore
public String createMetadataElementInStore(String metadataElementTypeName, ElementStatus initialStatus, Date effectiveFrom, Date effectiveTo, ElementProperties properties, String templateGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element in the metadata store. The type name comes from the open metadata types. The selected type also controls the names and types of the properties that are allowed. This version of the method allows access to advanced features such as multiple states and effectivity dates.- Parameters:
metadataElementTypeName
- type name of the new metadata elementinitialStatus
- initial status of the metadata elementeffectiveFrom
- the date when this element is active - null for active on creationeffectiveTo
- the date when this element becomes inactive - null for active until deletedproperties
- properties of the new metadata elementtemplateGUID
- the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema connection etc)- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- the type name, status or one of the properties is invalidUserNotAuthorizedException
- the governance action service is not authorized to create this type of elementPropertyServerException
- there is a problem with the metadata store
-
createMetadataElementInStore
public String createMetadataElementInStore(String metadataElementTypeName, ElementStatus initialStatus, Map<String, ElementProperties> initialClassifications, String anchorGUID, Date effectiveFrom, Date effectiveTo, ElementProperties properties, String templateGUID, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionCreate a new metadata element in the metadata store. The type name comes from the open metadata types. The selected type also controls the names and types of the properties that are allowed. This version of the method allows access to advanced features such as multiple states and effectivity dates.- Parameters:
metadataElementTypeName
- type name of the new metadata elementinitialStatus
- initial status of the metadata elementinitialClassifications
- map of classification names to classification properties to include in the entity creation requestanchorGUID
- unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.effectiveFrom
- the date when this element is active - null for active on creationeffectiveTo
- the date when this element becomes inactive - null for active until deletedproperties
- properties of the new metadata elementtemplateGUID
- the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema connection etc)parentGUID
- unique identifier of optional parent entityparentRelationshipTypeName
- type of relationship to connect the new element to the parentparentRelationshipProperties
- properties to include in parent relationshipparentAtEnd1
- which end should the parent GUID go in the relationship- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- the type name, status or one of the properties is invalidUserNotAuthorizedException
- the governance action service is not authorized to create this type of elementPropertyServerException
- there is a problem with the metadata store
-
updateMetadataElementInStore
public void updateMetadataElementInStore(String metadataElementGUID, boolean replaceProperties, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties of a specific metadata element. The properties must match the type definition associated with the metadata element when it was created. However, it is possible to update a few properties, or replace all them by the value used in the replaceProperties flag.- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updatereplaceProperties
- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.properties
- new properties for the metadata elementeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- either the unique identifier or the properties are invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
updateMetadataElementStatusInStore
public void updateMetadataElementStatusInStore(String metadataElementGUID, ElementStatus newElementStatus, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the status of specific metadata element. The new status must match a status value that is defined for the element's type assigned when it was created. The effectivity dates control the visibility of the element through specific APIs.- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updatenewElementStatus
- new status value - or null to leave as iseffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- either the unique identifier or the status are invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
updateMetadataElementEffectivityInStore
public void updateMetadataElementEffectivityInStore(String metadataElementGUID, Date effectiveFrom, Date effectiveTo, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the status of specific metadata element. The new status must match a status value that is defined for the element's type assigned when it was created. The effectivity dates control the visibility of the element through specific APIs.- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateeffectiveFrom
- the date when this element is active - null for active noweffectiveTo
- the date when this element becomes inactive - null for active until deletedeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- either the unique identifier or the status are invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
deleteMetadataElementInStore
public void deleteMetadataElementInStore(String metadataElementGUID, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Delete a specific metadata element.- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier is null or invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to delete this elementPropertyServerException
- there is a problem with the metadata store
-
classifyMetadataElementInStore
public void classifyMetadataElementInStore(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Add a new classification to the metadata element. Note that only one classification with the same name can be attached to a metadata element.- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- name of the classification to add (if the classification is already present then use reclassify)effectiveFrom
- the date when this classification is active - null for active noweffectiveTo
- the date when this classification becomes inactive - null for active until deletedproperties
- properties to store in the new classification. These must conform to the valid properties associated with the classification nameeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier or classification name is null or invalid in some way; properties do not match the valid properties associated with the classification's type definitionUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
reclassifyMetadataElementInStore
public void reclassifyMetadataElementInStore(String metadataElementGUID, String classificationName, boolean replaceProperties, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties of a classification that is currently attached to a specific metadata element.- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- unique name of the classification to updatereplaceProperties
- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.properties
- new properties for the classificationeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier or classification name is null or invalid in some way; properties do not match the valid properties associated with the classification's type definitionUserNotAuthorizedException
- the governance action service is not authorized to update this element/classificationPropertyServerException
- there is a problem with the metadata store
-
updateClassificationEffectivityInStore
public void updateClassificationEffectivityInStore(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the effectivity dates of a specific classification attached to a metadata element. The effectivity dates control the visibility of the classification through specific APIs.- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- unique name of the classification to updateeffectiveFrom
- the date when this element is active - null for active noweffectiveTo
- the date when this element becomes inactive - null for active until deletedeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- either the unique identifier or the status are invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
unclassifyMetadataElementInStore
public void unclassifyMetadataElementInStore(String metadataElementGUID, String classificationName, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the named classification from a specific metadata element.- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- unique name of the classification to removeeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier or classification name is null or invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to remove this classificationPropertyServerException
- there is a problem with the metadata store
-
createRelatedElementsInStore
public String createRelatedElementsInStore(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, Date effectiveFrom, Date effectiveTo, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a relationship between two metadata elements. It is important to put the right element at each end of the relationship according to the type definition since this will affect how the relationship is interpreted.- Parameters:
relationshipTypeName
- name of the type of relationship to create. This will determine the types of metadata elements that can be related and the properties that can be associated with this relationship.metadataElement1GUID
- unique identifier of the metadata element at end 1 of the relationshipmetadataElement2GUID
- unique identifier of the metadata element at end 2 of the relationshipeffectiveFrom
- the date when this element is active - null for active noweffectiveTo
- the date when this element becomes inactive - null for active until deletedproperties
- the properties of the relationshipeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Returns:
- unique identifier of the new relationship
- Throws:
InvalidParameterException
- the unique identifier's of the metadata elements are null or invalid in some way; the properties are not valid for this type of relationshipUserNotAuthorizedException
- the governance action service is not authorized to create this type of relationshipPropertyServerException
- there is a problem with the metadata store
-
updateRelatedElementsInStore
public void updateRelatedElementsInStore(String relationshipGUID, boolean replaceProperties, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties associated with a relationship.- Parameters:
relationshipGUID
- unique identifier of the relationship to updatereplaceProperties
- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.properties
- new properties for the relationshipeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier of the relationship is null or invalid in some way; the properties are not valid for this type of relationshipUserNotAuthorizedException
- the governance action service is not authorized to update this relationshipPropertyServerException
- there is a problem with the metadata store
-
updateRelatedElementsEffectivityInStore
public void updateRelatedElementsEffectivityInStore(String relationshipGUID, Date effectiveFrom, Date effectiveTo, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the effectivity dates of a specific relationship between metadata elements. The effectivity dates control the visibility of the classification through specific APIs.- Parameters:
relationshipGUID
- unique identifier of the relationship to updateeffectiveFrom
- the date when this element is active - null for active noweffectiveTo
- the date when this element becomes inactive - null for active until deletedeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- either the unique identifier or the status are invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
deleteRelatedElementsInStore
public void deleteRelatedElementsInStore(String relationshipGUID, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Delete a relationship between two metadata elements.- Parameters:
relationshipGUID
- unique identifier of the relationship to deleteeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier of the relationship is null or invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to delete this relationshipPropertyServerException
- there is a problem with the metadata store
-