Class ClassifyEntityExecutor
java.lang.Object
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutorBase
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.ClassifyEntityExecutor
- All Implemented Interfaces:
RepositoryExecutor
RestoreEntityExecutor provides the executor for the restoreEntity method.
This is a tricky request because the entity has been deleted, so it is
not retrievable until restored. Also, this is an optional function
so the repository where the entity has its home may not support restore.
The only possible approach is to step through the repositories hoping that one
will respond positively.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutorBase
methodName, userId
-
Constructor Summary
ConstructorDescriptionClassifyEntityExecutor
(String userId, String entityGUID, EntityProxy entityProxy, String classificationName, String externalSourceGUID, String externalSourceName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties classificationProperties, AuditLog auditLog, String methodName) Constructor takes the parameters for the request. -
Method Summary
Modifier and TypeMethodDescriptionReturn the result of the execution.Return the result of the execution.boolean
issueRequestToRepository
(String metadataCollectionId, OMRSMetadataCollection metadataCollection) Perform the required action for the supplied repository.Methods inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutorBase
getMethodName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutor
augmentResultFromRepository, getResultsForAugmentation
-
Constructor Details
-
ClassifyEntityExecutor
public ClassifyEntityExecutor(String userId, String entityGUID, EntityProxy entityProxy, String classificationName, String externalSourceGUID, String externalSourceName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties classificationProperties, AuditLog auditLog, String methodName) Constructor takes the parameters for the request.- Parameters:
userId
- unique identifier for requesting userentityGUID
- unique identifier (guid) for the entityentityProxy
- entity proxy to anchor classificationclassificationName
- String name for the classificationexternalSourceGUID
- unique identifier (guid) for the external sourceexternalSourceName
- unique name for the external sourceclassificationOrigin
- 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 classificationauditLog
- logging destinationmethodName
- calling method
-
-
Method Details
-
issueRequestToRepository
public boolean issueRequestToRepository(String metadataCollectionId, OMRSMetadataCollection metadataCollection) Perform the required action for the supplied repository. Create requests occur in the first repository that accepts the call. Some repositories may produce exceptions. These exceptions are saved and will be returned if there are no positive results from any repository.- Specified by:
issueRequestToRepository
in interfaceRepositoryExecutor
- Specified by:
issueRequestToRepository
in classRepositoryExecutorBase
- Parameters:
metadataCollectionId
- unique identifier for the metadata collection for the repositorymetadataCollection
- metadata collection object for the repository- Returns:
- boolean true means that the required results have been achieved
-
getUpdatedEntity
public EntityDetail getUpdatedEntity() throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedExceptionReturn the result of the execution. Hopefully this is a result - but may be an exception- Returns:
- EntityDetail showing the updated 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 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.
-
getAddedClassification
public Classification getAddedClassification() throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedExceptionReturn the result of the execution. Hopefully this is a result - but may be an exception- Returns:
- Classification newly added classification into 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 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.
-