Class ImportObject

java.lang.Object
com.appiancorp.suiteapi.ix.ImportObject

public final class ImportObject extends Object
Represents the resulting object after an import or inspect operation.
  • Constructor Details

  • Method Details

    • getId

      @Deprecated public Long getId()
      Deprecated.
      The Long ID of the imported or inspected object.

      The ID will be null if the object does not exist on the system or is not of the type Long. If the object has an id that is not of type Long, use getObjectId instead. For inspect, this is any object that would be created. For both inspect and import, this is also any object that would have been created but failed instead.

      Returns:
      the local id.
    • getObjectId

      public Object getObjectId()
      The ID of type Object of the imported or inspected object.

      For any object that does not exist on the system, ID will be null. For inspect, this is any object that would be created. For both inspect and import, this is also any object that would have been created but failed instead.

      Returns:
      the local id.
    • getUuid

      public String getUuid()
      The universal identifier of the imported or inspected object.
      Returns:
      the UUID.
    • getName

      public String getName()
      The name of the imported or inspected object using the system locale.
      Returns:
      name of the object in system locale.
    • getName

      public String getName(Locale targetLocale)
      The name of the imported or inspected object based on a custom locale. If the name does not exist in the requested locale, return the name of the object in the first available locale.
      Parameters:
      targetLocale - Locale of desired output name.
      Returns:
      name of the object in targetLocale or in the first available locale if targetLocale does not exist.
    • getType

      public Long getType()
      The type of the imported object. To see a list of Appian types, refer to AppianType. Compare the result of getType() to AppianType by using getType().intValue() == AppianType.THE_TYPE_CONSTANT.
      Returns:
      type of the imported object.
    • getException

      public Throwable getException()
      The exception thrown while inspecting or importing this object, if any. This will be null if there was no error. The types of exceptions that may be returned by this method may change from release to release.
      Returns:
      exception if there is one thrown.
    • containsError

      public boolean containsError(ErrorCode ec)
      Checks whether a particular error was thrown while inspecting or importing this object. This is used to check for known error cases during the import. This checks the entire nested series of AppianExceptions, stop either at the end of the chain or at the first exception that is not an AppianException. This will always be false when there is no error on this object.
      Parameters:
      ec - ErrorCode object to check against.
      Returns:
      boolean value of whether the error code exists in the current error object.
    • getErrorMessage

      public String getErrorMessage(Locale targetLocale)
      Returns the localized error message as it is displayed in Appian interfaces. This is used when errors during import should be displayed to users, and will display the first and second levels of error messages.
      Parameters:
      targetLocale - locale of the error message to retrieve.
      Returns:
      the error message with the locale.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object