Class ImportException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InvalidXsdException, UnsupportedXsdException, XsdImportEcoreSaveException

public class ImportException extends AppianException
Thrown when a new type could not be imported.
See Also:
  • Field Details

    • _errorCode

      protected ErrorCode _errorCode
    • _errorCodeArguments

      protected Object[] _errorCodeArguments
  • Constructor Details

    • ImportException

      public ImportException(ImportDiagnostic[] diagnostics_, ErrorCode errorCode_)
      Constructs a new exception with the specified error code and import diagnostics. The cause is not initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable)
      Parameters:
      diagnostics_ - the diagnostics that were generated during the attempted import
      errorCode_ - the ErrorCode associated with the exception
    • ImportException

      public ImportException(ImportDiagnostic[] diagnostics_, ErrorCode errorCode_, Object[] errorCodeArguments_)
      Constructs a new exception with the specified error code and import diagnostics. The cause is not initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable)
      Parameters:
      diagnostics_ - the diagnostics that were generated during the attempted import
      errorCode_ - the ErrorCode associated with the exception
      errorCodeArguments_ - the arguments that must be used to render this exception's message representation
    • ImportException

      public ImportException(ImportDiagnostic[] diagnostics_, ErrorCode errorCode_, Object[] errorCodeArguments_, Throwable cause_)
      Constructs a new exception with the specified error code and import diagnostics.
      Parameters:
      diagnostics_ - the diagnostics that were generated during the attempted import
      errorCode_ - the ErrorCode associated with the exception
      errorCodeArguments_ - the arguments that must be used to render this exception's message representation
      cause_ - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
  • Method Details

    • getErrorCode

      public ErrorCode getErrorCode()
      Gets the error code associated with this exception.
      Overrides:
      getErrorCode in class AppianException
      See Also:
    • getErrorCodeArguments

      protected Object[] getErrorCodeArguments()
      Gets the arguments that must be used to render this exception's message representation.
      Overrides:
      getErrorCodeArguments in class AppianException
      Returns:
      the arguments of the error code tied to this exception
      See Also:
    • hasSameErrorCodeAndArguments

      public boolean hasSameErrorCodeAndArguments(ImportException e)
      Checks whether the specified ImportException has the same error code and error code arguments as this object.
      Parameters:
      e - an ImportException instance
      Returns:
      true if the same, false otherwise
    • getDiagnostics

      public ImportDiagnostic[] getDiagnostics()
      Retrieves the diagnostics that were generated during the attempted import.
      Returns:
      the diagnostics
    • setDiagnostics

      public void setDiagnostics(ImportDiagnostic[] diagnostics_)
      Sets the diagnostics that are associated with the ImportException.
      Parameters:
      diagnostics_ - the diagnostics that were generated during the attempted import