Class SchemaTypeHandler
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.ocf.metadatamanagement.handlers.RootHandler
-
- org.odpi.openmetadata.commonservices.ocf.metadatamanagement.handlers.SchemaTypeHandler
-
public class SchemaTypeHandler extends RootHandler
SchemaTypeHandler manages SchemaType objects. It runs server-side in the OMAG Server Platform and retrieves SchemaType entities through the OMRSRepositoryConnector.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.commonservices.ocf.metadatamanagement.handlers.RootHandler
invalidParameterHandler, repositoryHandler, repositoryHelper, serverName, serviceName
-
-
Constructor Summary
Constructors Constructor Description SchemaTypeHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper)Construct the handler information needed to interact with the repository services
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaddExternalSchemaType(String userId, SchemaType schemaType, String externalSourceGUID, String externalSourceName)Add the schema type from an external source to the repository along with any schema types embedded within it.ComplexSchemaTypegetEmptyComplexSchemaType(String schemaTypeGUID, String schemaTypeName)Return the requested schemaType with the specific type information filled in.SchemaAttributegetEmptyTabularColumn()Return a schema attribute object with the type set up.SchemaAttributeBuildergetSchemaAttributeBuilder(SchemaAttribute schemaAttribute)Return the appropriate schemaAttribute builder for the supplied schema attribute bean.-
Methods inherited from class org.odpi.openmetadata.commonservices.ocf.metadatamanagement.handlers.RootHandler
getRepositoryHelper, getServiceName
-
-
-
-
Constructor Detail
-
SchemaTypeHandler
public SchemaTypeHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper)
Construct the handler information needed to interact with the repository services- Parameters:
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 objects
-
-
Method Detail
-
getEmptyComplexSchemaType
public ComplexSchemaType getEmptyComplexSchemaType(String schemaTypeGUID, String schemaTypeName)
Return the requested schemaType with the specific type information filled in. There is no validation of the type name and the bean is assumed to be for the local cohort.- Parameters:
schemaTypeGUID- unique identifier of the required typeschemaTypeName- unique name of the required type- Returns:
- new object
-
getEmptyTabularColumn
public SchemaAttribute getEmptyTabularColumn()
Return a schema attribute object with the type set up. This is for columns that are created in the local cohort only.- Returns:
- new object
-
getSchemaAttributeBuilder
public SchemaAttributeBuilder getSchemaAttributeBuilder(SchemaAttribute schemaAttribute)
Return the appropriate schemaAttribute builder for the supplied schema attribute bean.- Parameters:
schemaAttribute- object with properties- Returns:
- builder object.
-
addExternalSchemaType
public String addExternalSchemaType(String userId, SchemaType schemaType, String externalSourceGUID, String externalSourceName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Add the schema type from an external source to the repository along with any schema types embedded within it.- Parameters:
userId- calling userIdschemaType- object to addexternalSourceGUID- unique identifier(guid) for the external sourceexternalSourceName- unique name for the external source- Returns:
- unique identifier of the schemaType in the repository.
- Throws:
InvalidParameterException- the schemaType bean properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
-