Package com.attivio.sdk.error
Class ErrorCode
- java.lang.Object
-
- com.attivio.sdk.error.ErrorCode
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AdvancedTextExtractionError
,AgentError
,ApiSecurityError
,BaseTransformerError
,BasisTechError
,BusinessCenterError
,CgiApiError
,ClientError
,CommandLineError
,ConfigurationError
,ConnectorError
,ConnectorServiceError
,ContentStoreError
,DatabaseScannerError
,DictionaryError
,DocumentProcessorError
,EventStoreError
,ExportStatusCode
,FederationError
,HadoopCheckerError
,IndexEngineError
,IndexProcessError
,IndexWorkflowError
,IngestHistoryError
,JoinFinderError
,KernelError
,LinguisticProcessingError
,LoadGeneratorError
,MemoryError
,MetadataError
,ModelBuildingError
,MultiRegionError
,OntologyError
,PerfmonServerError
,PlatformError
,PrincipalsError
,ProcessError
,PropertyStoreError
,QueryBuilderError
,QueryParserError
,RelevancyError
,ReplicationError
,SailError
,SchedulerError
,SchemaError
,SearchClientError
,SearchEngineError
,SearchWorkflowError
,SecurityAdError
,SecurityError
,ServiceFactoryFactory.ServiceFactoryError
,ServletError
,SliderError
,SonarError
,SonarSpiderError
,SqlSdkError
,StoreError
,StructureExtractionError
,TextExtractionError
,TransportError
,TriggerError
,VisitorHistoryError
,WebServiceError
public abstract class ErrorCode extends java.lang.Object implements java.io.Serializable
Assigns codes and categories for every error message that can be generated by the Attivio system.All logged error and warning messages will be printed with form
CATEGORY-###
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ErrorCode(java.lang.String category, long code)
Creates a new ErrorCode with the given category and code.protected
ErrorCode(java.lang.String category, long code, boolean performUniquenessCheck)
Creates a new ErrorCode with the given category and code, optionally ensuring the ErrorCode is unique.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
formatError(java.util.Locale locale, java.lang.String... context)
Format a contextual error message.java.lang.String
getCategory()
long
getCode()
static ErrorCode
getErrorCode(java.lang.String category, long code)
Get an ErrorCode given its category and number.int
hashCode()
protected java.lang.Object
readResolve()
Need to implement readResolve() in order to ensure == works for serialized error codes.java.lang.String
toString()
-
-
-
Constructor Detail
-
ErrorCode
protected ErrorCode(java.lang.String category, long code)
Creates a new ErrorCode with the given category and code. Makes sure it is unique. This method must be used by statically initialized error code constructors.- Parameters:
category
-code
-
-
ErrorCode
protected ErrorCode(java.lang.String category, long code, boolean performUniquenessCheck)
Creates a new ErrorCode with the given category and code, optionally ensuring the ErrorCode is unique. performUniquenessCheck=false is intended to be used only by serialization code that creates error codes on deserialization.- Parameters:
category
-code
-performUniquenessCheck
-
-
-
Method Detail
-
getCategory
public java.lang.String getCategory()
-
getCode
public long getCode()
-
formatError
public java.lang.String formatError(java.util.Locale locale, java.lang.String... context)
Format a contextual error message.
-
getErrorCode
public static ErrorCode getErrorCode(java.lang.String category, long code)
Get an ErrorCode given its category and number.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
readResolve
protected java.lang.Object readResolve()
Need to implement readResolve() in order to ensure == works for serialized error codes.NOTE: needs to be protected to ensure all error codes use this read resolve.
-
-