Class SurveyAssetStoreClient
java.lang.Object
org.odpi.openmetadata.frameworks.surveyaction.SurveyAssetStore
org.odpi.openmetadata.accessservices.assetowner.client.SurveyAssetStoreClient
public class SurveyAssetStoreClient
extends org.odpi.openmetadata.frameworks.surveyaction.SurveyAssetStore
SurveyAssetStoreClient provides a concrete implementation of the SurveyAssetStore for the
Survey Action Framework (SAF). It delegates the work to the supplied connected asset client.
-
Constructor Summary
ConstructorsConstructorDescriptionSurveyAssetStoreClient(String assetGUID, String userId, ConnectedAssetClient connectedAssetClient, FileSystemAssetOwner fileSystemAssetOwner, CSVFileAssetOwner csvFileAssetOwner, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Constructor. -
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.addDataFileAssetToCatalog(String displayName, String description, String pathName) Creates a new data file asset and links it to the folder structure implied in the path name.org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverseReturns a comprehensive collection of properties about the requested asset.org.odpi.openmetadata.frameworks.connectors.ConnectorgetConnectorByConnection(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) Returns the connector corresponding to the supplied connection.org.odpi.openmetadata.frameworks.connectors.ConnectorReturn the connector to the requested asset.voidlogAssetAuditMessage(String surveyService, String message) Log an audit message about this asset.Methods inherited from class org.odpi.openmetadata.frameworks.surveyaction.SurveyAssetStore
getAssetGUID
-
Constructor Details
-
SurveyAssetStoreClient
public SurveyAssetStoreClient(String assetGUID, String userId, ConnectedAssetClient connectedAssetClient, FileSystemAssetOwner fileSystemAssetOwner, CSVFileAssetOwner csvFileAssetOwner, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Constructor.- Parameters:
assetGUID- unique identifier for the asset unuserId- calling userconnectedAssetClient- connected asset client implements the REST API calls needed to support the OCF calls.fileSystemAssetOwner- client to work with files and folderscsvFileAssetOwner- client to work with CSV files
-
-
Method Details
-
getConnectorByConnection
public org.odpi.openmetadata.frameworks.connectors.Connector getConnectorByConnection(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException Returns the connector corresponding to the supplied connection.- Specified by:
getConnectorByConnectionin classorg.odpi.openmetadata.frameworks.surveyaction.SurveyAssetStore- Parameters:
connection- the connection object that contains the properties needed to create the connection.- Returns:
- Connector connector instance
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException- there are errors in the configuration of the connection which is preventing the creation of a connector.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- there are errors in the initialization of the connector.
-
getAssetProperties
public org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverse getAssetProperties() throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedExceptionReturns a comprehensive collection of properties about the requested asset.- Specified by:
getAssetPropertiesin classorg.odpi.openmetadata.frameworks.surveyaction.SurveyAssetStore- Returns:
- a comprehensive collection of properties about the asset.
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving the asset properties from the property servers.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
logAssetAuditMessage
public void logAssetAuditMessage(String surveyService, String message) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Log an audit message about this asset.- Specified by:
logAssetAuditMessagein classorg.odpi.openmetadata.frameworks.surveyaction.SurveyAssetStore- Parameters:
surveyService- name of survey servicemessage- message to log- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving the asset properties from the property servers.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getConnectorToAsset
public org.odpi.openmetadata.frameworks.connectors.Connector getConnectorToAsset() throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionReturn the connector to the requested asset.- Specified by:
getConnectorToAssetin classorg.odpi.openmetadata.frameworks.surveyaction.SurveyAssetStore- Returns:
- Open Connector Framework (OCF) connector
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- the asset guid is not recognized or the userId is nullorg.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException- there are errors in the configuration of the connection which is preventing the creation of a connector.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- there are errors in the initialization of the connector.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the user is not authorized to access the asset and/or connection needed to create the connector.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there was a problem in the store whether the asset/connection properties are kept.
-
addDataFileAssetToCatalog
public String addDataFileAssetToCatalog(String displayName, String description, String pathName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Creates a new data file asset and links it to the folder structure implied in the path name. If the folder structure is not catalogued already, this is created automatically using the createFolderStructureInCatalog() method. For example, a pathName of "one/two/three/MyFile.txt" potentially creates 3 new folder assets, one called "one", the next called "one/two" and the last one called "one/two/three" plus a file asset called "one/two/three/MyFile.txt".- Specified by:
addDataFileAssetToCatalogin classorg.odpi.openmetadata.frameworks.surveyaction.SurveyAssetStore- Parameters:
displayName- display name for the file in the catalogdescription- description of the file in the catalogpathName- pathname of the data file- Returns:
- list of GUIDs from the top level to the root of the pathname
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalidorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
addCSVFileToCatalog
public String addCSVFileToCatalog(String displayName, String description, String pathName, List<String> columnHeaders, Character delimiterCharacter, Character quoteCharacter) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Add a simple asset description linked to a connection object for a CSV file.- Specified by:
addCSVFileToCatalogin classorg.odpi.openmetadata.frameworks.surveyaction.SurveyAssetStore- 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:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- full path or userId is nullorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-