Class AddEntityExecutor
java.lang.Object
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutorBase
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.AddEntityExecutor
- All Implemented Interfaces:
RepositoryExecutor
AddEntityExecutor provides the executor for the addEntity and addExternalEntity methods.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutorBase
methodName, userId
-
Constructor Summary
ConstructorDescriptionAddEntityExecutor
(String userId, String entityTypeGUID, String externalSourceGUID, String externalSourceName, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus, AuditLog auditLog, String methodName) Constructor takes the parameters for the request.AddEntityExecutor
(String userId, String entityTypeGUID, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus, AuditLog auditLog, String methodName) Constructor takes the parameters for the request. -
Method Summary
Modifier and TypeMethodDescriptionReturn 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
-
AddEntityExecutor
public AddEntityExecutor(String userId, String entityTypeGUID, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus, AuditLog auditLog, String methodName) Constructor takes the parameters for the request.- 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.auditLog
- logging destinationmethodName
- calling method
-
AddEntityExecutor
public AddEntityExecutor(String userId, String entityTypeGUID, String externalSourceGUID, String externalSourceName, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus, AuditLog auditLog, String methodName) Constructor takes the parameters for the request.- 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.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
-
getNewEntity
public EntityDetail getNewEntity() throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, ClassificationErrorException, StatusNotSupportedException, FunctionNotSupportedException, UserNotAuthorizedExceptionReturn the result of the execution. Hopefully this is a result - but may be an exception- 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.
-