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 |
|---|---|
String |
addExternalSchemaAttribute(String userId,
SchemaAttribute schemaAttribute,
String externalSourceGUID,
String externalSourceName)
Add the schema type from an external source to the repository.
|
String |
addExternalSchemaType(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.
|
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.
|
SchemaAttributeBuilder |
getSchemaAttributeBuilder(SchemaAttribute schemaAttribute)
Return the appropriate schemaAttribute builder for the supplied schema attribute bean.
|
List<SchemaAttribute> |
getSchemaAttributes(String userId,
String schemaTypeGUID,
int elementStart,
int maxElements,
String methodName)
Returns a list of schema attributes for a schema type.
|
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,
String externalSourceGUID,
String externalSourceName,
String methodName)
Determine if the SchemaType object is stored in the repository and create it if it is not.
|
String |
saveSchemaAttribute(String userId,
String parentGUID,
SchemaAttribute schemaAttribute,
String methodName)
Work through the schema attributes adding or updating the instances
|
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.
|
String |
saveSchemaType(String userId,
SchemaType schemaType,
String methodName)
Determine if the SchemaType object is stored in the repository and create it if it is not.
|
String |
updateSchemaAttribute(String userId,
String existingSchemaAttributeGUID,
SchemaAttribute schemaAttribute)
Update a stored schemaAttribute.
|
String |
updateSchemaType(String userId,
String existingSchemaTypeGUID,
SchemaType schemaType)
Update a stored schemaType.
|
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 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 String saveSchemaAttribute(String userId, String parentGUID, SchemaAttribute schemaAttribute, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userIdparentGUID - anchor objectschemaAttribute - schema attribute object with embedded typemethodName - calling methodInvalidParameterException - the guid or 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 addExternalSchemaAttribute(String userId, SchemaAttribute schemaAttribute, String externalSourceGUID, String externalSourceName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userIdschemaAttribute - object to addexternalSourceGUID - unique identifier(guid) for the external source.externalSourceName - unique name for the external source.InvalidParameterException - the schemaAttribute bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic String updateSchemaAttribute(String userId, String existingSchemaAttributeGUID, SchemaAttribute schemaAttribute) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - userIdexistingSchemaAttributeGUID - unique identifier of the existing schemaAttribute entityschemaAttribute - new schemaAttribute valuesInvalidParameterException - the schemaAttribute bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic SchemaAttributeBuilder getSchemaAttributeBuilder(SchemaAttribute schemaAttribute)
schemaAttribute - object with propertiespublic 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 null. These attributes can not have
attributes nested themselves because the GUID is not returned to the caller.methodName - 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, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userIdschemaType - object to addmethodName - 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, String externalSourceGUID, String externalSourceName, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userIdschemaType - object to addexternalSourceGUID - 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 String addExternalSchemaType(String userId, SchemaType schemaType, String externalSourceGUID, String externalSourceName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userIdschemaType - object to addexternalSourceGUID - unique identifier(guid) for the external sourceexternalSourceName - unique name for the external sourceInvalidParameterException - the schemaType bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic String updateSchemaType(String userId, String existingSchemaTypeGUID, SchemaType schemaType) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - userIdexistingSchemaTypeGUID - unique identifier of the existing schemaType entityschemaType - new schemaType valuesInvalidParameterException - the schemaType 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.