Package com.appiancorp.suiteapi.ix
Class ImportObject
java.lang.Object
com.appiancorp.suiteapi.ix.ImportObject
Represents the resulting object after an import or inspect operation.
-
Constructor Summary
ConstructorDescriptionImportObject
(Long id, String uuid, String datatypeName, LocaleString nameLocalized, Long type, Locale locale, Throwable throwable) ImportObject
(Object id, String uuid, String datatypeName, LocaleString nameLocalized, Long type, Locale locale, Throwable throwable) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether a particular error was thrown while inspecting or importing this object.boolean
getErrorMessage
(Locale targetLocale) Returns the localized error message as it is displayed in Appian interfaces.The exception thrown while inspecting or importing this object, if any.getId()
Deprecated.getName()
The name of the imported or inspected object using the system locale.The name of the imported or inspected object based on a custom locale.The ID of type Object of the imported or inspected object.getType()
The type of the imported object.getUuid()
The universal identifier of the imported or inspected object.int
hashCode()
toString()
-
Constructor Details
-
ImportObject
-
ImportObject
-
-
Method Details
-
getId
Deprecated.usegetObjectId()
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
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
The universal identifier of the imported or inspected object.- Returns:
- the UUID.
-
getName
The name of the imported or inspected object using the system locale.- Returns:
- name of the object in system locale.
-
getName
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
The type of the imported object. To see a list of Appian types, refer toAppianType
. Compare the result of getType() to AppianType by using getType().intValue() == AppianType.THE_TYPE_CONSTANT.- Returns:
- type of the imported object.
-
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
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
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
-
hashCode
public int hashCode() -
equals
-
getObjectId()