http://git-wip-us.apache.org/repos/asf/atlas/blob/a1fd4068/omrs/src/main/java/org/apache/atlas/omrs/ffdc/OMRSErrorCode.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/OMRSErrorCode.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/OMRSErrorCode.java index f40f2c6..185311a 100644 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/OMRSErrorCode.java +++ b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/OMRSErrorCode.java @@ -48,111 +48,259 @@ import java.util.Arrays; */ public enum OMRSErrorCode { - ENTITY_NOT_KNOWN(400, "OMRS-REPOSITORY-400-001", - "The entity identified with guid \"{0}\" is not known to the open metadata repository {1}.", - "The system is unable to retrieve the properties for the requested entity because the supplied guid is not recognized.", - "The guid is supplied by the caller to the OMRS. It may have a logic problem that has corrupted the guid, or the entity has been deleted since the guid was retrieved."), - RELATIONSHIP_NOT_KNOWN(400, "OMRS-REPOSITORY-400-002", - "The relationship identified with guid \"{0}\" is not known to the open metadata repository {1}.", - "The system is unable to retrieve the properties for the requested relationship because the supplied guid is not recognized.", - "The guid is supplied by the caller to the OMRS. It may have a logic problem that has corrupted the guid, or the relationship has been deleted since the guid was retrieved."), - TYPEDEF_NOT_KNOWN(400, "OMRS-REPOSITORY-400-003", - "The typedef \"{0}\" is not known to the metadata repository.", - "The system is unable to retrieve the properties for the requested typedef because the supplied identifier is not recognized.", - "The identifier is supplied by the caller. It may have a logic problem that has corrupted the identifier, or the typedef has been deleted since the identifier was retrieved."), - TYPEDEF_IN_USE(400, "OMRS-REPOSITORY-400-004", - "Unable to delete the typedef identified with guid \"{0}\" since it is still in use in the metadata repository.", - "The system is unable to delete the typedef because there are still instances in the metadata repository that are using it.", + TYPEDEF_IN_USE(400, "OMRS-REPOSITORY-400-001 ", + "Unable to delete the TypeDef \"{0}\" (guid = {1}) since it is still in use in the open metadata repository {2}", + "The system is unable to delete the TypeDef because there are still instances in the metadata repository that are using it.", "Remove the existing instances from the open metadata repositories and try the delete again."), - UNKNOWN_CLASSIFICATION(400, "OMRS-REPOSITORY-400-005", - "Classification \"{0}\" is not a recognized classification type", - "The system is unable to create a new classification for an entity because the local repository does not recognize the type.", + ATTRIBUTE_TYPEDEF_IN_USE(400, "OMRS-REPOSITORY-400-002 ", + "Unable to delete the AttributeTypeDef \"{0}\" (guid = {1}) since it is still in use in the open metadata repository {2}", + "The system is unable to delete the AttributeTypeDef because there are still instances in the metadata repository that are using it.", + "Remove the existing instances from the open metadata repositories and try the delete again."), + TYPEDEF_ALREADY_DEFINED(400, "OMRS-REPOSITORY-400-003 ", + "Unable to add the TypeDef \"{0}\" (guid = {1}) since it is already defined in the open metadata repository {2}", + "The system is unable to add the TypeDef to its repository because it is already defined.", + "Validate that the existing definition is as required. It is possible to patch the TypeDef, or delete it and re-define it."), + ATTRIBUTE_TYPEDEF_ALREADY_DEFINED(400, "OMRS-REPOSITORY-400-004 ", + "Unable to add the AttributeTypeDef \"{0}\" (guid = {1}) since it is already defined in the open metadata repository {2}", + "The system is unable to delete the AttributeTypeDef because there are still instances in the metadata repository that are using it.", + "Validate that the existing definition is as required. It is possible to patch the TypeDef, or delete it and re-define it."), + UNKNOWN_CLASSIFICATION(400, "OMRS-REPOSITORY-400-005 ", + "Classification \"{0}\" is not a recognized classification type by open metadata repository {1}", + "The system is unable to create a new classification for an entity because the open metadata repository does not recognize the classification type.", "Create a ClassificationDef for the classification and retry the request."), - INVALID_CLASSIFICATION_FOR_ENTITY(400, "OMRS-REPOSITORY-400-006", - "Unable to assign a classification of type \"{0}\" to an entity of type \"{1}\" because this classification is not valid for this type of entity.", + INVALID_CLASSIFICATION_FOR_ENTITY(400, "OMRS-REPOSITORY-400-006 ", + "Open metadata repository {0} is unable to assign a classification of type \"{0}\" to an entity of type \"{1}\" because the classification type is not valid for this type of entity", "The system is unable to classify an entity because the ClassificationDef for the classification does not list this entity type, or one of its super-types.", - "Update the ClassificationDef to include the entity's type and rerun the request."), - NO_TYPEDEF_NAME(400, "OMRS-REPOSITORY-400-007", - "A null TypeDef name has been passed on a metadata repository request.", + "Update the ClassificationDef to include the entity's type and rerun the request. Alternatively use a different classification."), + NO_TYPEDEF_NAME(400, "OMRS-REPOSITORY-400-007 ", + "A null TypeDef name has been passed as the {0} parameter on a {1} request to open metadata repository {2}", "The system is unable to perform the request because the TypeDef name is needed.", "Correct the caller's code and retry the request."), - NO_TYPEDEF_CATEGORY(400, "OMRS-REPOSITORY-400-008", - "A null TypeDef category has been passed on a metadata repository request.", + NO_ATTRIBUTE_TYPEDEF_NAME(400, "OMRS-REPOSITORY-400-008 ", + "A null AttributeTypeDef name has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to perform the request because the AttributeTypeDef name is needed.", + "Correct the caller's code and retry the request."), + NO_TYPEDEF_CATEGORY(400, "OMRS-REPOSITORY-400-009 ", + "A null TypeDef category has been passed as the {0} parameter on a {1} request to open metadata repository {2}", "The system is unable to perform the request because the TypeDef category is needed.", "Correct the caller's code and retry the request."), - NO_MATCH_CRITERIA(400, "OMRS-REPOSITORY-400-009", - "A null list of match criteria properties has been passed on a metadata repository request.", + NO_ATTRIBUTE_TYPEDEF_CATEGORY(400, "OMRS-REPOSITORY-400-010 ", + "A null AttributeTypeDef category has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to perform the request because the AttributeTypeDef category is needed.", + "Correct the caller's code and retry the request."), + NO_MATCH_CRITERIA(400, "OMRS-REPOSITORY-400-011 ", + "A null list of match criteria properties has been passed as the {0} parameter on a {1} request to open metadata repository {2}", "The system is unable to perform the request because the match criteria is needed.", "Correct the caller's code and retry the request."), - NO_EXTERNAL_ID(400, "OMRS-REPOSITORY-400-010", - "Null values for all of the parameters describing an external id for a standard has been passed on a metadata repository request.", + NO_EXTERNAL_ID(400, "OMRS-REPOSITORY-400-012 ", + "Null values for all of the parameters describing an external id for a standard has been passed on a {0} request to open metadata repository {1}", "The system is unable to perform the request because at least one of the values are needed.", "Correct the caller's code and retry the request."), - NO_SEARCH_CRITERIA(400, "OMRS-REPOSITORY-400-011", - "A null search criteria has been passed on a metadata repository request.", + NO_SEARCH_CRITERIA(400, "OMRS-REPOSITORY-400-013 ", + "A null search criteria has been passed as the {0} parameter on a {1} request to open metadata repository {2}", "The system is unable to perform the request because the search criteria is needed.", "Correct the caller's code and retry the request."), - NO_GUID(400, "OMRS-REPOSITORY-400-012", - "A null unique identifier (guid) has been passed on a metadata repository request.", - "The system is unable to perform the request because the TypeDef name is needed.", + NO_GUID(400, "OMRS-REPOSITORY-400-014 ", + "A null unique identifier (guid) has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to perform the request because the unique identifier is needed.", "Correct the caller's code and retry the request."), - NO_TYPEDEF(400, "OMRS-REPOSITORY-400-013", - "A null TypeDef has been passed on a metadata repository request.", + NO_TYPEDEF(400, "OMRS-REPOSITORY-400-015 ", + "A null TypeDef has been passed as the {0} parameter on a {1} request to open metadata repository {2}", "The system is unable to perform the request because the TypeDef is needed.", "Correct the caller's code and retry the request."), - INVALID_TYPEDEF(400, "OMRS-REPOSITORY-400-013", - "An invalid TypeDef has been passed on a metadata repository request.", + NO_ATTRIBUTE_TYPEDEF(400, "OMRS-REPOSITORY-400-016 ", + "A null AttributeTypeDef has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to perform the request because the AttributeTypeDef is needed.", + "Correct the caller's code and retry the request."), + INVALID_TYPEDEF(400, "OMRS-REPOSITORY-400-017 ", + "An invalid TypeDef {0} (guid={1}) has been passed as the {2} parameter on a {3} request to open metadata repository {4}. Full TypeDef is {5}", "The system is unable to perform the request because the TypeDef is needed.", "Correct the caller's code and retry the request."), - NO_MORE_ELEMENTS(400, "OMRS-PROPERTIES-400-001", + INVALID_ATTRIBUTE_TYPEDEF(400, "OMRS-REPOSITORY-400-018 ", + "An invalid AttributeTypeDef {0} (guid={1}) has been passed as the {2} parameter on a {3} request to open metadata repository {4}. Full AttributeTypeDef is {5}", + "The system is unable to perform the request because the AttributeTypeDef is needed.", + "Correct the caller's code and retry the request."), + NULL_TYPEDEF(400, "OMRS-REPOSITORY-400-019 ", + "A null TypeDef has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to perform the request because the TypeDef is needed to perform the operation.", + "Correct the caller's code and retry the request."), + NULL_ATTRIBUTE_TYPEDEF(400, "OMRS-REPOSITORY-400-020 ", + "A null AttributeTypeDef has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to perform the request because the AttributeTypeDef is needed to perform the operation.", + "Correct the caller's code and retry the request."), + NULL_TYPEDEF_GALLERY(400, "OMRS-REPOSITORY-400-021 ", + "A null TypeDefGalleryResponse object has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to perform the request because the TypeDefGalleryResponse should contain the information to process.", + "Correct the caller's code and retry the request."), + NULL_TYPEDEF_IDENTIFIER(400, "OMRS-REPOSITORY-400-022 ", + "A null unique identifier (guid) for a TypeDef object has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to perform the request because the identifier for the TypeDef is needed to proceed.", + "Correct the caller's code and retry the request."), + NULL_TYPEDEF_NAME(400, "OMRS-REPOSITORY-400-023 ", + "A null unique name for a TypeDef object has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to perform the request because the identifier for the TypeDef is needed to proceed.", + "Correct the caller's code and retry the request."), + NULL_ATTRIBUTE_TYPEDEF_IDENTIFIER(400, "OMRS-REPOSITORY-400-024 ", + "A null unique identifier (guid) for a AttributeTypeDef object has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to perform the request because the identifier for the AttributeTypeDef is needed to proceed.", + "Correct the caller's code and retry the request."), + NULL_METADATA_COLLECTION(400, "OMRS-REPOSITORY-400-025 ", + "Open metadata repository for server {0} has not initialized correctly because it has a null metadata collection.", + "The system is unable to process requests for this repository.", + "Verify that the repository connector is correctly configured in the OMAG server."), + NULL_CLASSIFICATION_NAME(400, "OMRS-REPOSITORY-400-026 ", + "A null classification name has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to access the local metadata repository.", + "The classification name is supplied by the caller to the API. This call needs to be corrected before the server can operate correctly."), + NULL_USER_ID(400, "OMRS-REPOSITORY-400-027 ", + "A null user name has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to access the local metadata repository.", + "The user name is supplied by the caller to the API. This call needs to be corrected before the server can operate correctly."), + BAD_PROPERTY_FOR_TYPE(400, "OMRS-REPOSITORY-400-028 ", + "A property called {0} has been proposed for a new metadata instance of category {1} and type {2}; it is not supported for this type in open metadata repository {3}", + "The system is unable to store the metadata instance in the metadata repository because the properties listed do not match the supplied type definition.", + "Verify that the property name is spelt correctly and the correct type has been used. Correct the call to the metadata repository and retry."), + NO_PROPERTIES_FOR_TYPE(400, "OMRS-REPOSITORY-400-029 ", + "Properties have been proposed for a new metadata instance of category {0} and type {1}; properties not supported for this type in open metadata repository {2}", + "The system is unable to store the metadata instance in the metadata repository because the properties listed do not match the supplied type definition.", + "Verify that the property name is spelt correctly and the correct type has been used. Correct the call to the metadata repository and retry."), + BAD_PROPERTY_TYPE(400, "OMRS-REPOSITORY-400-030 ", + "A property called {0} of type {1} has been proposed for a new metadata instance of category {2} and type {3}; this property should be of type {4} in open metadata repository {5}", + "The system is unable to store the metadata instance in the metadata repository because the properties listed do not match the supplied type definition.", + "Verify that the property name is spelt correctly and the correct type has been used. Correct the call to the metadata repository and retry."), + NULL_PROPERTY_NAME_FOR_INSTANCE(400, "OMRS-REPOSITORY-400-031 ", + "A null property name has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to process the metadata instance.", + "The property name is supplied by the caller to the API. This call needs to be corrected before the server can operate correctly."), + NULL_PROPERTY_VALUE_FOR_INSTANCE(400, "OMRS-REPOSITORY-400-032 ", + "A null property value has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to process the metadata instance.", + "The property value is supplied by the caller to the API. This call needs to be corrected before the server can operate correctly."), + NULL_PROPERTY_TYPE_FOR_INSTANCE(400, "OMRS-REPOSITORY-400-033 ", + "A null property type has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to process the metadata instance.", + "The property type is supplied by the caller to the API. This call needs to be corrected before the server can operate correctly."), + BAD_TYPEDEF_ID_FOR_INSTANCE(400, "OMRS-REPOSITORY-400-034 ", + "A invalid TypeDef unique identifier (guid) has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to perform the request because the unique identifier is needed.", + "Correct the caller's code and retry the request."), + BAD_INSTANCE_STATUS(400, "OMRS-REPOSITORY-400-035 ", + "An instance status of {0} has been passed as the {1} parameter on a {2} request to open metadata repository {3} but this status is not valid for an instance of type {4}", + "The system is unable to process the request.", + "The instance status is supplied by the caller to the API. This call needs to be corrected before the server can complete this operation successfully."), + NULL_INSTANCE_STATUS(400, "OMRS-REPOSITORY-400-036 ", + "A null instance status has been passed as the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to process the metadata instance request.", + "The instance status is supplied by the caller to the API. This call needs to be corrected before the server can operate correctly."), + NO_NEW_PROPERTIES(400, "OMRS-REPOSITORY-400-037 ", + "No properties have been passed on the {0} parameter on a {1} request to open metadata repository {2}", + "The system is unable to process the metadata instance request.", + "The instance status is supplied by the caller to the API. This call needs to be corrected before the server can operate correctly."), + REPOSITORY_NOT_CRYSTAL_BALL(400, "OMRS-REPOSITORY-400-038 ", + "A future time of {0} has been passed on the {0} parameter of a {1} request to open metadata repository {2}", + "The system declines to process the request lest it gives away its secret powers.", + "The asOfTime is supplied by the caller to the API. This call needs to be corrected before the server will operate correctly."), + BAD_TYPEDEF_IDS_FOR_DELETE(400, "OMRS-REPOSITORY-400-039 ", + "Incompatible TypeDef unique identifiers (name={0}, guid{1}) have been passed on a {2} request for instance {3} to open metadata repository {2}", + "The system is unable to perform the request because the unique identifier is needed.", + "Correct the caller's code and retry the request."), + BAD_PROPERTY_FOR_INSTANCE(400, "OMRS-REPOSITORY-400-040 ", + "An invalid property has been found in a metadata instance stored in repository {0} during the {1} operation", + "The system is unable to perform the request because the unique identifier is needed.", + "Correct the caller's code and retry the request."), + NULL_REFERENCE_INSTANCE(400, "OMRS-REPOSITORY-400-041 ", + "A null reference instance has been passed to repository {0} during the {1} in the {2} parameter", + "The system is unable to perform the request because the instance is needed.", + "The reference instance comes from another server. Look for errors in the audit log and validate that the message passing " + + "protocol levels are compatible. If nothing is obviously wrong with the set up, " + + "raise a Jira or ask for help on the dev mailing list."), + LOCAL_REFERENCE_INSTANCE(400, "OMRS-REPOSITORY-400-042 ", + "A reference instance has been passed to repository {0} during the {1} in the {2} parameter which has the local repository as its home", + "The system is unable to perform the request because the instance should come from another repository.", + "The reference instance comes from another server. Look for errors in the audit log and validate that the message passing " + + "protocol levels are compatible. If nothing is obviously wrong with the set up, " + + "raise a Jira or ask for help on the dev mailing list."), + NULL_ENTITY_PROXY(400, "OMRS-REPOSITORY-400-043 ", + "A null entity proxy has been passed to repository {0} as the {1} parameter of the {2} operation", + "The system is unable to perform the request because the entity proxy is needed.", + "Correct the caller's code and retry the request."), + LOCAL_ENTITY_PROXY(400, "OMRS-REPOSITORY-400-044 ", + "An entity proxy has been passed to repository {0} as the {1} parameter of the {2} operation which has the local repository as its home", + "The system is unable to perform the request because the entity proxy should represent an entity that is homed in another repository.", + "Correct the caller's code and retry the request."), + INSTANCE_ALREADY_DELETED(400, "OMRS-REPOSITORY-400-045 ", + "A {0} request has been made to repository {1} for an instance {2} that is already deleted", + "The system is unable to perform the request because the instance is in the wrong state.", + "Try a different request or a different instance."), + INSTANCE_NOT_DELETED(400, "OMRS-REPOSITORY-400-046 ", + "A {0} request has been made to repository {1} for an instance {2} that is not deleted", + "The system is unable to perform the request because the instance is in the wrong state.", + "Try a different request or a different instance."), + INVALID_RELATIONSHIP_ENDS(400, "OMRS-REPOSITORY-400-047 ", + "A {0} request has been made to repository {1} for a relationship that has one or more ends of the wrong or invalid type. Relationship type is {2}; entity proxy for end 1 is {3} and entity proxy for end 2 is {4}", + "The system is unable to perform the request because the instance has invalid values.", + "Correct the caller's code and retry the request."), + ENTITY_NOT_CLASSIFIED(400, "OMRS-REPOSITORY-400-048 ", + "A {0} request has been made to repository {1} to remove a non existent classification {2} from entity {3}", + "The system is unable to perform the request because the instance has invalid values.", + "Correct the caller's code and retry the request."), + NULL_TYPEDEF_PATCH(400, "OMRS-REPOSITORY-400-049 ", + "A null TypeDef patch has been passed on the {0} operation of repository {1} ", + "The system is unable to perform the request because it needs the patch to process the update.", + "Correct the caller's code and retry the request."), + NULL_USER_NAME(400, "OMRS-REST-API-400-001 ", + "The OMRS REST API for server {0} has been called with a null user name (userId)", + "The system is unable to access the local metadata repository.", + "The user name is supplied by the caller to the API. This call needs to be corrected before the server can operate correctly."), + NO_MORE_ELEMENTS(400, "OMRS-PROPERTIES-400-001 ", "No more elements in {0} iterator", "A caller stepping through an iterator has requested more elements when there are none left.", "Recode the caller to use the hasNext() method to check for more elements before calling next() and then retry."), - NULL_CLASSIFICATION_NAME(400, "OMRS-PROPERTIES-400-002", + NULL_CLASSIFICATION_PROPERTY_NAME(400, "OMRS-PROPERTIES-400-002 ", "No name provided for entity classification", "A classification with a null name is assigned to an entity. This value should come from a metadata repository, and always be filled in.", "Look for other error messages to identify the source of the problem. Identify the metadata repository where the asset came from. Correct the cause of the error and then retry."), - NULL_PROPERTY_NAME(400, "OMRS-PROPERTIES-400-003", + NULL_PROPERTY_NAME(400, "OMRS-PROPERTIES-400-003 ", "Null property name passed to properties object", "A request to set an additional property failed because the property name passed was null", "Recode the call to the property object with a valid property name and retry."), - ARRAY_OUT_OF_BOUNDS(400, "OMRS-PROPERTIES-400-004", + ARRAY_OUT_OF_BOUNDS(400, "OMRS-PROPERTIES-400-004 ", "{0} is unable to add a new element to location {1} of an array of size {2} value", "There is an error in the update of an ArrayPropertyValue.", "Recode the call to the property object with a valid element location and retry."), - BAD_ATTRIBUTE_TYPE(400, "OMRS-PROPERTIES-400-005", + BAD_ATTRIBUTE_TYPE(400, "OMRS-PROPERTIES-400-005 ", "AttributeDefs may only be of primitive, collection or enum type. {0} of category {1} is not allowed.", "There is an error in the creation of an AttributeDefType.", "Recode the call to the AttributeDefType object with a valid type."), - REPOSITORY_URL_MALFORMED(400, "OMRS-CONNECTOR-400-001", + REPOSITORY_URL_MALFORMED(400, "OMRS-CONNECTOR-400-001 ", "The Open Metadata Repository Server URL {0} is not in a recognized format", "The system is unable to connect to the open metadata repository to retrieve metadata properties.", "Retry the request when the connection configuration for this repository is corrected."), - NULL_CONNECTION(400, "OMRS-CONNECTOR-400-003", + NULL_CONNECTION(400, "OMRS-CONNECTOR-400-002 ", "The connection passed to OMASConnectedAssetProperties for connector {0} is null.", "The system is unable to populate the ConnectedAssetProperties object because it needs the connection to identify the asset.", "Look for other error messages to identify what caused this error. When the issue is resolved, retry the request."), - NULL_OMRS_CONNECTION(400, "OMRS-CONNECTOR-400-004", + NULL_OMRS_CONNECTION(400, "OMRS-CONNECTOR-400-003 ", "The connection passed to the EnterpriseOMRSRepositoryConnector is null.", "The system is unable to populate the EnterpriseOMRSRepositoryConnector object because it needs the connection to identify the repository.", "Look for other error messages to identify what caused this error. When the issue is resolved, retry the request."), - INVALID_OMRS_CONNECTION(400, "OMRS-CONNECTOR-400-005", + INVALID_OMRS_CONNECTION(400, "OMRS-CONNECTOR-400-004 ", "The connection {0} passed to the EnterpriseOMRSRepositoryConnector is invalid.", "The system is unable to populate the EnterpriseOMRSRepositoryConnector object because it needs the connection to identify the repository.", "Look for other error messages to identify what caused this error. When the issue is resolved, retry the request."), - NULL_TOPIC_CONNECTOR(400, "OMRS-TOPIC-CONNECTOR-400-001", + NULL_TOPIC_CONNECTOR(400, "OMRS-TOPIC-CONNECTOR-400-001 ", "Unable to send or receive events for source {0} because the connector to the OMRS Topic failed to initialize", "The local server will not connect to the cohort.", "The connection to the connector is configured in the server configuration. " + "Review previous error messages to determine the precise error in the " + "start up configuration. " + "Correct the configuration and reconnect the server to the cohort. "), - NULL_REGISTRY_STORE(400, "OMRS-COHORT-REGISTRY-404-001", + NULL_REGISTRY_STORE(400, "OMRS-COHORT-REGISTRY-404-001 ", "The Open Metadata Repository Cohort Registry Store for cohort {0} is not available.", "The system is unable to process registration requests from the open metadata repository cohort.", "Correct the configuration for the registry store connection in the server configuration. " + "Retry the request when the registry store configuration is correct."), - INVALID_LOCAL_METADATA_COLLECTION_ID(400, "OMRS-COHORT-REGISTRY-400-002", + INVALID_LOCAL_METADATA_COLLECTION_ID(400, "OMRS-COHORT-REGISTRY-400-002 ", "The Open Metadata Repository Cohort {0} is not available to server {1} because the local " + "metadata collection id has been changed from {2} to {3} since this server registered with the cohort.", "The system is unable to connect with other members of the cohort while this incompatibility exists.", @@ -163,144 +311,293 @@ public enum OMRSErrorCode "normally once the server has successfully unregistered with the cohort. " + "Then re-establish the local repository configuration." + "Restart the server once the configuration is correct."), - NULL_AUDIT_LOG_STORE(400, "OMRS-AUDIT-LOG-400-001", + NULL_AUDIT_LOG_STORE(400, "OMRS-AUDIT-LOG-400-001 ", "The Audit Log Store for server {0} is not available.", "The system is unable to process any open metadata registry services (OMRS) requests because " + "the audit log for this server is unavailable.", "Correct the configuration for the audit log store connection in the server configuration. " + "Retry the request when the audit log store configuration is correct."), - NULL_ARCHIVE_STORE(400, "OMRS-ARCHIVE-MANAGER-400-001", + NULL_ARCHIVE_STORE(400, "OMRS-ARCHIVE-MANAGER-400-001 ", "An open metadata archive configured for server {0} is not accessible.", "The system is unable to process the contents of this open metadata archive. " + "Other services may fail if they were dependent on this open metadata archive.", "Correct the configuration for the open metadata archive connection in the server configuration. " + "Retry the request when the open metadata archive configuration is correct."), - NULL_EVENT_MAPPER(400, "OMRS-LOCAL-REPOSITORY-400-001", + NULL_EVENT_MAPPER(400, "OMRS-LOCAL-REPOSITORY-400-001 ", "The repository event mapper configured for the local repository for server {0} is not accessible.", "The system is unable to create the repository event mapper which means that events from the " + "local repository will not be captured and processed. " + "Other services may fail if they were dependent on this event notification.", "Correct the configuration for the repository event mapper connection in the server configuration. " + "Retry the request when the repository event mapper configuration is correct."), - DUPLICATE_COHORT_NAME(400, "OMRS-METADATA-HIGHWAY-404-001", + DUPLICATE_COHORT_NAME(400, "OMRS-METADATA-HIGHWAY-404-001 ", "There are more than one cohort configurations with the same name of {0}.", "The system is unable to connect to more than one cohort with the same name.", "Correct the configuration for the cohorts in the server configuration. " + "Retry the request when the cohort configuration is correct."), - CONFLICTING_ENTERPRISE_TYPEDEFS(400, "OMRS-ENTERPRISE-REPOSITORY-400-001", + CONFLICTING_ENTERPRISE_TYPEDEFS(400, "OMRS-ENTERPRISE-REPOSITORY-400-001 ", "Conflicting TypeDefs have been detected.", "The system is unable to create a reliable list of TypeDefs for the enterprise.", "Details of the conflicts and the steps necessary to repair the situation can be found in the audit log. " + "Retry the request when the cohort configuration is correct."), - NO_TYPEDEFS_DEFINED(400, "OMRS-ENTERPRISE-REPOSITORY-400-002", + NO_TYPEDEFS_DEFINED(400, "OMRS-ENTERPRISE-REPOSITORY-400-002 ", "No TypeDefs have been defined in any of the connected repositories.", "The system is unable to create a list of TypeDefs for the enterprise.", "Look for errors in the set up of the repositories in the audit log and verify that TypeDefs are configured. " + "Retry the request when the cohort configuration is correct."), - REPOSITORY_NOT_AVAILABLE(404, "OMRS-REPOSITORY-CONNECTOR-404-001", - "The Open Metadata Repository Server is not available", + DUPLICATE_TYPE_IN_ARCHIVE(400, "OMRS-ARCHIVEBUILDER-400-001 ", + "The same type {0} of category {1} has been added twice to an open metadata archive. First version was {2} and the second was {3}.", + "The build of the archive terminates.", + "Verify the definition of the types being added to the archive. Once the definitions have been corrected, rerun the request."), + DUPLICATE_INSTANCE_IN_ARCHIVE(400, "OMRS-ARCHIVEBUILDER-400-001 ", + "The {0} instance {1} has been added twice to an open metadata archive. First version was {2} and the second was {3}.", + "The build of the archive terminates.", + "Verify the definition of the instance being added to the archive. Once the definitions have been corrected, rerun the request."), + DUPLICATE_TYPENAME_IN_ARCHIVE(400, "OMRS-ARCHIVEBUILDER-400-002 ", + "The same type name {0} has been added twice to an open metadata archive. First version was {1} and the second was {2}.", + "The build of the archive terminates.", + "Verify the definition of the types being added to the archive. Once the definitions have been corrected, rerun the request."), + DUPLICATE_GUID_IN_ARCHIVE(400, "OMRS-ARCHIVEBUILDER-400-003 ", + "The guid {0} has been used twice to an open metadata archive. First version was {1} and the second was {2}.", + "The build of the archive terminates.", + "Verify the definition of the elements being added to the archive. Once the definitions have been corrected, rerun the request."), + MISSING_TYPE_IN_ARCHIVE(400, "OMRS-ARCHIVEBUILDER-400-004 ", + "The type {0} of category {1} is not found in an open metadata archive.", + "The build of the archive terminates.", + "Verify the definition of the elements being added to the archive. Once the definitions have been corrected, rerun the request."), + MISSING_NAME_FOR_ARCHIVE(400, "OMRS-ARCHIVEBUILDER-400-005 ", + "A request for a type from category {0} passed a null name.", + "The build of the archive terminates.", + "Verify the definition of the elements being added to the archive. Once the definitions have been corrected, rerun the request."), + REPOSITORY_NOT_AVAILABLE(404, "OMRS-REPOSITORY-404-001 ", + "The open metadata repository connector for server {0} is not active and is unable to service the {1} request", "The system is unable to retrieve any metadata properties from this repository.", - "Retry the request when the repository server is available."), - COHORT_NOT_CONNECTED(404, "OMRS-REPOSITORY-CONNECTOR-404-002", + "Retry the request when the repository connector is active."), + ENTITY_NOT_KNOWN(404, "OMRS-REPOSITORY-404-002 ", + "The entity identified with guid \"{0}\" passed on the {1} call is not known to the open metadata repository {2}", + "The system is unable to retrieve the properties for the requested entity because the supplied guid is not recognized.", + "The guid is supplied by the caller to the server. It may have a logic problem that has corrupted the guid, or the entity has been deleted since the guid was retrieved."), + RELATIONSHIP_NOT_KNOWN(404, "OMRS-REPOSITORY-404-003 ", + "The relationship identified with guid \"{0}\" passed on the {1} call is not known to the open metadata repository {2}", + "The system is unable to retrieve the properties for the requested relationship because the supplied guid is not recognized.", + "The guid is supplied by the caller to the OMRS. It may have a logic problem that has corrupted the guid, or the relationship has been deleted since the guid was retrieved."), + TYPEDEF_NOT_KNOWN(404, "OMRS-REPOSITORY-404-004 ", + "The TypeDef \"{0}\" (guid = {1}) passed on the {2} parameter of the {3} operation is not known to the open metadata repository {4}", + "The system is unable to retrieve the properties for the requested TypeDef because the supplied identifier is not recognized.", + "The identifier is supplied by the caller. It may have a logic problem that has corrupted the identifier, or the typedef has been deleted since the identifier was retrieved."), + ATTRIBUTE_TYPEDEF_NOT_KNOWN(404, "OMRS-REPOSITORY-404-004 ", + "The AttributeTypeDef \"{0}\" (guid = {1}) passed on the {2} call is not known to the open metadata repository {3}", + "The system is unable to retrieve the properties for the requested TypeDef because the supplied identifier is not recognized.", + "The identifier is supplied by the caller. It may have a logic problem that has corrupted the identifier, or the typedef has been deleted since the identifier was retrieved."), + TYPEDEF_ID_NOT_KNOWN(404, "OMRS-REPOSITORY-404-005 ", + "The TypeDef unique identifier {0} passed on a {1} request to open metadata repository {2} is not known to this repository", + "The system is unable to retrieve the properties for the requested TypeDef because the supplied identifiers are not recognized.", + "The identifier is supplied by the caller. It may have a logic problem that has corrupted the identifier, or the TypeDef has been deleted since the identifier was retrieved."), + ATTRIBUTE_TYPEDEF_ID_NOT_KNOWN(404, "OMRS-REPOSITORY-404-006 ", + "The AttributeTypeDef \"{0}\" (guid {1}) passed on a {2} request to open metadata repository {3} is not known to this repository", + "The system is unable to retrieve the properties for the requested AttributeTypeDef because the supplied identifiers are not recognized.", + "The identifier is supplied by the caller. It may have a logic problem that has corrupted the identifier, or the AttributeTypeDef has been deleted since the identifier was retrieved."), + TYPEDEF_NAME_NOT_KNOWN(404, "OMRS-REPOSITORY-404-007 ", + "The TypeDef unique name {0} passed on a {1} request to open metadata repository {2} is not known to this repository", + "The system is unable to retrieve the properties for the requested TypeDef because the supplied identifiers are not recognized.", + "The identifier is supplied by the caller. It may have a logic problem that has corrupted the identifier, or the TypeDef has been deleted since the identifier was retrieved."), + ATTRIBUTE_TYPEDEF_NAME_NOT_KNOWN(404, "OMRS-REPOSITORY-404-008 ", + "The TypeDef unique name {0} passed on a {1} request to open metadata repository {2} is not known to this repository", + "The system is unable to retrieve the properties for the requested TypeDef because the supplied identifiers are not recognized.", + "The identifier is supplied by the caller. It may have a logic problem that has corrupted the identifier, or the TypeDef has been deleted since the identifier was retrieved."), + COHORT_NOT_CONNECTED(404, "OMRS-REPOSITORY-CONNECTOR-404-002 ", "The Open Metadata Repository Servers in the cohort are not available", "The system is unable to retrieve any metadata properties from this repository.", "Retry the request when the repository server is available."), - INVALID_COHORT_CONFIG(404, "OMRS-REPOSITORY-CONNECTOR-404-003", - "The Open Metadata Repository Servers in the cohort are not configured correctly", + INVALID_COHORT_CONFIG(404, "OMRS-REPOSITORY-CONNECTOR-404-003 ", + "The open metadata repository servers in the cohort are not configured correctly", "The root cause of this error is recorded in previous exceptions.", "Review the other error messages to determine the source of the error. When these are resolved, retry the request."), - LOCAL_REPOSITORY_CONFIGURATION_ERROR(404, "OMRS-REPOSITORY-CONNECTOR-404-004", - "The connection to the local Open Metadata Repository Server is not configured correctly", - "The root cause of this error is recorded in previous exceptions.", - "Review the other error messages to determine the source of the error. When these are resolved, retry the request."), - METADATA_HIGHWAY_NOT_AVAILABLE(404, "OMRS-METADATA-HIGHWAY-404-001", + METADATA_HIGHWAY_NOT_AVAILABLE(404, "OMRS-METADATA-HIGHWAY-404-001 ", "The local server's metadata highway communication components are failing to initialize", "The root cause of this error is recorded in previous exceptions.", "Review the other error messages to determine the source of the error. When these are resolved, retry the request."), - COHORT_DISCONNECT_FAILED(404, "OMRS-METADATA-HIGHWAY-404-002", + COHORT_DISCONNECT_FAILED(404, "OMRS-METADATA-HIGHWAY-404-002 ", "The local server is unable to disconnect from an open metadata repository cohort {0}", "The root cause of this error is recorded in previous exceptions.", "Review the other error messages to determine the source of the error. When these are resolved, retry the request."), - TOPIC_CONNECTOR_NOT_AVAILABLE(404, "OMRS-TOPIC-CONNECTOR-404-001", - "The OMRS Topic Connector is not available.", + TOPIC_CONNECTOR_NOT_AVAILABLE(404, "OMRS-TOPIC-CONNECTOR-404-001 ", + "The OMRS Topic Connector is not available", "The system is not able to process events sent between repositories in the open metadata cohort.", "Correct the configuration for the OMRS Topic Connector (in the OMRS Configuration). Retry the request when the topic connector configuration is correct."), - ENTERPRISE_NOT_SUPPORTED(405, "OMRS-ENTERPRISE-REPOSITORY-CONNECTOR-405-001", + REMOTE_REPOSITORY_ERROR(404, "OMRS-REST-REPOSITORY-CONNECTOR-404-001 ", + "A call to the {0} of the open metadata repository server {1} results in an exception with message {2}", + "The system is unable to retrieve any metadata properties from this repository.", + "Retry the request when the repository server is available."), + ENTERPRISE_NOT_SUPPORTED(405, "OMRS-ENTERPRISE-REPOSITORY-CONNECTOR-405-001 ", "The requested method {0} is not supported by the EnterpriseOMRSRepositoryConnector", "The system is not able to process the requested method because it is not supported by the " + "Open Metadata Repository Services (OMRS) Enterprise Repository Services.", "Correct the application that called this method."), - INVALID_PRIMITIVE_CLASS_NAME(500, "OMRS-METADATA-COLLECTION-500-001", - "The Java class \'{0}\' for PrimitiveDefCategory {1} is not known.", + INVALID_PRIMITIVE_CLASS_NAME(500, "OMRS-METADATA-COLLECTION-500-001 ", + "The Java class \'{0}\' for PrimitiveDefCategory {1} is not known", "There is an internal error in Java class PrimitiveDefCategory as it has been set up with an invalid class.", "Raise a Jira to get this fixed."), - INVALID_PRIMITIVE_VALUE(500, "OMRS-METADATA-COLLECTION-500-002", - "The primitive value should be store in Java class \'{0}\' since it is of PrimitiveDefCategory {1}.", + INVALID_PRIMITIVE_VALUE(500, "OMRS-METADATA-COLLECTION-500-002 ", + "The primitive value should be stored in Java class \'{0}\' since it is of PrimitiveDefCategory {1}", "There is an internal error in the creation of a PrimitiveTypeValue.", "Raise a Jira to get this fixed."), - NULL_HOME_METADATA_COLLECTION_ID(500, "OMRS-METADATA-COLLECTION-500-003", + INVALID_PRIMITIVE_CATEGORY(500, "OMRS-METADATA-COLLECTION-500-003 ", + "There is a problem in the definition of primitive type {0}.", + "There is an internal error in the creation of a PrimitiveTypeValue.", + "Raise a Jira to get this fixed."), + NULL_HOME_METADATA_COLLECTION_ID(500, "OMRS-METADATA-COLLECTION-500-004 ", "Null home metadata collection identifier found in metadata instance {0} from open metadata repository {1}", "A request to retrieve a metadata instance (entity or relationship) has encountered a homeless metadata instance.", "Locate the open metadata repository that supplied the instance and correct the logic in its OMRSRepositoryConnector."), - NULL_CONFIG(500, "OMRS-OPERATIONAL-SERVICES-500-001", - "No configuration has been passed to the Open Metadata Repository Services (OMRS) on initialization.", + NULL_CONFIG(500, "OMRS-OPERATIONAL-SERVICES-500-001 ", + "No configuration has been passed to the Open Metadata Repository Services (OMRS) on initialization", "here is an internal error in the OMRS initialization.", "Raise a Jira to get this fixed."), - NULL_METADATA_COLLECTION_ID(500, "OMRS-METADATA-COLLECTION-500-004", - "The local repository services have been initialized with a null metadata collection identifier.", + NULL_METADATA_COLLECTION_ID(500, "OMRS-METADATA-COLLECTION-500-004 ", + "The open metadata repository connector \"{0}\" has been initialized with a null metadata collection identifier", "There is an internal error in the OMRS initialization.", "Raise a Jira to get this fixed."), - NULL_COHORT_NAME(500, "OMRS-COHORT-MANAGER-500-001", + BAD_INTERNAL_PAGING(500, "OMRS-METADATA-COLLECTION-500-005 ", + "Open metadata repository {0} has used an invalid paging parameter during the {1} operation", + "There is an internal error in the OMRS repository connector.", + "Raise a Jira to get this fixed."), + BAD_INTERNAL_SEQUENCING(500, "OMRS-METADATA-COLLECTION-500-005 ", + "Open metadata repository {0} has used an invalid sequencing parameter during the {1} operation", + "There is an internal error in the OMRS repository connector.", + "Raise a Jira to get this fixed."), + NO_REPOSITORY_CONNECTOR_FOR_COLLECTION(500, "OMRS-METADATA-COLLECTION-500-006 ", + "Unable to complete operation {0} to open metadata repository {1} because the repository connector is null", + "There is an internal error in the OMRS initialization.", + "Raise a Jira to get this fixed."), + NO_REPOSITORY_VALIDATOR_FOR_COLLECTION(500, "OMRS-METADATA-COLLECTION-500-007 ", + "Unable to complete operation {0} to open metadata repository {1} because the repository validator is null", + "There is an internal error in the OMRS initialization.", + "Raise a Jira to get this fixed."), + NO_REPOSITORY_HELPER_FOR_COLLECTION(500, "OMRS-METADATA-COLLECTION-500-008 ", + "Unable to complete operation {0} to open metadata repository {1} because the repository connector is null", + "There is an internal error in the OMRS initialization.", + "Raise a Jira to get this fixed."), + REPOSITORY_LOGIC_ERROR(500, "OMRS-METADATA-COLLECTION-500-009 ", + "Open metadata repository {0} has encountered an unexpected exception during the {1} operation. The message was {2}", + "There is an internal error in the OMRS repository connector.", + "Raise a Jira to get this fixed."), + NULL_INSTANCE_TYPE(500, "OMRS-METADATA-COLLECTION-500-010 ", + "During the {0} operation, open metadata repository {1} retrieved an instance from its metadata store that has a null type", + "There is an internal error in the OMRS repository connector.", + "Raise a Jira to get this fixed."), + INACTIVE_INSTANCE_TYPE(500, "OMRS-METADATA-COLLECTION-500-011 ", + "During the {0} operation, open metadata repository {1} retrieved an instance (guid={2}) from its metadata store that has an inactive type called {3} (type guid = {4})", + "There is an internal error in the OMRS repository connector.", + "Raise a Jira to get this fixed."), + NULL_COHORT_NAME(500, "OMRS-COHORT-MANAGER-500-001 ", "OMRSCohortManager has been initialized with a null cohort name", "There is an internal error in the OMRS initialization.", "Raise a Jira to get this fixed."), - NULL_LOCAL_METADATA_COLLECTION(500, "OMRS-LOCAL-REPOSITORY-500-001", + NULL_LOCAL_METADATA_COLLECTION(500, "OMRS-LOCAL-REPOSITORY-500-001 ", "The local repository services have been initialized with a null real metadata collection.", "There is an internal error in the OMRS initialization.", "Raise a Jira to get this fixed."), - NULL_ENTERPRISE_METADATA_COLLECTION(500, "OMRS-ENTERPRISE-REPOSITORY-500-001", + NULL_ENTERPRISE_METADATA_COLLECTION(500, "OMRS-ENTERPRISE-REPOSITORY-500-001 ", "The enterprise repository services has detected a repository connector with a null metadata collection.", "There is an internal error in the Open Metadata Repository Services (OMRS) operation.", "Raise a Jira to get this fixed."), - BAD_TYPEDEF(500, "OMRS-CONTENT-MANAGER-500-001", + BAD_TYPEDEF(500, "OMRS-CONTENT-MANAGER-500-001 ", "The repository content manager has detected an invalid TypeDef from {0}.", "There is an internal error in the Open Metadata Repository Services (OMRS) operation.", "Raise a Jira to get this fixed."), - BAD_TYPEDEF_ATTRIBUTE_NAME(500, "OMRS-CONTENT-MANAGER-500-002", + BAD_TYPEDEF_ATTRIBUTE_NAME(500, "OMRS-CONTENT-MANAGER-500-002 ", "The repository content manager has detected an invalid attribute name in a TypeDef from {0}.", "There is an internal error in the Open Metadata Repository Services (OMRS) operation.", "Raise a Jira to get this fixed."), - NULL_TYPEDEF_ATTRIBUTE(500, "OMRS-CONTENT-MANAGER-500-003", + NULL_TYPEDEF_ATTRIBUTE(500, "OMRS-CONTENT-MANAGER-500-003 ", "The repository content manager has detected a null attribute in a TypeDef from {0}.", "There is an internal error in the Open Metadata Repository Services (OMRS) operation.", "Raise a Jira to get this fixed."), - BAD_CATEGORY_FOR_TYPEDEF_ATTRIBUTE(500, "OMRS-CONTENT-MANAGER-500-004", + BAD_CATEGORY_FOR_TYPEDEF_ATTRIBUTE(500, "OMRS-CONTENT-MANAGER-500-004 ", "Source {0} has requested type {1} with an incompatible category of {2} from repository content manager.", "There is an error in the Open Metadata Repository Services (OMRS) operation - probably in the source component.", "Raise a Jira to get this fixed."), - ARCHIVE_UNAVAILABLE(503, "OMRS-OPEN-METADATA-TYPES-500-001", - "The enterprise repository services are disconnected from the open metadata repositories.", + ARCHIVE_UNAVAILABLE(500, "OMRS-OPEN-METADATA-TYPES-500-001 ", + "The archive builder failed to initialize.", + "There is an internal error in the OMRS initialization.", + "Raise a Jira to get this fixed."), + NULL_EXCHANGE_RULE(500, "OMRS-EVENT-MANAGEMENT-500-001 ", + "A null exchange rule has been passed to one of the event management components on method {0}.", + "There is an internal error in the OMRS initialization.", + "Raise a Jira to get this fixed."), + NULL_REPOSITORY_VALIDATOR(500, "OMRS-EVENT-MANAGEMENT-500-002 ", + "A null repository validator has been passed to one of the event management components.", + "There is an internal error in the OMRS initialization.", + "Raise a Jira to get this fixed."), + NULL_REPOSITORY_HELPER(500, "OMRS-EVENT-MANAGEMENT-500-003 ", + "A null repository helper has been passed to one of the event management components.", "There is an internal error in the OMRS initialization.", "Raise a Jira to get this fixed."), - METHOD_NOT_IMPLEMENTED(501, "OMRS-METADATA-COLLECTION-501-001", + METADATA_COLLECTION_ID_MISMATCH(500, "OMRS-REST-REPOSITORY-CONNECTOR-500-001 ", + "A remote open metadata repository {0} returned a metadata collection identifier of {1} on its REST API after it registered with the cohort using a metadata collection identifier of {2}", + "There is a configuration error in the remote open metadata repository.", + "Review the set up of the remote repository. It may be that the server-url-root parameter is incorrectly set and is clashing with the setting in another server registered with the same cohort."), + NULL_REMOTE_METADATA_COLLECTION_ID(500, "OMRS-REST-REPOSITORY-CONNECTOR-500-002 ", + "A remote open metadata repository {0} returned a null metadata collection identifier on its REST API. It registered with the cohort using a metadata collection identifier of {1}", + "There is an internal error in the remote open metadata repository.", + "Raise a Jira to get this fixed."), + METHOD_NOT_IMPLEMENTED(501, "OMRS-METADATA-COLLECTION-501-001 ", "OMRSMetadataCollection method {0} for OMRS Connector {1} to repository type {2} is not implemented.", "A method in MetadataCollectionBase was called which means that the connector's OMRSMetadataCollection " + "(a subclass of MetadataCollectionBase) does not have a complete implementation.", "Raise a Jira to get this fixed."), - NO_REPOSITORIES(503, "OMRS-ENTERPRISE-REPOSITORY-503-001", + NO_REPOSITORIES(503, "OMRS-ENTERPRISE-REPOSITORY-503-001 ", "There are no open metadata repositories available for this server.", "The configuration for the server is set up so there is no local repository and no remote repositories " + "connected through the open metadata repository cohorts. " + "This may because of one or more configuration errors.", "Retry the request once the configuration is changed."), - ENTERPRISE_DISCONNECTED(503, "OMRS-ENTERPRISE-REPOSITORY-503-002", + ENTERPRISE_DISCONNECTED(503, "OMRS-ENTERPRISE-REPOSITORY-503-002 ", "The enterprise repository services are disconnected from the open metadata repositories.", "The server has shutdown (or failed to set up) access to the open metadata repositories.", "Retry the request once the open metadata repositories are connected."), - NULL_COHORT_METADATA_COLLECTION(503, "OMRS-ENTERPRISE-REPOSITORY-500-001", + NULL_COHORT_METADATA_COLLECTION(503, "OMRS-ENTERPRISE-REPOSITORY-503-003 ", "The enterprise repository services has detected a repository connector from cohort {0} for metadata collection identifier {1} that has a null metadata collection API object.", "There is an internal error in the OMRS Repository Connector implementation.", - "Raise a Jira to get this fixed.") + "Raise a Jira to get this fixed."), + NULL_CONTENT_MANAGER(503, "OMRS-LOCAL-REPOSITORY-503-001 ", + "A null repository content manager has been passed to one of the local repository's components on method {0}.", + "There is an internal error in the OMRS Local Repository Connector implementation, or the way it has been initialized.", + "Raise a Jira to get this fixed."), + NULL_SOURCE_NAME(503, "OMRS-LOCAL-REPOSITORY-503-002 ", + "A null repository content manager has been passed to one of the local repository's components on method {0}.", + "There is an internal error in the OMRS Local Repository Connector implementation, or the way it has been initialized.", + "Raise a Jira to get this fixed."), + LOCAL_REPOSITORY_CONFIGURATION_ERROR(503, "OMRS-LOCAL-REPOSITORY-503-003 ", + "The connection to the local open metadata repository server is not configured correctly", + "The root cause of this error is recorded in previous exceptions.", + "Review the other error messages to determine the source of the error. When these are resolved, retry the request."), + BAD_LOCAL_REPOSITORY_CONNECTION(503, "OMRS-LOCAL-REPOSITORY-503-004 ", + "The connection to the local open metadata repository server is not configured correctly", + "The root cause of this error is recorded in previous exceptions.", + "Review the other error messages to determine the source of the error. When these are resolved, retry the request."), + VALIDATION_LOGIC_ERROR(503, "OMRS-LOCAL-REPOSITORY-503-005 ", + "An OMRS repository connector {0} has passed an invalid parameter to the repository validator {1} operation as part of the {2} request", + "The repository connector has called the repository validator operations in the wrong order or has a similar logic error.", + "Raise a Jira to get this fixed."), + NULL_CLASSIFICATION_CREATED(503, "OMRS-LOCAL-REPOSITORY-503-006 ", + "An OMRS repository connector {0} has passed a null classification to the repository helper {1} operation as part of the {2} request", + "The repository connector has called the repository helper operations in the wrong order or has a similar logic error.", + "Raise a Jira to get this fixed."), + NO_LOCAL_REPOSITORY(503, "OMRS-REST-API-503-001 ", + "There is no local repository to support REST API call {0}", + "The server has received a call on its open metadata repository REST API services but is unable to process it because the local repository is not active.", + "If the server is supposed to have a local repository correct the server configuration and restart the server."), + NULL_RESPONSE_FROM_API(503, "OMRS-REST-API-503-002 ", + "A null response was received from REST API call {0} to repository {1}", + "The server has issued a call to the open metadata repository REST API services in a remote repository and has received a null response.", + "Look for errors in the remote repository's audit log and console to understand and correct the source of the error."), + CLIENT_SIDE_REST_API_ERROR(503, "OMRS-REST-API-503-003 ", + "A client-side exception was received from API call {0} to repository {1}. The error message was {2}", + "The server has issued a call to the open metadata repository REST API services in a remote repository and has received an exception from the local client libraries.", + "Look for errors in the local repository's audit log and console to understand and correct the source of the error.") + ; private int httpErrorCode;
http://git-wip-us.apache.org/repos/asf/atlas/blob/a1fd4068/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/EntityProxyOnlyException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/EntityProxyOnlyException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/EntityProxyOnlyException.java new file mode 100644 index 0000000..e9779d8 --- /dev/null +++ b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/EntityProxyOnlyException.java @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * <p/> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p/> + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.atlas.omrs.ffdc.exception; + +/** + * The EntityProxyOnlyException is thrown by an OMRS Connector when a specific entity instance is requested but this + * only a proxy version of the entity is in the metadata collection. + */ +public class EntityProxyOnlyException extends OMRSCheckedExceptionBase +{ + /** + * This is the typical constructor used for creating an EntityProxyOnlyException. + * + * @param httpCode - http response code to use if this exception flows over a REST call + * @param className - name of class reporting error + * @param actionDescription - description of function it was performing when error detected + * @param errorMessage - description of error + * @param systemAction - actions of the system as a result of the error + * @param userAction - instructions for correcting the error + */ + public EntityProxyOnlyException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) + { + super(httpCode, className, actionDescription, errorMessage, systemAction, userAction); + } + + + /** + * This is the constructor used for creating an EntityProxyOnlyException that resulted from a previous error. + * + * @param httpCode - http response code to use if this exception flows over a REST call + * @param className - name of class reporting error + * @param actionDescription - description of function it was performing when error detected + * @param errorMessage - description of error + * @param systemAction - actions of the system as a result of the error + * @param userAction - instructions for correcting the error + * @param caughtError - the error that resulted in this exception. + * */ + public EntityProxyOnlyException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) + { + super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtError); + } +} http://git-wip-us.apache.org/repos/asf/atlas/blob/a1fd4068/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/FunctionNotSupportedException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/FunctionNotSupportedException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/FunctionNotSupportedException.java new file mode 100644 index 0000000..7963269 --- /dev/null +++ b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/FunctionNotSupportedException.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * <p/> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p/> + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.atlas.omrs.ffdc.exception; + +/** + * FunctionNotSupportedException provides a checked exception for reporting that an OMRS repository connector + * does not support the method called. The OMRSErrorCode adds specific details for the cause/effect of the error. + */ +public class FunctionNotSupportedException extends OMRSCheckedExceptionBase +{ + /** + * This is the typical constructor for creating a FunctionNotSupportedException. It captures the essential details + * about the error, where it occurred and how to fix it. + * + * @param httpCode code to use across a REST interface + * @param className name of class reporting error + * @param actionDescription description of function it was performing when error detected + * @param errorMessage description of error + * @param systemAction actions of the system as a result of the error + * @param userAction instructions for correcting the error + */ + public FunctionNotSupportedException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) + { + super(httpCode, className, actionDescription, errorMessage, systemAction, userAction); + } + + + /** + * This constructor is used when an unexpected exception has been caught that needs to be wrapped in a + * FunctionNotSupportedException in order to add the essential details about the error, where it occurred and + * how to fix it. + * + * @param httpCode code to use across a REST interface + * @param className name of class reporting error + * @param actionDescription description of function it was performing when error detected + * @param errorMessage description of error + * @param systemAction actions of the system as a result of the error + * @param userAction instructions for correcting the error + * @param caughtException the exception/error that caused this exception to be raised + */ + public FunctionNotSupportedException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtException) + { + super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtException); + } +} http://git-wip-us.apache.org/repos/asf/atlas/blob/a1fd4068/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSCheckedExceptionBase.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSCheckedExceptionBase.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSCheckedExceptionBase.java index 7409ead..88f5352 100644 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSCheckedExceptionBase.java +++ b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSCheckedExceptionBase.java @@ -30,12 +30,12 @@ public class OMRSCheckedExceptionBase extends Exception /* * These default values are only seen if this exception is initialized using one of its superclass constructors. */ - private int reportedHTTPCode = 500; - private String reportingClassName = "<Unknown>"; - private String reportingActionDescription = "<Unknown>"; - private String reportedErrorMessage = "<Unknown>"; - private String reportedSystemAction = "<Unknown>"; - private String reportedUserAction = "<Unknown>"; + private int reportedHTTPCode; + private String reportingClassName; + private String reportingActionDescription; + private String reportedErrorMessage; + private String reportedSystemAction; + private String reportedUserAction; private Throwable reportedCaughtException = null; http://git-wip-us.apache.org/repos/asf/atlas/blob/a1fd4068/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipKnownException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipKnownException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipKnownException.java deleted file mode 100644 index bf8559f..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipKnownException.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * <p/> - * http://www.apache.org/licenses/LICENSE-2.0 - * <p/> - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.ffdc.exception; - -/** - * The RelationshipKnownException is thrown by an OMRS Connector when a specific relationship instance is added but this - * relationship is already stored in the metadata collection. - */ -public class RelationshipKnownException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor used for creating a RelationshipKnownException. - * - * @param httpCode - http response code to use if this exception flows over a REST call - * @param className - name of class reporting error - * @param actionDescription - description of function it was performing when error detected - * @param errorMessage - description of error - * @param systemAction - actions of the system as a result of the error - * @param userAction - instructions for correcting the error - */ - public RelationshipKnownException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction); - } - - - /** - * This is the constructor used for creating a RelationshipKnownException that resulted from a previous error. - * - * @param httpCode - http response code to use if this exception flows over a REST call - * @param className - name of class reporting error - * @param actionDescription - description of function it was performing when error detected - * @param errorMessage - description of error - * @param systemAction - actions of the system as a result of the error - * @param userAction - instructions for correcting the error - * @param caughtError - the error that resulted in this exception. - * */ - public RelationshipKnownException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtError); - } -} http://git-wip-us.apache.org/repos/asf/atlas/blob/a1fd4068/omrs/src/main/java/org/apache/atlas/omrs/localrepository/OMRSLocalRepository.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/OMRSLocalRepository.java b/omrs/src/main/java/org/apache/atlas/omrs/localrepository/OMRSLocalRepository.java index 459eaa9..0df52c9 100644 --- a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/OMRSLocalRepository.java +++ b/omrs/src/main/java/org/apache/atlas/omrs/localrepository/OMRSLocalRepository.java @@ -17,7 +17,7 @@ */ package org.apache.atlas.omrs.localrepository; -import org.apache.atlas.ocf.properties.Connection; +import org.apache.atlas.ocf.properties.beans.Connection; import org.apache.atlas.omrs.eventmanagement.events.OMRSInstanceEventProcessor; import org.apache.atlas.omrs.eventmanagement.OMRSRepositoryEventManager; import org.apache.atlas.omrs.eventmanagement.events.OMRSTypeDefEventProcessor; @@ -80,4 +80,28 @@ public interface OMRSLocalRepository * @return OMRSInstanceEventProcessor for the local repository. */ OMRSInstanceEventProcessor getIncomingInstanceEventProcessor(); + + + /** + * Return the local server name - used for outbound events. + * + * @return String name + */ + String getLocalServerName(); + + + /** + * Return the local server type - used for outbound events. + * + * @return String name + */ + String getLocalServerType(); + + + /** + * Return the name of the organization that owns this local repository. + * + * @return String name + */ + String getOrganizationName(); } http://git-wip-us.apache.org/repos/asf/atlas/blob/a1fd4068/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSConnectorProvider.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSConnectorProvider.java b/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSConnectorProvider.java index 0e7b26f..4d3ddb4 100644 --- a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSConnectorProvider.java +++ b/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSConnectorProvider.java @@ -26,6 +26,7 @@ import org.apache.atlas.ocf.properties.Connection; import org.apache.atlas.omrs.eventmanagement.OMRSRepositoryEventExchangeRule; import org.apache.atlas.omrs.eventmanagement.OMRSRepositoryEventManager; import org.apache.atlas.omrs.eventmanagement.repositoryeventmapper.OMRSRepositoryEventMapper; +import org.apache.atlas.omrs.eventmanagement.repositoryeventmapper.OMRSRepositoryEventMapperConnector; import org.apache.atlas.omrs.ffdc.OMRSErrorCode; import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryContentManager; import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryHelper; @@ -41,16 +42,13 @@ import java.util.UUID; */ public class LocalOMRSConnectorProvider extends ConnectorProvider { - private String localMetadataCollectionId = null; - private Connection localRepositoryRemoteConnection = null; - private String localServerName = null; - private String localServerType = null; - private String localOrganizationName = null; - private OMRSRepositoryEventMapper repositoryEventMapper = null; - private OMRSRepositoryEventManager outboundRepositoryEventManager = null; - private OMRSRepositoryContentManager repositoryContentManager = null; - private OMRSRepositoryEventExchangeRule saveExchangeRule = null; - private LocalOMRSRepositoryConnector localRepositoryConnector = null; + private String localMetadataCollectionId = null; + private Connection localRepositoryRemoteConnection = null; + private OMRSRepositoryEventMapperConnector realEventMapper = null; + private OMRSRepositoryEventManager outboundRepositoryEventManager = null; + private OMRSRepositoryContentManager repositoryContentManager = null; + private OMRSRepositoryEventExchangeRule saveExchangeRule = null; + private LocalOMRSRepositoryConnector localRepositoryConnector = null; @@ -61,30 +59,21 @@ public class LocalOMRSConnectorProvider extends ConnectorProvider * * @param localMetadataCollectionId - metadata collection Id for the local repository * @param localRepositoryRemoteConnection - connection object for creating a remote connector to this repository. - * @param localServerName - name of the local server - * @param localServerType - type of the local server - * @param localOrganizationName - name of organization that owns the server - * @param repositoryEventMapper - optional event mapper for local repository + * @param realEventMapper - optional event mapper for local repository * @param outboundRepositoryEventManager - event manager to call for outbound events. * @param repositoryContentManager - repositoryContentManager for supporting OMRS in managing TypeDefs. * @param saveExchangeRule - rule to determine what events to save to the local repository. */ - public LocalOMRSConnectorProvider(String localMetadataCollectionId, - Connection localRepositoryRemoteConnection, - String localServerName, - String localServerType, - String localOrganizationName, - OMRSRepositoryEventMapper repositoryEventMapper, - OMRSRepositoryEventManager outboundRepositoryEventManager, - OMRSRepositoryContentManager repositoryContentManager, - OMRSRepositoryEventExchangeRule saveExchangeRule) + public LocalOMRSConnectorProvider(String localMetadataCollectionId, + Connection localRepositoryRemoteConnection, + OMRSRepositoryEventMapperConnector realEventMapper, + OMRSRepositoryEventManager outboundRepositoryEventManager, + OMRSRepositoryContentManager repositoryContentManager, + OMRSRepositoryEventExchangeRule saveExchangeRule) { this.localMetadataCollectionId = localMetadataCollectionId; this.localRepositoryRemoteConnection = localRepositoryRemoteConnection; - this.localServerName = localServerName; - this.localServerType = localServerType; - this.localOrganizationName = localOrganizationName; - this.repositoryEventMapper = repositoryEventMapper; + this.realEventMapper = realEventMapper; this.outboundRepositoryEventManager = outboundRepositoryEventManager; this.repositoryContentManager = repositoryContentManager; this.saveExchangeRule = saveExchangeRule; @@ -112,12 +101,12 @@ public class LocalOMRSConnectorProvider extends ConnectorProvider public synchronized Connector getConnector(Connection realLocalConnection) throws ConnectionCheckedException, ConnectorCheckedException { + String methodName = "getConnector()"; + if (localMetadataCollectionId == null) { - String methodName = "getConnector()"; - /* - * Throw runtime exception to indicate that the local repository is not available. This + * Throw checked exception to indicate that the local repository is not available. This * is likely to be a configuration error. */ OMRSErrorCode errorCode = OMRSErrorCode.LOCAL_REPOSITORY_CONFIGURATION_ERROR; @@ -137,7 +126,7 @@ public class LocalOMRSConnectorProvider extends ConnectorProvider */ if (localRepositoryConnector == null) { - OMRSRepositoryConnector realLocalConnector = null; + OMRSRepositoryConnector realLocalConnector; /* * Any problems creating the connector to the local repository are passed to the caller as exceptions. @@ -155,29 +144,30 @@ public class LocalOMRSConnectorProvider extends ConnectorProvider } catch (Throwable error) { - // TODO throw ConnectionChecked Exception + OMRSErrorCode errorCode = OMRSErrorCode.BAD_LOCAL_REPOSITORY_CONNECTION; + String errorMessage = errorCode.getErrorMessageId() + + errorCode.getFormattedErrorMessage(); + + throw new ConnectionCheckedException(errorCode.getHTTPErrorCode(), + this.getClass().getName(), + methodName, + errorMessage, + errorCode.getSystemAction(), + errorCode.getUserAction(), + error); } /* - * Set up the local metadata collection Id in the real local connector. - */ - realLocalConnector.setMetadataCollectionId(localMetadataCollectionId); - - /* * With the connection to the real local repository established it is possible to create the wrapper * for the local repository. This wrapper is seen by most OMRS Components as the local repository * connector. The exceptions are the inbound event processors that work with the real local connector. */ - localRepositoryConnector = new LocalOMRSRepositoryConnector(localServerName, - localServerType, - localOrganizationName, - realLocalConnector, - repositoryEventMapper, + localRepositoryConnector = new LocalOMRSRepositoryConnector(realLocalConnector, + realEventMapper, outboundRepositoryEventManager, repositoryContentManager, saveExchangeRule); localRepositoryConnector.initialize(this.getNewConnectorGUID(), localRepositoryRemoteConnection); - localRepositoryConnector.setMetadataCollectionId(localMetadataCollectionId); } return localRepositoryConnector;