public class SchemaTypeHandler extends Object
| Constructor and Description |
|---|
SchemaTypeHandler(String serviceName,
String serverName,
InvalidParameterHandler invalidParameterHandler,
RepositoryHandler repositoryHandler,
OMRSRepositoryHelper repositoryHelper,
LastAttachmentHandler lastAttachmentHandler)
Construct the handler information needed to interact with the repository services
|
| Modifier and Type | Method and Description |
|---|---|
int |
countSchemaAttributes(String userId,
String schemaTypeGUID,
String methodName)
Count the number of connection attached to an anchor asset.
|
ComplexSchemaType |
getEmptyComplexSchemaType(String schemaTypeGUID,
String schemaTypeName)
Return the requested schemaType with the specific type information filled in.
|
PrimitiveSchemaType |
getEmptyPrimitiveSchemaType(String schemaTypeGUID,
String schemaTypeName)
Return the requested schemaType with the specific type information filled in.
|
SchemaAttribute |
getEmptySchemaAttribute()
Return a schema attribute object with the type set up.
|
SchemaAttribute |
getEmptyTabularColumn()
Return a schema attribute object with the type set up.
|
List<SchemaAttribute> |
getSchemaAttributes(String userId,
String schemaTypeGUID,
int elementStart,
int maxElements,
String methodName)
Returns a list of schema attributes for a schema type.
|
SchemaType |
getSchemaTypeForAsset(String userId,
String anchorGUID,
String methodName)
Is there an attached schema for the Asset?
|
SchemaType |
getSchemaTypeForAttribute(String userId,
String anchorGUID,
String methodName)
Is there an attached schema for the SchemaAttribute?
|
List<SchemaAttribute> |
getTabularSchemaColumns(String parentSchemaQualifiedName,
List<String> columnHeaders)
Turn the list of column headers into a SchemaType object.
|
SchemaType |
getTabularSchemaType(String anchorQualifiedName,
String anchorDisplayName,
String author,
String encodingStandard,
List<String> columnHeaders)
Turn the list of column headers into a SchemaType object.
|
void |
removeSchemaAttribute(String userId,
String schemaAttributeGUID)
Remove the requested schemaAttribute if it is no longer connected to any other entity.
|
void |
removeSchemaType(String userId,
String schemaTypeGUID)
Remove the requested schemaType if it is no longer connected to any other entity.
|
void |
saveExternalSchemaAttributes(String userId,
String schemaTypeGUID,
List<SchemaAttribute> schemaAttributes,
String externalSourceGUID,
String externalSourceName,
String methodName)
Work through the schema attributes from an external source adding or updating the instances
|
String |
saveExternalSchemaType(String userId,
SchemaType schemaType,
List<SchemaAttribute> schemaAttributes,
String externalSourceGUID,
String externalSourceName,
String methodName)
Determine if the SchemaType object is stored in the repository and create it if it is not.
|
void |
saveSchemaAttributes(String userId,
String schemaTypeGUID,
List<SchemaAttribute> schemaAttributes,
String methodName)
Work through the schema attributes adding or updating the instances
|
String |
saveSchemaType(String userId,
SchemaType schemaType,
List<SchemaAttribute> schemaAttributes,
String methodName)
Determine if the SchemaType object is stored in the repository and create it if it is not.
|
public SchemaTypeHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, LastAttachmentHandler lastAttachmentHandler)
serviceName - name of this serviceserverName - name of the local serverinvalidParameterHandler - handler for managing parameter errorsrepositoryHandler - manages calls to the repository servicesrepositoryHelper - provides utilities for manipulating the repository services objectslastAttachmentHandler - handler for recording last attachmentpublic ComplexSchemaType getEmptyComplexSchemaType(String schemaTypeGUID, String schemaTypeName)
schemaTypeGUID - unique identifier of the required typeschemaTypeName - unique name of the required typepublic PrimitiveSchemaType getEmptyPrimitiveSchemaType(String schemaTypeGUID, String schemaTypeName)
schemaTypeGUID - unique identifier of the required typeschemaTypeName - unique name of the required typepublic SchemaAttribute getEmptySchemaAttribute()
public SchemaAttribute getEmptyTabularColumn()
public SchemaType getSchemaTypeForAsset(String userId, String anchorGUID, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling useranchorGUID - identifier for the entity that the object is attached tomethodName - calling methodInvalidParameterException - the schemaType bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic SchemaType getSchemaTypeForAttribute(String userId, String anchorGUID, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling useranchorGUID - identifier for the entity that the object is attached tomethodName - calling methodInvalidParameterException - the schemaType bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic SchemaType getTabularSchemaType(String anchorQualifiedName, String anchorDisplayName, String author, String encodingStandard, List<String> columnHeaders)
anchorQualifiedName - unique name for the object that this schema is connected toanchorDisplayName - human-readable name for the object that this schema is connected toauthor - userId of authorencodingStandard - internal encodingcolumnHeaders - list of column headers.public List<SchemaAttribute> getTabularSchemaColumns(String parentSchemaQualifiedName, List<String> columnHeaders)
parentSchemaQualifiedName - name of the linked schema's qualified namecolumnHeaders - list of column names.public int countSchemaAttributes(String userId, String schemaTypeGUID, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userschemaTypeGUID - identifier for the parent schema typemethodName - calling methodInvalidParameterException - the parameters are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic List<SchemaAttribute> getSchemaAttributes(String userId, String schemaTypeGUID, int elementStart, int maxElements, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - String userId of user making request.schemaTypeGUID - String unique id for containing schema type.elementStart - int starting position for first returned element.maxElements - int maximum number of elements to return on the call.methodName - calling methodInvalidParameterException - - the GUID is not recognized or the paging values are invalid orPropertyServerException - - there is a problem retrieving the asset properties from the property server orUserNotAuthorizedException - - the requesting user is not authorized to issue this request.public void saveSchemaAttributes(String userId, String schemaTypeGUID, List<SchemaAttribute> schemaAttributes, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userIdschemaTypeGUID - anchor objectschemaAttributes - list of nested schema attribute objects or nullmethodName - calling methodInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic void saveExternalSchemaAttributes(String userId, String schemaTypeGUID, List<SchemaAttribute> schemaAttributes, String externalSourceGUID, String externalSourceName, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userIdschemaTypeGUID - anchor objectschemaAttributes - list of nested schema attribute objects or nullexternalSourceGUID - unique identifier of the external sourceexternalSourceName - unique name of the external sourcemethodName - calling methodInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic String saveSchemaType(String userId, SchemaType schemaType, List<SchemaAttribute> schemaAttributes, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userIdschemaType - object to addschemaAttributes - list of nested schema attribute objects or nullmethodName - calling methodInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic String saveExternalSchemaType(String userId, SchemaType schemaType, List<SchemaAttribute> schemaAttributes, String externalSourceGUID, String externalSourceName, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userIdschemaType - object to addschemaAttributes - list of nested schema attribute objects or nullexternalSourceGUID - unique identifier(guid) for the external sourceexternalSourceName - unique name for the external sourcemethodName - calling methodInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic void removeSchemaType(String userId, String schemaTypeGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userschemaTypeGUID - object to deleteInvalidParameterException - the entity guid is not knownUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic void removeSchemaAttribute(String userId, String schemaAttributeGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userschemaAttributeGUID - object to deleteInvalidParameterException - the entity guid is not knownUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverCopyright © 2018–2020 ODPi. All rights reserved.