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.SerializableAssigns 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 protectedErrorCode(java.lang.String category, long code)Creates a new ErrorCode with the given category and code.protectedErrorCode(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 booleanequals(java.lang.Object o)java.lang.StringformatError(java.util.Locale locale, java.lang.String... context)Format a contextual error message.java.lang.StringgetCategory()longgetCode()static ErrorCodegetErrorCode(java.lang.String category, long code)Get an ErrorCode given its category and number.inthashCode()protected java.lang.ObjectreadResolve()Need to implement readResolve() in order to ensure == works for serialized error codes.java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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.
-
-