Class SchemaExchangeClientBase
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.assetmanager.client.ExchangeClientBase
-
- org.odpi.openmetadata.accessservices.assetmanager.client.SchemaExchangeClientBase
-
- All Implemented Interfaces:
SchemaExchangeInterface
- Direct Known Subclasses:
DataAssetExchangeClient,LineageExchangeClient
public class SchemaExchangeClientBase extends ExchangeClientBase implements SchemaExchangeInterface
ExchangeClientBase provides the base class for the clients that implement SchemaExchangeInterface
-
-
Constructor Summary
Constructors Constructor Description SchemaExchangeClientBase(String serverName, String serverPlatformURLRoot)Create a new client with no authentication embedded in the HTTP request.SchemaExchangeClientBase(String serverName, String serverPlatformURLRoot, String userId, String password)Create a new client that passes userId and password in each HTTP request.SchemaExchangeClientBase(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog)Create a new client that passes userId and password in each HTTP request.SchemaExchangeClientBase(String serverName, String serverPlatformURLRoot, AssetManagerRESTClient restClient, int maxPageSize, AuditLog auditLog)Create a new client that is going to be used in an OMAG Server.SchemaExchangeClientBase(String serverName, String serverPlatformURLRoot, AuditLog auditLog)Create a new client with no authentication embedded in the HTTP request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearColumnAsPrimaryKey(String userId, String assetManagerGUID, String assetManagerName, String schemaAttributeGUID, String schemaAttributeExternalIdentifier)Remove the primary key designation from the schema attribute.voidclearForeignKeyRelationship(String userId, String assetManagerGUID, String assetManagerName, String primaryKeyGUID, String foreignKeyGUID)Remove the foreign key relationship between two schema elements.voidclearSchemaElementAsCalculatedValue(String userId, String assetManagerGUID, String assetManagerName, String schemaElementGUID, String schemaElementExternalIdentifier)Remove the calculated value designation from the schema element.voidclearSchemaTypeParent(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID, String parentElementGUID, String parentElementTypeName)Remove the relationship between a schema type and its parent data asset, process or port.StringcreateSchemaAttribute(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaElementGUID, String schemaAttributeExternalIdentifier, String schemaAttributeExternalIdentifierName, String schemaAttributeExternalIdentifierUsage, String schemaAttributeExternalIdentifierSource, KeyPattern schemaAttributeExternalIdentifierKeyPattern, Map<String,String> mappingProperties, SchemaAttributeProperties schemaAttributeProperties)Create a new metadata element to represent a schema attribute.StringcreateSchemaAttributeFromTemplate(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaElementGUID, String templateGUID, String schemaAttributeExternalIdentifier, String schemaAttributeExternalIdentifierName, String schemaAttributeExternalIdentifierUsage, String schemaAttributeExternalIdentifierSource, KeyPattern schemaAttributeExternalIdentifierKeyPattern, Map<String,String> mappingProperties, TemplateProperties templateProperties)Create a new metadata element to represent a schema attribute using an existing metadata element as a template.StringcreateSchemaType(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaTypeExternalIdentifier, String schemaTypeExternalIdentifierName, String schemaTypeExternalIdentifierUsage, String schemaTypeExternalIdentifierSource, KeyPattern schemaTypeExternalIdentifierKeyPattern, Map<String,String> mappingProperties, SchemaTypeProperties schemaTypeProperties)Create a new metadata element to represent a schema type.StringcreateSchemaTypeFromTemplate(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String templateGUID, String schemaTypeExternalIdentifier, String schemaTypeExternalIdentifierName, String schemaTypeExternalIdentifierUsage, String schemaTypeExternalIdentifierSource, KeyPattern schemaTypeExternalIdentifierKeyPattern, Map<String,String> mappingProperties, TemplateProperties templateProperties)Create a new metadata element to represent a schema type using an existing metadata element as a template.List<SchemaAttributeElement>findSchemaAttributes(String userId, String assetManagerGUID, String assetManagerName, String searchString, int startFrom, int pageSize)Retrieve the list of schema attribute metadata elements that contain the search string.List<SchemaTypeElement>findSchemaType(String userId, String assetManagerGUID, String assetManagerName, String searchString, int startFrom, int pageSize)Retrieve the list of schema type metadata elements that contain the search string.List<SchemaAttributeElement>getAttributesForSchemaType(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID, int startFrom, int pageSize)Retrieve the list of schema attributes associated with a schemaType.SchemaAttributeElementgetSchemaAttributeByGUID(String userId, String assetManagerGUID, String assetManagerName, String schemaAttributeGUID)Retrieve the schema attribute metadata element with the supplied unique identifier.List<SchemaAttributeElement>getSchemaAttributesByName(String userId, String assetManagerGUID, String assetManagerName, String name, int startFrom, int pageSize)Retrieve the list of schema attribute metadata elements with a matching qualified or display name.SchemaTypeElementgetSchemaTypeByGUID(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID)Retrieve the schema type metadata element with the supplied unique identifier.List<SchemaTypeElement>getSchemaTypeByName(String userId, String assetManagerGUID, String assetManagerName, String name, int startFrom, int pageSize)Retrieve the list of schema type metadata elements with a matching qualified or display name.SchemaTypeElementgetSchemaTypeForElement(String userId, String assetManagerGUID, String assetManagerName, String parentElementGUID, String parentElementTypeName)Return the schema type associated with a specific open metadata element (data asset, process or port).ElementHeadergetSchemaTypeParent(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID)Retrieve the header of the metadata element connected to a schema type.voidremoveSchemaAttribute(String userId, String assetManagerGUID, String assetManagerName, String schemaAttributeGUID, String schemaAttributeExternalIdentifier)Remove the metadata element representing a schema attribute.voidremoveSchemaType(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID, String schemaTypeExternalIdentifier)Remove the metadata element representing a schema type.voidsetSchemaElementAsCalculatedValue(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaElementGUID, String schemaElementExternalIdentifier, String formula)Classify the schema type (or attribute if type is embedded) to indicate that it is a calculated value.voidsetupColumnAsPrimaryKey(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaAttributeGUID, String schemaAttributeExternalIdentifier, String primaryKeyName, KeyPattern primaryKeyPattern)Classify the column schema attribute to indicate that it describes a primary key.voidsetupForeignKeyRelationship(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String primaryKeyGUID, String foreignKeyGUID, ForeignKeyProperties foreignKeyProperties)Link two schema attributes together to show a foreign key relationship.voidsetupSchemaTypeParent(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaTypeGUID, String parentElementGUID, String parentElementTypeName)Connect a schema type to a data asset, process or port.voidupdateForeignKeyRelationship(String userId, String assetManagerGUID, String assetManagerName, String primaryKeyGUID, String foreignKeyGUID, ForeignKeyProperties foreignKeyProperties)Update the relationship properties for the query target.voidupdateSchemaAttribute(String userId, String assetManagerGUID, String assetManagerName, String schemaAttributeGUID, String schemaAttributeExternalIdentifier, boolean isMergeUpdate, SchemaAttributeProperties schemaAttributeProperties)Update the properties of the metadata element representing a schema attribute.voidupdateSchemaType(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID, String schemaTypeExternalIdentifier, boolean isMergeUpdate, SchemaTypeProperties schemaTypeProperties)Update the metadata element representing a schema type.
-
-
-
Constructor Detail
-
SchemaExchangeClientBase
public SchemaExchangeClientBase(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException
Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
SchemaExchangeClientBase
public SchemaExchangeClientBase(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST servers- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
SchemaExchangeClientBase
public SchemaExchangeClientBase(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException
Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requestsauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
SchemaExchangeClientBase
public SchemaExchangeClientBase(String serverName, String serverPlatformURLRoot, AssetManagerRESTClient restClient, int maxPageSize, AuditLog auditLog) throws InvalidParameterException
Create a new client that is going to be used in an OMAG Server.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversrestClient- client that issues the REST API callsmaxPageSize- maximum number of results supported by this serverauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
SchemaExchangeClientBase
public SchemaExchangeClientBase(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Detail
-
createSchemaType
public String createSchemaType(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaTypeExternalIdentifier, String schemaTypeExternalIdentifierName, String schemaTypeExternalIdentifierUsage, String schemaTypeExternalIdentifierSource, KeyPattern schemaTypeExternalIdentifierKeyPattern, Map<String,String> mappingProperties, SchemaTypeProperties schemaTypeProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a schema type.- Specified by:
createSchemaTypein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetManagerIsHome- ensure that only the asset manager can update this schema elementschemaTypeExternalIdentifier- unique identifier of the schema type in the external asset managerschemaTypeExternalIdentifierName- name of property for the external identifier in the external asset managerschemaTypeExternalIdentifierUsage- optional usage description for the external identifier when calling the external asset managerschemaTypeExternalIdentifierSource- component that issuing this request.schemaTypeExternalIdentifierKeyPattern- pattern for the external identifier within the external asset manager (default is LOCAL_KEY)mappingProperties- additional properties to help with the mapping of the elements in the external asset manager and open metadataschemaTypeProperties- properties about the schema type to store- Returns:
- unique identifier of the new schema type
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createSchemaTypeFromTemplate
public String createSchemaTypeFromTemplate(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String templateGUID, String schemaTypeExternalIdentifier, String schemaTypeExternalIdentifierName, String schemaTypeExternalIdentifierUsage, String schemaTypeExternalIdentifierSource, KeyPattern schemaTypeExternalIdentifierKeyPattern, Map<String,String> mappingProperties, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a schema type using an existing metadata element as a template.- Specified by:
createSchemaTypeFromTemplatein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetManagerIsHome- ensure that only the asset manager can update this schema elementtemplateGUID- unique identifier of the metadata element to copyschemaTypeExternalIdentifier- unique identifier of the schema type in the external asset managerschemaTypeExternalIdentifierName- name of property for the external identifier in the external asset managerschemaTypeExternalIdentifierUsage- optional usage description for the external identifier when calling the external asset managerschemaTypeExternalIdentifierSource- component that issuing this request.schemaTypeExternalIdentifierKeyPattern- pattern for the external identifier within the external asset manager (default is LOCAL_KEY)mappingProperties- additional properties to help with the mapping of the elements in the external asset manager and open metadatatemplateProperties- properties that override the template- Returns:
- unique identifier of the new schema type
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
updateSchemaType
public void updateSchemaType(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID, String schemaTypeExternalIdentifier, boolean isMergeUpdate, SchemaTypeProperties schemaTypeProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the metadata element representing a schema type.- Specified by:
updateSchemaTypein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerschemaTypeGUID- unique identifier of the metadata element to updateschemaTypeExternalIdentifier- unique identifier of the schema type in the external asset managerisMergeUpdate- should the new properties be merged with existing properties (true) or completely replace them (false)?schemaTypeProperties- new properties for the metadata element- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
setupSchemaTypeParent
public void setupSchemaTypeParent(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaTypeGUID, String parentElementGUID, String parentElementTypeName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Connect a schema type to a data asset, process or port.- Specified by:
setupSchemaTypeParentin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetManagerIsHome- ensure that only the asset manager can update this relationshipschemaTypeGUID- unique identifier of the schema type to connectparentElementGUID- unique identifier of the open metadata element that this schema type is to be connected toparentElementTypeName- unique type name of the open metadata element that this schema type is to be connected to- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
clearSchemaTypeParent
public void clearSchemaTypeParent(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID, String parentElementGUID, String parentElementTypeName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the relationship between a schema type and its parent data asset, process or port.- Specified by:
clearSchemaTypeParentin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerschemaTypeGUID- unique identifier of the schema type to connectparentElementGUID- unique identifier of the open metadata element that this schema type is to be connected toparentElementTypeName- unique type name of the open metadata element that this schema type is to be connected to- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
removeSchemaType
public void removeSchemaType(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID, String schemaTypeExternalIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the metadata element representing a schema type.- Specified by:
removeSchemaTypein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerschemaTypeGUID- unique identifier of the metadata element to removeschemaTypeExternalIdentifier- unique identifier of the schema type in the external asset manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
findSchemaType
public List<SchemaTypeElement> findSchemaType(String userId, String assetManagerGUID, String assetManagerName, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of schema type metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findSchemaTypein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callersearchString- string to find in the propertiesstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getSchemaTypeForElement
public SchemaTypeElement getSchemaTypeForElement(String userId, String assetManagerGUID, String assetManagerName, String parentElementGUID, String parentElementTypeName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the schema type associated with a specific open metadata element (data asset, process or port).- Specified by:
getSchemaTypeForElementin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerparentElementGUID- unique identifier of the open metadata element that this schema type is to be connected toparentElementTypeName- unique type name of the open metadata element that this schema type is to be connected to- Returns:
- metadata element describing the schema type associated with the requested parent element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getSchemaTypeByName
public List<SchemaTypeElement> getSchemaTypeByName(String userId, String assetManagerGUID, String assetManagerName, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of schema type metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getSchemaTypeByNamein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callername- name to search forstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getSchemaTypeByGUID
public SchemaTypeElement getSchemaTypeByGUID(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the schema type metadata element with the supplied unique identifier.- Specified by:
getSchemaTypeByGUIDin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerschemaTypeGUID- unique identifier of the requested metadata element- Returns:
- requested metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getSchemaTypeParent
public ElementHeader getSchemaTypeParent(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the header of the metadata element connected to a schema type.- Specified by:
getSchemaTypeParentin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerschemaTypeGUID- unique identifier of the requested metadata element- Returns:
- header for parent element (data asset, process, port)
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createSchemaAttribute
public String createSchemaAttribute(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaElementGUID, String schemaAttributeExternalIdentifier, String schemaAttributeExternalIdentifierName, String schemaAttributeExternalIdentifierUsage, String schemaAttributeExternalIdentifierSource, KeyPattern schemaAttributeExternalIdentifierKeyPattern, Map<String,String> mappingProperties, SchemaAttributeProperties schemaAttributeProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a schema attribute.- Specified by:
createSchemaAttributein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetManagerIsHome- ensure that only the asset manager can update this schema attributeschemaElementGUID- unique identifier of the schemaType or Schema Attribute where the schema attribute is connected toschemaAttributeExternalIdentifier- unique identifier of the schema attribute in the external asset managerschemaAttributeExternalIdentifierName- name of property for the external identifier in the external asset managerschemaAttributeExternalIdentifierUsage- optional usage description for the external identifier when calling the external asset managerschemaAttributeExternalIdentifierSource- component that issuing this request.schemaAttributeExternalIdentifierKeyPattern- pattern for the external identifier within the external asset manager (default is LOCAL_KEY)mappingProperties- additional properties to help with the mapping of the elements in the external asset manager and open metadataschemaAttributeProperties- properties for the schema attribute- Returns:
- unique identifier of the new metadata element for the schema attribute
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createSchemaAttributeFromTemplate
public String createSchemaAttributeFromTemplate(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaElementGUID, String templateGUID, String schemaAttributeExternalIdentifier, String schemaAttributeExternalIdentifierName, String schemaAttributeExternalIdentifierUsage, String schemaAttributeExternalIdentifierSource, KeyPattern schemaAttributeExternalIdentifierKeyPattern, Map<String,String> mappingProperties, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a schema attribute using an existing metadata element as a template.- Specified by:
createSchemaAttributeFromTemplatein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetManagerIsHome- ensure that only the asset manager can update this schema attributeschemaElementGUID- unique identifier of the schemaType or Schema Attribute where the schema attribute is connected totemplateGUID- unique identifier of the metadata element to copyschemaAttributeExternalIdentifier- unique identifier of the schema attribute in the external asset managerschemaAttributeExternalIdentifierName- name of property for the external identifier in the external asset managerschemaAttributeExternalIdentifierUsage- optional usage description for the external identifier when calling the external asset managerschemaAttributeExternalIdentifierSource- component that issuing this request.schemaAttributeExternalIdentifierKeyPattern- pattern for the external identifier within the external asset manager (default is LOCAL_KEY)mappingProperties- additional properties to help with the mapping of the elements in the external asset manager and open metadatatemplateProperties- properties that override the template- Returns:
- unique identifier of the new metadata element for the schema attribute
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
updateSchemaAttribute
public void updateSchemaAttribute(String userId, String assetManagerGUID, String assetManagerName, String schemaAttributeGUID, String schemaAttributeExternalIdentifier, boolean isMergeUpdate, SchemaAttributeProperties schemaAttributeProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the properties of the metadata element representing a schema attribute.- Specified by:
updateSchemaAttributein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerschemaAttributeGUID- unique identifier of the schema attribute to updateschemaAttributeExternalIdentifier- unique identifier of the schema attribute in the external asset managerisMergeUpdate- should the new properties be merged with existing properties (true) or completely replace them (false)?schemaAttributeProperties- new properties for the schema attribute- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
setSchemaElementAsCalculatedValue
public void setSchemaElementAsCalculatedValue(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaElementGUID, String schemaElementExternalIdentifier, String formula) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Classify the schema type (or attribute if type is embedded) to indicate that it is a calculated value.- Specified by:
setSchemaElementAsCalculatedValuein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetManagerIsHome- ensure that only the asset manager can update this classificationschemaElementGUID- unique identifier of the metadata element to updateschemaElementExternalIdentifier- unique identifier of the schema element in the external asset manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
clearSchemaElementAsCalculatedValue
public void clearSchemaElementAsCalculatedValue(String userId, String assetManagerGUID, String assetManagerName, String schemaElementGUID, String schemaElementExternalIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the calculated value designation from the schema element.- Specified by:
clearSchemaElementAsCalculatedValuein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerschemaElementGUID- unique identifier of the metadata element to updateschemaElementExternalIdentifier- unique identifier of the schema element in the external asset manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
setupColumnAsPrimaryKey
public void setupColumnAsPrimaryKey(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String schemaAttributeGUID, String schemaAttributeExternalIdentifier, String primaryKeyName, KeyPattern primaryKeyPattern) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Classify the column schema attribute to indicate that it describes a primary key.- Specified by:
setupColumnAsPrimaryKeyin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetManagerIsHome- ensure that only the asset manager can update this classificationschemaAttributeGUID- unique identifier of the metadata element to updateschemaAttributeExternalIdentifier- unique identifier of the schema attribute in the external asset managerprimaryKeyName- name of the primary key (if different from the column name)primaryKeyPattern- key pattern used to maintain the primary key- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
clearColumnAsPrimaryKey
public void clearColumnAsPrimaryKey(String userId, String assetManagerGUID, String assetManagerName, String schemaAttributeGUID, String schemaAttributeExternalIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the primary key designation from the schema attribute.- Specified by:
clearColumnAsPrimaryKeyin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerschemaAttributeGUID- unique identifier of the metadata element to updateschemaAttributeExternalIdentifier- unique identifier of the schema attribute in the external asset manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
setupForeignKeyRelationship
public void setupForeignKeyRelationship(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String primaryKeyGUID, String foreignKeyGUID, ForeignKeyProperties foreignKeyProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Link two schema attributes together to show a foreign key relationship.- Specified by:
setupForeignKeyRelationshipin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetManagerIsHome- ensure that only the asset manager can update this relationshipprimaryKeyGUID- unique identifier of the derived schema elementforeignKeyGUID- unique identifier of the query target schema elementforeignKeyProperties- properties for the foreign key relationship- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
updateForeignKeyRelationship
public void updateForeignKeyRelationship(String userId, String assetManagerGUID, String assetManagerName, String primaryKeyGUID, String foreignKeyGUID, ForeignKeyProperties foreignKeyProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the relationship properties for the query target.- Specified by:
updateForeignKeyRelationshipin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerprimaryKeyGUID- unique identifier of the derived schema elementforeignKeyGUID- unique identifier of the query target schema elementforeignKeyProperties- properties for the foreign key relationship- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
clearForeignKeyRelationship
public void clearForeignKeyRelationship(String userId, String assetManagerGUID, String assetManagerName, String primaryKeyGUID, String foreignKeyGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the foreign key relationship between two schema elements.- Specified by:
clearForeignKeyRelationshipin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerprimaryKeyGUID- unique identifier of the derived schema elementforeignKeyGUID- unique identifier of the query target schema element- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
removeSchemaAttribute
public void removeSchemaAttribute(String userId, String assetManagerGUID, String assetManagerName, String schemaAttributeGUID, String schemaAttributeExternalIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the metadata element representing a schema attribute.- Specified by:
removeSchemaAttributein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerschemaAttributeGUID- unique identifier of the metadata element to removeschemaAttributeExternalIdentifier- unique identifier of the schema attribute in the external asset manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
findSchemaAttributes
public List<SchemaAttributeElement> findSchemaAttributes(String userId, String assetManagerGUID, String assetManagerName, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of schema attribute metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findSchemaAttributesin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callersearchString- string to find in the propertiesstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getAttributesForSchemaType
public List<SchemaAttributeElement> getAttributesForSchemaType(String userId, String assetManagerGUID, String assetManagerName, String schemaTypeGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of schema attributes associated with a schemaType.- Specified by:
getAttributesForSchemaTypein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerschemaTypeGUID- unique identifier of the schemaType of intereststartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of associated metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getSchemaAttributesByName
public List<SchemaAttributeElement> getSchemaAttributesByName(String userId, String assetManagerGUID, String assetManagerName, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of schema attribute metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getSchemaAttributesByNamein interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callername- name to search forstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getSchemaAttributeByGUID
public SchemaAttributeElement getSchemaAttributeByGUID(String userId, String assetManagerGUID, String assetManagerName, String schemaAttributeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the schema attribute metadata element with the supplied unique identifier.- Specified by:
getSchemaAttributeByGUIDin interfaceSchemaExchangeInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerschemaAttributeGUID- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
-