public class RepositoryErrorHandler extends Object
| Constructor and Description |
|---|
RepositoryErrorHandler(OMRSRepositoryHelper repositoryHelper,
String serviceName,
String serverName)
Typical constructor providing access to the repository connector for this access service.
|
RepositoryErrorHandler(OMRSRepositoryHelper repositoryHelper,
String serviceName,
String serverName,
AuditLog auditLog)
Typical constructor providing access to the repository connector for this access service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handleAmbiguousEntityName(String name,
String nameParameterName,
String entityTypeName,
List<EntityDetail> returnedEntities,
String methodName)
Throw an exception if multiple entities are returned when not expected.
|
void |
handleAmbiguousName(String name,
String nameParameterName,
String entityTypeName,
List<String> returnedEntityGUIDs,
String methodName)
Throw an exception if multiple entities are returned when not expected.
|
void |
handleAmbiguousRelationships(String entityGUID,
String entityTypeName,
String relationshipTypeName,
List<Relationship> returnedRelationships,
String methodName)
Throw an exception if multiple relationships are returned when not expected.
|
void |
handleDuplicateCreateRequest(String typeName,
String qualifiedName,
String existingEntityGUID,
String methodName)
Report an error where an entity is being created with the same qualified name as an existing entity
of the same type.
|
void |
handleEntityProxy(Throwable error,
String entityGUID,
String entityTypeName,
String methodName,
String guidParameterName)
Throw an exception if there is a problem with the asset guid
|
void |
handleNoEntity(String entityTypeGUID,
String entityTypeName,
InstanceProperties properties,
String methodName)
Throw an exception if it is not possible to create an entity.
|
void |
handleNoEntityForClassification(String entityGUID,
String classificationTypeGUID,
String classificationTypeName,
InstanceProperties properties,
String methodName)
Throw an exception if it is not possible to update an entity.
|
void |
handleNoRelationship(String entityGUID,
String entityTypeName,
String relationshipTypeName,
String methodName)
Throw an exception if no relationships are returned when not expected.
|
void |
handleRepositoryError(Throwable error,
String methodName)
Throw an exception if an unexpected repository error is received
|
void |
handleRepositoryError(Throwable error,
String methodName,
String localMethodName)
Throw an exception if an unexpected repository error is received
|
void |
handleUnauthorizedUser(String userId,
String methodName)
Throw an exception if the supplied userId is not authorized to perform a request
|
void |
handleUnknownEntity(Throwable error,
String entityGUID,
String entityTypeName,
String methodName,
String guidParameterName)
Throw an exception if there is a problem with the entity guid
|
void |
handleUnknownRelationship(Throwable error,
String relationshipGUID,
String relationshipTypeName,
String methodName,
String guidParameterName)
Throw an exception if there is a problem with the relationship guid
|
void |
handleUnsupportedAnchorsType(Throwable error,
String methodName,
String typeName)
Throw an exception if the supplied userId is not authorized to perform a request
|
void |
handleUnsupportedParameter(String methodName,
String parameterName,
String parameterValue)
Throw an exception if the supplied parameter is invalid.
|
void |
handleUnsupportedProperty(Throwable error,
String methodName,
String propertyName)
Throw an exception if the supplied property is not supported
|
void |
handleUnsupportedType(Throwable error,
String methodName,
String typeName)
Throw an exception if the supplied type name is not supported i nthe metadta
|
void |
validateRepositoryConnector(OMRSRepositoryConnector repositoryConnector,
String methodName)
Check that there is a repository connector.
|
public RepositoryErrorHandler(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)
repositoryHelper - access to the repository helper.serviceName - name of this access serviceserverName - name of this serverpublic RepositoryErrorHandler(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName, AuditLog auditLog)
repositoryHelper - access to the repository helper.serviceName - name of this access serviceserverName - name of this serverauditLog - logging destinationpublic void validateRepositoryConnector(OMRSRepositoryConnector repositoryConnector, String methodName) throws PropertyServerException
methodName - name of the method being calledrepositoryConnector - connector objectPropertyServerException - exception thrown if the repository connectorpublic void handleDuplicateCreateRequest(String typeName, String qualifiedName, String existingEntityGUID, String methodName) throws InvalidParameterException
typeName - name of the typequalifiedName - clashing qualified nameexistingEntityGUID - existing entity found in the repositorymethodName - calling methodInvalidParameterException - exception that reports this errorpublic void handleUnauthorizedUser(String userId, String methodName) throws UserNotAuthorizedException
userId - user name to validatemethodName - name of the method making the call.UserNotAuthorizedException - the userId is unauthorised for the requestpublic void handleUnsupportedProperty(Throwable error, String methodName, String propertyName) throws InvalidParameterException
error - caught exceptionmethodName - name of the method making the callpropertyName - name of the property in errorInvalidParameterException - invalid propertypublic void handleUnsupportedParameter(String methodName, String parameterName, String parameterValue) throws InvalidParameterException
methodName - name of the method making the callparameterName - name of the parameter in errorparameterValue - value of the parameterInvalidParameterException - invalid propertypublic void handleUnsupportedType(Throwable error, String methodName, String typeName) throws InvalidParameterException
error - caught exceptionmethodName - name of the method making the calltypeName - name of the property in errorInvalidParameterException - invalid propertypublic void handleUnsupportedAnchorsType(Throwable error, String methodName, String typeName)
error - caught exceptionmethodName - name of the method making the calltypeName - name of the property in errorpublic void handleRepositoryError(Throwable error, String methodName) throws PropertyServerException
error - caught exceptionmethodName - name of the method making the call.PropertyServerException - unexpected exception from property serverpublic void handleRepositoryError(Throwable error, String methodName, String localMethodName) throws PropertyServerException
error - caught exceptionmethodName - name of the method called by the external partylocalMethodName - name of method that called this errorPropertyServerException - unexpected exception from property serverpublic void handleUnknownEntity(Throwable error, String entityGUID, String entityTypeName, String methodName, String guidParameterName) throws InvalidParameterException
error - caught exceptionentityGUID - unique identifier for the requested entityentityTypeName - expected type of assetmethodName - name of the method making the callguidParameterName - name of the parameter that passed the GUID.InvalidParameterException - unexpected exception from property serverpublic void handleUnknownRelationship(Throwable error, String relationshipGUID, String relationshipTypeName, String methodName, String guidParameterName) throws InvalidParameterException
error - caught exceptionrelationshipGUID - unique identifier for the requested entityrelationshipTypeName - expected type of assetmethodName - name of the method making the callguidParameterName - name of the parameter that passed the GUID.InvalidParameterException - unexpected exception from property serverpublic void handleEntityProxy(Throwable error, String entityGUID, String entityTypeName, String methodName, String guidParameterName) throws InvalidParameterException
error - caught exceptionentityGUID - unique identifier for the requested entityentityTypeName - expected type of assetmethodName - name of the method making the callguidParameterName - name of the parameter that passed the GUID.InvalidParameterException - unexpected exception from property serverpublic void handleAmbiguousRelationships(String entityGUID, String entityTypeName, String relationshipTypeName, List<Relationship> returnedRelationships, String methodName) throws PropertyServerException
entityGUID - unique identifier for the anchor entityentityTypeName - name of the entity's typerelationshipTypeName - expected type of relationshipreturnedRelationships - list of relationships returnedmethodName - name of the method making the callPropertyServerException - unexpected response from property serverpublic void handleAmbiguousEntityName(String name, String nameParameterName, String entityTypeName, List<EntityDetail> returnedEntities, String methodName) throws PropertyServerException
name - requested name for the entitynameParameterName - name of the parameterentityTypeName - name of the entity's typereturnedEntities - list of entities returnedmethodName - name of the method making the callPropertyServerException - unexpected response from property serverpublic void handleAmbiguousName(String name, String nameParameterName, String entityTypeName, List<String> returnedEntityGUIDs, String methodName) throws PropertyServerException
name - requested name for the entitynameParameterName - name of the parameterentityTypeName - name of the entity's typereturnedEntityGUIDs - list of entities returnedmethodName - name of the method making the callPropertyServerException - unexpected response from property serverpublic void handleNoRelationship(String entityGUID, String entityTypeName, String relationshipTypeName, String methodName) throws PropertyServerException
entityGUID - unique identifier for the anchor entityentityTypeName - name of the entity's typerelationshipTypeName - expected type of relationshipmethodName - name of the method making the callPropertyServerException - unexpected response from property serverpublic void handleNoEntity(String entityTypeGUID, String entityTypeName, InstanceProperties properties, String methodName) throws PropertyServerException
entityTypeGUID - unique identifier for the entity's typeentityTypeName - name of the entity's typeproperties - propertiesmethodName - name of the method making the callPropertyServerException - unexpected response from property serverpublic void handleNoEntityForClassification(String entityGUID, String classificationTypeGUID, String classificationTypeName, InstanceProperties properties, String methodName) throws PropertyServerException
entityGUID - unique identifier of entityclassificationTypeGUID - unique identifier for the classification's typeclassificationTypeName - name of the classification's typeproperties - propertiesmethodName - name of the method making the callPropertyServerException - unexpected response from property serverCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.