Class AnalyticsArtifactHandler
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.analyticsmodeling.synchronization.AnalyticsArtifactHandler
-
public class AnalyticsArtifactHandler extends Object
-
-
Constructor Summary
Constructors Constructor Description AnalyticsArtifactHandler(ExecutionContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseContainerAssetscreateAssets(String user, String serverCapability, String serverCapabilityGUID, AnalyticsAsset asset)Create assets defined by input.StringcreateContainer(MetadataContainer container, String parentGUID, String anchorGUID, boolean bNested, String parentQName)Create container entity to store container bean.voidcreateItem(MetadataItem item, String parentGUID, String anchorGUID, boolean bNested, String parentQName)Create item entity to store item bean.ResponseContainerAssetsdeleteAssets(String userId, String serverCapability, String serverCapabilityGUID, String identifier)Delete assets representing the artifact defined by identifier.List<EntityDetail>getArtifactAssets(String identifier)Fetch all assets created for artifact identified by unique identifier.AssetHandler<AnalyticsAsset>getAssetHandler()MessagesgetMessages()Get messages about non critical action issues.voidremoveMetadataObject(EntityDetail entity, String methodName)Remove metadata entity left after update is completed.ResponseContainerAssetsupdateAssets(String user, String serverCapability, String serverCapabilityGUID, AnalyticsAsset asset)Update assets defined by input.
-
-
-
Constructor Detail
-
AnalyticsArtifactHandler
public AnalyticsArtifactHandler(ExecutionContext ctx)
-
-
Method Detail
-
getAssetHandler
public AssetHandler<AnalyticsAsset> getAssetHandler()
-
createAssets
public ResponseContainerAssets createAssets(String user, String serverCapability, String serverCapabilityGUID, AnalyticsAsset asset) throws AnalyticsModelingCheckedException, UserNotAuthorizedException
Create assets defined by input.- Parameters:
user- making the request.serverCapability- where the artifact is located.serverCapabilityGUID- source of artifact.asset- definition of analytic artifact.- Returns:
- set of asset GUIDs representing the artifact.
- Throws:
AnalyticsModelingCheckedException- in case of error.UserNotAuthorizedException- in case of error.
-
createContainer
public String createContainer(MetadataContainer container, String parentGUID, String anchorGUID, boolean bNested, String parentQName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Create container entity to store container bean.- Parameters:
container- bean to create.parentGUID- to use as parent entity.anchorGUID- to create anchor classification.bNested- to create nested container.parentQName- of the created container.- Returns:
- created container GUID.
- Throws:
InvalidParameterException- repository access error.PropertyServerException- repository access error.UserNotAuthorizedException- repository access error.
-
createItem
public void createItem(MetadataItem item, String parentGUID, String anchorGUID, boolean bNested, String parentQName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Create item entity to store item bean.- Parameters:
item- bean to create.parentGUID- to use as parent.anchorGUID- to create classification.bNested- true for child of container or item, not asset.parentQName- to build QName of the item.- Throws:
InvalidParameterException- repository access error.PropertyServerException- repository access error.UserNotAuthorizedException- repository access error.
-
updateAssets
public ResponseContainerAssets updateAssets(String user, String serverCapability, String serverCapabilityGUID, AnalyticsAsset asset) throws AnalyticsModelingCheckedException, UserNotAuthorizedException
Update assets defined by input.- Parameters:
user- making the request.serverCapability- where the artifact is located.serverCapabilityGUID- source of artifact.asset- analytic artifact.- Returns:
- set of asset GUIDs representing the artifact.
- Throws:
AnalyticsModelingCheckedException- in case of error.UserNotAuthorizedException- in case of error.
-
removeMetadataObject
public void removeMetadataObject(EntityDetail entity, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove metadata entity left after update is completed.- Parameters:
entity- to removemethodName- requested removal.- Throws:
InvalidParameterException- repository access error.UserNotAuthorizedException- repository access error.PropertyServerException- repository access error.
-
deleteAssets
public ResponseContainerAssets deleteAssets(String userId, String serverCapability, String serverCapabilityGUID, String identifier) throws AnalyticsModelingCheckedException, UserNotAuthorizedException
Delete assets representing the artifact defined by identifier. The assets are marked as deleted if repository supports soft delete.- Parameters:
userId- to perform the action.serverCapability- source of artifact.serverCapabilityGUID- source of artifact.identifier- of the artifact.- Returns:
- list of affected GUIDs.
- Throws:
AnalyticsModelingCheckedException- in case of error.UserNotAuthorizedException- in case of error.
-
getArtifactAssets
public List<EntityDetail> getArtifactAssets(String identifier) throws AnalyticsModelingCheckedException
Fetch all assets created for artifact identified by unique identifier.- Parameters:
identifier- of the artifact.- Returns:
- list assets.
- Throws:
AnalyticsModelingCheckedException- in case of error.
-
getMessages
public Messages getMessages()
Get messages about non critical action issues.- Returns:
- null if there is no issues, container with messages otherwise.
-
-