http://git-wip-us.apache.org/repos/asf/atlas/blob/68b47923/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 deleted file mode 100644 index 7963269..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/FunctionNotSupportedException.java +++ /dev/null @@ -1,60 +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; - -/** - * 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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/HomeEntityException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/HomeEntityException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/HomeEntityException.java deleted file mode 100644 index 706e235..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/HomeEntityException.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 HomeEntityException is thrown by an OMRS Connector when reference copy maintenance requests are issued on - * a home entity instance in the metadata collection. - */ -public class HomeEntityException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor used for creating a HomeEntityException. - * - * @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 HomeEntityException(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 HomeEntityException 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 HomeEntityException(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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/HomeRelationshipException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/HomeRelationshipException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/HomeRelationshipException.java deleted file mode 100644 index 245ad91..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/HomeRelationshipException.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 HomeRelationshipException is thrown by an OMRS Connector when reference copy maintenance requests are issued on - * a home relationship instance in the metadata collection. - */ -public class HomeRelationshipException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor used for creating an HomeRelationshipException. - * - * @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 HomeRelationshipException(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 HomeRelationshipException 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 HomeRelationshipException(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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidEntityException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidEntityException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidEntityException.java deleted file mode 100644 index 8ce55af..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidEntityException.java +++ /dev/null @@ -1,60 +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; - -/** - * InvalidEntityException provides a checked exception for reporting that an entity can not be added because - * its content is invalid. The OMRSErrorCode adds specific details for the cause/effect of the error. - */ -public class InvalidEntityException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor for creating an InvalidEntityException. 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 InvalidEntityException(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 - * InvalidEntityException 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 InvalidEntityException(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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidParameterException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidParameterException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidParameterException.java deleted file mode 100644 index 56d0dd5..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidParameterException.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 InvalidParameterException is thrown by an OMRS Connector when the parameters passed to a repository - * connector, or its accompanying metadata collection, are not valid. - */ -public class InvalidParameterException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor used for creating a InvalidParameterException. - * - * @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 InvalidParameterException(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 InvalidParameterException 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 InvalidParameterException(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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidRelationshipException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidRelationshipException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidRelationshipException.java deleted file mode 100644 index 82879d1..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidRelationshipException.java +++ /dev/null @@ -1,60 +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; - -/** - * InvalidRelationshipException provides a checked exception for reporting that a relationship can not be added because - * its content is invalid. The OMRSErrorCode adds specific details for the cause/effect of the error. - */ -public class InvalidRelationshipException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor for creating an InvalidRelationshipException. 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 InvalidRelationshipException(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 - * InvalidRelationshipException 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 InvalidRelationshipException(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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidTypeDefException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidTypeDefException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidTypeDefException.java deleted file mode 100644 index 60ee27f..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/InvalidTypeDefException.java +++ /dev/null @@ -1,60 +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; - -/** - * InvalidTypeDefException provides a checked exception for reporting that a typedef can not be added because - * its content is invalid. The OMRSErrorCode adds specific details for the cause/effect of the error. - */ -public class InvalidTypeDefException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor for creating an InvalidTypeDefException. 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 InvalidTypeDefException(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 - * InvalidTypeDefException 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 InvalidTypeDefException(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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/NotImplementedRuntimeException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/NotImplementedRuntimeException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/NotImplementedRuntimeException.java deleted file mode 100644 index e271055..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/NotImplementedRuntimeException.java +++ /dev/null @@ -1,32 +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; - -/** - * This exception is used to mark methods in the code that are not yet implemented. The JIRA where the implementation - * is being tracked is included in the message. - */ -public class NotImplementedRuntimeException extends RuntimeException -{ - public NotImplementedRuntimeException(String className, - String methodName, - String jiraName) - { - super("Method " + methodName + " in class " + className + " is not yet implemented. Refer to JIRA " + jiraName ); - } -} http://git-wip-us.apache.org/repos/asf/atlas/blob/68b47923/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 deleted file mode 100644 index 88f5352..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSCheckedExceptionBase.java +++ /dev/null @@ -1,161 +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; - -/** - * OMRSCheckedExceptionBase provides a checked exception for reporting errors found when using the OMRS. - * Typically these errors are either configuration or operational errors that can be fixed by an administrator - * or power user. However, there may be the odd bug that surfaces here. The OMRSErrorCode can be used with - * this exception to populate it with standard messages. Otherwise messages defined uniquely for a - * ConnectorProvider/Connector implementation can be used. The aim is to be able to uniquely identify the cause - * and remedy for the error. - */ -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; - private String reportingClassName; - private String reportingActionDescription; - private String reportedErrorMessage; - private String reportedSystemAction; - private String reportedUserAction; - private Throwable reportedCaughtException = null; - - - /** - * This is the typical constructor used for creating a OMRSCheckedExceptionBase. - * - * @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 OMRSCheckedExceptionBase(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) - { - super(errorMessage); - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - } - - - /** - * This is the constructor used for creating a OMRSCheckedExceptionBase when an unexpected error has been caught. - * - * @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 - previous error causing this exception - */ - public OMRSCheckedExceptionBase(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) - { - super(errorMessage, caughtError); - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - this.reportedCaughtException = caughtError; - } - - - /** - * Return the HTTP response code to use with this exception. - * - * @return reportedHTTPCode - */ - public int getReportedHTTPCode() - { - return reportedHTTPCode; - } - - /** - * The class that created this exception. - * - * @return reportingClassName - */ - public String getReportingClassName() - { - return reportingClassName; - } - - - /** - * The type of request that the class was performing when the condition occurred that resulted in this - * exception. - * - * @return reportingActionDescription - */ - public String getReportingActionDescription() - { - return reportingActionDescription; - } - - - /** - * A formatted short description of the cause of the condition that resulted in this exception. - * - * @return reportedErrorMessage - */ - public String getErrorMessage() - { - return reportedErrorMessage; - } - - - /** - * A description of the action that the system took as a result of the error condition. - * - * @return reportedSystemAction - */ - public String getReportedSystemAction() - { - return reportedSystemAction; - } - - - /** - * A description of the action necessary to correct the error. - * - * @return reportedUserAction - */ - public String getReportedUserAction() - { - return reportedUserAction; - } - - - /** - * An exception that was caught and wrapped by this exception. If a null is returned, then this exception is - * newly created and not the result of a previous exception. - * - * @return reportedCaughtException - */ - public Throwable getReportedCaughtException() { return reportedCaughtException; } -} http://git-wip-us.apache.org/repos/asf/atlas/blob/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSConfigErrorException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSConfigErrorException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSConfigErrorException.java deleted file mode 100644 index 1488a5f..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSConfigErrorException.java +++ /dev/null @@ -1,185 +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; - -/** - * OMRSConfigErrorException is used for all runtime exceptions generated by the Open Metadata Repository Services (OMRS) - * components that indicate a configuration error. - * It is used in conjunction with the OMRSErrorCode to provide first failure data capture for these errors. - */ -public class OMRSConfigErrorException extends OMRSRuntimeException -{ - /* - * 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 Throwable [] reportedCaughtExceptions = null; - - - /** - * This is the typical constructor used for creating an OMRSConfigErrorException. - * - * @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 OMRSConfigErrorException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction); - - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - } - - - /** - * This is the constructor used for creating a OMRSConfigErrorException when an unexpected exception has been caught. - * - * @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 - previous error causing this exception - */ - public OMRSConfigErrorException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtError); - - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - this.reportedCaughtExceptions = new Throwable[1]; - this.reportedCaughtExceptions[0] = caughtError; - } - - /** - * This is the constructor used for creating a OMRSConfigErrorException when multiple unexpected errors - * have been caught. - * - * @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 caughtErrors - previous errors causing this exception - */ - public OMRSConfigErrorException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable[] caughtErrors) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtErrors); - - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - this.reportedCaughtExceptions = caughtErrors; - } - - /** - * Return the HTTP response code to use with this exception. - * - * @return reportedHTTPCode - */ - public int getReportedHTTPCode() - { - return reportedHTTPCode; - } - - /** - * The class that created this exception. - * - * @return reportingClassName - */ - public String getReportingClassName() - { - return reportingClassName; - } - - - /** - * The type of request that the class was performing when the condition occurred that resulted in this - * exception. - * - * @return reportingActionDescription - */ - public String getReportingActionDescription() - { - return reportingActionDescription; - } - - - /** - * A formatted short description of the cause of the condition that resulted in this exception. - * - * @return reportedErrorMessage - */ - public String getErrorMessage() - { - return reportedErrorMessage; - } - - - /** - * A description of the action that the system took as a result of the error condition. - * - * @return reportedSystemAction - */ - public String getReportedSystemAction() - { - return reportedSystemAction; - } - - - /** - * A description of the action necessary to correct the error. - * - * @return reportedUserAction - */ - public String getReportedUserAction() - { - return reportedUserAction; - } - - - /** - * An exception that was caught and wrapped by this exception. If a null is returned, then this exception is - * newly created and not the result of a previous exception. - * - * @return reportedCaughtException - */ - public Throwable[] getReportedCaughtExceptions() { return reportedCaughtExceptions; } -} http://git-wip-us.apache.org/repos/asf/atlas/blob/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSConnectorErrorException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSConnectorErrorException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSConnectorErrorException.java deleted file mode 100644 index eae658a..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSConnectorErrorException.java +++ /dev/null @@ -1,184 +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; - -/** - * OMRSConnectorErrorException is used for all runtime exceptions generated by the Open Metadata Repository Services (OMRS) - * components that indicate a problem with one of its connectors. It is typically wrapping an OCF checked exception. - */ -public class OMRSConnectorErrorException extends OMRSRuntimeException -{ - /* - * 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 Throwable [] reportedCaughtExceptions = null; - - - /** - * This is the typical constructor used for creating an OMRSLogicErrorException. - * - * @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 OMRSConnectorErrorException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction); - - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - } - - - /** - * This is the constructor used for creating a OMRSLogicErrorException when an unexpected exception has been caught. - * - * @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 - previous error causing this exception - */ - public OMRSConnectorErrorException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtError); - - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - this.reportedCaughtExceptions = new Throwable[1]; - this.reportedCaughtExceptions[0] = caughtError; - } - - /** - * This is the constructor used for creating a OMRSLogicErrorException when multiple unexpected errors - * have been caught. - * - * @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 caughtErrors - previous errors causing this exception - */ - public OMRSConnectorErrorException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable[] caughtErrors) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtErrors); - - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - this.reportedCaughtExceptions = caughtErrors; - } - - /** - * Return the HTTP response code to use with this exception. - * - * @return reportedHTTPCode - */ - public int getReportedHTTPCode() - { - return reportedHTTPCode; - } - - /** - * The class that created this exception. - * - * @return reportingClassName - */ - public String getReportingClassName() - { - return reportingClassName; - } - - - /** - * The type of request that the class was performing when the condition occurred that resulted in this - * exception. - * - * @return reportingActionDescription - */ - public String getReportingActionDescription() - { - return reportingActionDescription; - } - - - /** - * A formatted short description of the cause of the condition that resulted in this exception. - * - * @return reportedErrorMessage - */ - public String getErrorMessage() - { - return reportedErrorMessage; - } - - - /** - * A description of the action that the system took as a result of the error condition. - * - * @return reportedSystemAction - */ - public String getReportedSystemAction() - { - return reportedSystemAction; - } - - - /** - * A description of the action necessary to correct the error. - * - * @return reportedUserAction - */ - public String getReportedUserAction() - { - return reportedUserAction; - } - - - /** - * An exception that was caught and wrapped by this exception. If a null is returned, then this exception is - * newly created and not the result of a previous exception. - * - * @return reportedCaughtException - */ - public Throwable[] getReportedCaughtExceptions() { return reportedCaughtExceptions; } -} http://git-wip-us.apache.org/repos/asf/atlas/blob/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSLogicErrorException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSLogicErrorException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSLogicErrorException.java deleted file mode 100644 index 7935140..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSLogicErrorException.java +++ /dev/null @@ -1,185 +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; - -/** - * OMRSLogicErrorException is used for all runtime exceptions generated by the Open Metadata Repository Services (OMRS) - * components that indicate a logic error. Effectively this exception should never be seen. - * It is used in conjunction with the OMRSErrorCode to provide first failure data capture for these errors. - */ -public class OMRSLogicErrorException extends OMRSRuntimeException -{ - /* - * 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 Throwable [] reportedCaughtExceptions = null; - - - /** - * This is the typical constructor used for creating an OMRSLogicErrorException. - * - * @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 OMRSLogicErrorException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction); - - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - } - - - /** - * This is the constructor used for creating a OMRSLogicErrorException when an unexpected exception has been caught. - * - * @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 - previous error causing this exception - */ - public OMRSLogicErrorException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtError); - - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - this.reportedCaughtExceptions = new Throwable[1]; - this.reportedCaughtExceptions[0] = caughtError; - } - - /** - * This is the constructor used for creating a OMRSLogicErrorException when multiple unexpected errors - * have been caught. - * - * @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 caughtErrors - previous errors causing this exception - */ - public OMRSLogicErrorException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable[] caughtErrors) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtErrors); - - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - this.reportedCaughtExceptions = caughtErrors; - } - - /** - * Return the HTTP response code to use with this exception. - * - * @return reportedHTTPCode - */ - public int getReportedHTTPCode() - { - return reportedHTTPCode; - } - - /** - * The class that created this exception. - * - * @return reportingClassName - */ - public String getReportingClassName() - { - return reportingClassName; - } - - - /** - * The type of request that the class was performing when the condition occurred that resulted in this - * exception. - * - * @return reportingActionDescription - */ - public String getReportingActionDescription() - { - return reportingActionDescription; - } - - - /** - * A formatted short description of the cause of the condition that resulted in this exception. - * - * @return reportedErrorMessage - */ - public String getErrorMessage() - { - return reportedErrorMessage; - } - - - /** - * A description of the action that the system took as a result of the error condition. - * - * @return reportedSystemAction - */ - public String getReportedSystemAction() - { - return reportedSystemAction; - } - - - /** - * A description of the action necessary to correct the error. - * - * @return reportedUserAction - */ - public String getReportedUserAction() - { - return reportedUserAction; - } - - - /** - * An exception that was caught and wrapped by this exception. If a null is returned, then this exception is - * newly created and not the result of a previous exception. - * - * @return reportedCaughtException - */ - public Throwable[] getReportedCaughtExceptions() { return reportedCaughtExceptions; } -} http://git-wip-us.apache.org/repos/asf/atlas/blob/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSRuntimeException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSRuntimeException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSRuntimeException.java deleted file mode 100644 index c72aaf6..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/OMRSRuntimeException.java +++ /dev/null @@ -1,181 +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; - -/** - * OMRSRuntimeException is used for all runtime exceptions generated by the Open Metadata Repository Services (OMRS). - * It is used in conjunction with the OMRSErrorCode to provide first failure data capture for these errors. - */ -public class OMRSRuntimeException extends RuntimeException -{ - /* - * 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 Throwable [] reportedCaughtExceptions = null; - - - /** - * This is the typical constructor used for creating an OMRSRuntimeException. - * - * @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 OMRSRuntimeException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) - { - super(errorMessage); - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - } - - - /** - * This is the constructor used for creating a OMRSRuntimeException when an unexpected error has been caught. - * - * @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 - previous error causing this exception - */ - public OMRSRuntimeException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) - { - super(errorMessage, caughtError); - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - this.reportedCaughtExceptions = new Throwable[1]; - this.reportedCaughtExceptions[0] = caughtError; - } - - /** - * This is the constructor used for creating a OMRSRuntimeException when multiple unexpected errors - * have been caught. - * - * @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 caughtErrors - previous errors causing this exception - */ - public OMRSRuntimeException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable[] caughtErrors) - { - super(errorMessage, caughtErrors[0]); - this.reportedHTTPCode = httpCode; - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - this.reportedCaughtExceptions = caughtErrors; - } - - /** - * Return the HTTP response code to use with this exception. - * - * @return reportedHTTPCode - */ - public int getReportedHTTPCode() - { - return reportedHTTPCode; - } - - /** - * The class that created this exception. - * - * @return reportingClassName - */ - public String getReportingClassName() - { - return reportingClassName; - } - - - /** - * The type of request that the class was performing when the condition occurred that resulted in this - * exception. - * - * @return reportingActionDescription - */ - public String getReportingActionDescription() - { - return reportingActionDescription; - } - - - /** - * A formatted short description of the cause of the condition that resulted in this exception. - * - * @return reportedErrorMessage - */ - public String getErrorMessage() - { - return reportedErrorMessage; - } - - - /** - * A description of the action that the system took as a result of the error condition. - * - * @return reportedSystemAction - */ - public String getReportedSystemAction() - { - return reportedSystemAction; - } - - - /** - * A description of the action necessary to correct the error. - * - * @return reportedUserAction - */ - public String getReportedUserAction() - { - return reportedUserAction; - } - - - /** - * An exception that was caught and wrapped by this exception. If a null is returned, then this exception is - * newly created and not the result of a previous exception. - * - * @return reportedCaughtException - */ - public Throwable[] getReportedCaughtExceptions() { return reportedCaughtExceptions; } -} http://git-wip-us.apache.org/repos/asf/atlas/blob/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PagingErrorException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PagingErrorException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PagingErrorException.java deleted file mode 100644 index 5e91a58..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PagingErrorException.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 PagingErrorException is thrown by an OMRS Connector when the caller has passed invalid paging attributes - * on a search call. - */ -public class PagingErrorException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor used for creating a PagingErrorException. - * - * @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 PagingErrorException(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 PagingErrorException 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 PagingErrorException(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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PatchErrorException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PatchErrorException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PatchErrorException.java deleted file mode 100644 index 80e806b..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PatchErrorException.java +++ /dev/null @@ -1,60 +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; - -/** - * PatchErrorException provides a checked exception for reporting that a typedef can not be updated because there are - * problems with the supplied TypeDefPatch. The OMRSErrorCode adds specific details for the cause/effect of the error. - */ -public class PatchErrorException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor for creating an PatchErrorException. 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 PatchErrorException(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 - * PatchErrorException 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 PatchErrorException(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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PropertyErrorException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PropertyErrorException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PropertyErrorException.java deleted file mode 100644 index 9be99c2..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/PropertyErrorException.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 PropertyErrorException is thrown by an OMRS Connector when the properties defined for a specific entity - * or relationship instance do not match the TypeDefs for the metadata collection. - */ -public class PropertyErrorException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor used for creating a PropertyErrorException. - * - * @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 PropertyErrorException(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 PropertyErrorException 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 PropertyErrorException(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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipConflictException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipConflictException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipConflictException.java deleted file mode 100644 index c0b76c9..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipConflictException.java +++ /dev/null @@ -1,60 +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; - -/** - * RelationshipConflictException provides a checked exception for reporting that a relationship can not be added because - * it conflicts with a relationship already stored. The OMRSErrorCode adds specific details for the cause/effect of the error. - */ -public class RelationshipConflictException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor for creating a RelationshipConflictException. 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 RelationshipConflictException(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 - * RelationshipConflictException 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 RelationshipConflictException(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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipNotDeletedException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipNotDeletedException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipNotDeletedException.java deleted file mode 100644 index bc3f5c0..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipNotDeletedException.java +++ /dev/null @@ -1,58 +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; - -/** - * RelationshipNotDeletedException is thrown by an OMRS Connector when a request is made to purge or restore a specific - * relationship instance and the entity is not in DELETED status. - * - */ -public class RelationshipNotDeletedException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor used for creating an RelationshipNotDeletedException. - * - * @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 RelationshipNotDeletedException(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 RelationshipNotDeletedException 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 RelationshipNotDeletedException(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/68b47923/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipNotKnownException.java ---------------------------------------------------------------------- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipNotKnownException.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipNotKnownException.java deleted file mode 100644 index 209e675..0000000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/exception/RelationshipNotKnownException.java +++ /dev/null @@ -1,61 +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; - -/** - * RelationshipNotKnownException provides a checked exception for reporting when a requested relationship - * instance can not be found in the metadata collection. - * The OMRSErrorCode adds specific details for the cause/effect of the error. - */ -public class RelationshipNotKnownException extends OMRSCheckedExceptionBase -{ - /** - * This is the typical constructor for creating a RelationshipNotKnownException. 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 RelationshipNotKnownException(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 - * RelationshipNotKnownException 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 RelationshipNotKnownException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtException) - { - super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtException); - } -}
