Class GetEntityDetailExecutor
java.lang.Object
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutorBase
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.GetEntityExecutor
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.GetEntityDetailExecutor
- All Implemented Interfaces:
RepositoryExecutor
GetEntityDetailExecutor provides the executor for the isEntityKnown and getEntityDetail methods.
The Entity is received from metadata repositories until the entity from the home repository is retrieved.
The classifications are saved from each retrieval and the latest version of the entity.
When the home repository's version is retrieved, it switches to phase two where calls to getHomeClassifications are
made to the remaining repositories. This is to pick up any stray classifications.
The two phases are used to take advantage of an optimization in the OMRSRESTRepositoryConnector which remembers if a
remote repository does not support a call.
The getHomeClassifications methods are only supported by repositories that support the ability to home classifications on
entities from other repositories. This means that the phase two calls will only go remote if the remote repository
supports the getHomeClassifications method.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.GetEntityExecutor
entityGUID
Fields inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutorBase
methodName, userId
-
Constructor Summary
ConstructorDescriptionGetEntityDetailExecutor
(String userId, String entityGUID, Date asOfTime, AuditLog auditLog, String methodName) Constructor takes the parameters for the request.GetEntityDetailExecutor
(String userId, String entityGUID, AuditLog auditLog, String methodName) Constructor takes the parameters for the request. -
Method Summary
Modifier and TypeMethodDescriptionReturn the header, classifications and properties of a specific entity.Return a historical version of an entity.isEntityKnown
(boolean returnDeletedClassifications) Returns the entity if the entity is stored in the metadata collection, otherwise null.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.GetEntityExecutor
augmentResultFromRepository, getHomeClassifications, getResultsForAugmentation
Methods inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutorBase
getMethodName
-
Constructor Details
-
GetEntityDetailExecutor
public GetEntityDetailExecutor(String userId, String entityGUID, AuditLog auditLog, String methodName) Constructor takes the parameters for the request.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- unique identifier (guid) for the entity.auditLog
- logging destinationmethodName
- calling method
-
GetEntityDetailExecutor
public GetEntityDetailExecutor(String userId, String entityGUID, Date asOfTime, AuditLog auditLog, String methodName) Constructor takes the parameters for the request.- Parameters:
userId
- unique identifier for requesting user.entityGUID
- unique identifier (guid) for the entity.asOfTime
- is this a historical query.auditLog
- 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
-
isEntityKnown
public EntityDetail isEntityKnown(boolean returnDeletedClassifications) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException Returns the entity if the entity is stored in the metadata collection, otherwise null.- Parameters:
returnDeletedClassifications
- should classifications in deleted status be returned?- 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.
-
getEntityDetail
public EntityDetail getEntityDetail() throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, EntityProxyOnlyException, UserNotAuthorizedExceptionReturn the header, classifications and properties of a specific 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.
-
getEntityDetailAsOfTime
public EntityDetail getEntityDetailAsOfTime() throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, EntityProxyOnlyException, FunctionNotSupportedException, UserNotAuthorizedExceptionReturn a historical version of an entity. This includes the header, classifications and properties of the entity.- Returns:
- EntityDetail structure.
- Throws:
InvalidParameterException
- the guid or date is null or the date is for a future time.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the requested entity instance is not known in the metadata collection at the time requested.EntityProxyOnlyException
- the requested entity instance is only a proxy in the metadata collection.FunctionNotSupportedException
- the repository does not support the asOfTime parameter.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-