Class SurveyAssetStore
java.lang.Object
org.odpi.openmetadata.frameworks.opensurvey.SurveyAssetStore
SurveyAssetStore defines the interface to a connector broker backed by an open metadata repository that returns
information about the Asset that a survey action service is to analyze. It is built around the Open Connector
Framework (OCF) services and Open Survey Framework (OGF).
-
Constructor Summary
ConstructorsConstructorDescriptionSurveyAssetStore
(String assetGUID, String userId, ConnectedAssetClient connectedAssetClient, AssetHandler assetHandler, AuditLog auditLog) Constructor sets up the key parameters for accessing the asset store. -
Method Summary
Modifier and TypeMethodDescriptionaddCSVFileToCatalog
(String displayName, String description, String pathName, List<String> columnHeaders, Character delimiterCharacter, Character quoteCharacter) Add a simple asset description linked to a connection object for a CSV file.Return the unique identifier for the asset.Returns a comprehensive collection of properties about the requested asset.getConnectorByConnection
(Connection connection) Returns the connector corresponding to the supplied connection.Return the connector to the requested asset.Returns a comprehensive collection of properties about the requested asset.
-
Constructor Details
-
SurveyAssetStore
public SurveyAssetStore(String assetGUID, String userId, ConnectedAssetClient connectedAssetClient, AssetHandler assetHandler, AuditLog auditLog) Constructor sets up the key parameters for accessing the asset store.- Parameters:
userId
- calling userassetGUID
- unique identifier of the asset that the annotations should be attached to
-
-
Method Details
-
getAssetGUID
Return the unique identifier for the asset.- Returns:
- guid
-
getConnectorByConnection
public Connector getConnectorByConnection(Connection connection) throws InvalidParameterException, ConnectionCheckedException, ConnectorCheckedException, UserNotAuthorizedException Returns the connector corresponding to the supplied connection.- Parameters:
connection
- the connection object that contains the properties needed to create the connection.- Returns:
- the connector instance
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.ConnectionCheckedException
- there are errors in the configuration of the connection which is preventing the creation of a connector.ConnectorCheckedException
- there are errors in the initialization of the connector.UserNotAuthorizedException
- connector disconnected
-
getAssetProperties
public OpenMetadataRootElement getAssetProperties() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionReturns a comprehensive collection of properties about the requested asset.- Returns:
- a comprehensive collection of properties about the asset.
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving the asset properties from the property servers.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getQualifiedName
public String getQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionReturns a comprehensive collection of properties about the requested asset.- Returns:
- a comprehensive collection of properties about the asset.
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving the asset properties from the property servers.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getConnectorToAsset
public Connector getConnectorToAsset() throws InvalidParameterException, ConnectionCheckedException, ConnectorCheckedException, UserNotAuthorizedException, PropertyServerExceptionReturn the connector to the requested asset.- Returns:
- Open Connector Framework (OCF) connector
- Throws:
InvalidParameterException
- the asset guid is not recognized or the userId is nullConnectionCheckedException
- there are errors in the configuration of the connection which is preventing the creation of a connector.ConnectorCheckedException
- there are errors in the initialization of the connector.UserNotAuthorizedException
- the user is not authorized to access the asset and/or connection needed to create the connector.PropertyServerException
- there was a problem in the store whether the asset/connection properties are kept.
-
addCSVFileToCatalog
public String addCSVFileToCatalog(String displayName, String description, String pathName, List<String> columnHeaders, Character delimiterCharacter, Character quoteCharacter) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Add a simple asset description linked to a connection object for a CSV file.- Parameters:
displayName
- display name for the file in the catalogdescription
- description of the file in the catalogpathName
- full path of the file - used to access the file through the connectorcolumnHeaders
- does the first line of the file contain the column names. If not pass the list of column headers.delimiterCharacter
- what is the delimiter character - null for default of commaquoteCharacter
- what is the character to group a field that contains delimiter characters- Returns:
- list of GUIDs from the top level to the root of the pathname
- Throws:
InvalidParameterException
- full path or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-