com.ibm.workplace.wcm.api.exceptions
Class WCMException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.ibm.workplace.wcm.api.exceptions.WCMException
All Implemented Interfaces:
Localized, java.io.Serializable
Direct Known Subclasses:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException, ContentPageResolutionException, ContentUrlFilterInstantiationException, ContentUrlGenerationException, DigitalAssetException, com.ibm.workplace.wcm.api.exceptions.DocumentDeleteException, com.ibm.workplace.wcm.api.exceptions.DocumentIdCreationException, com.ibm.workplace.wcm.api.exceptions.DocumentSaveException, FileUploadValidationException, IdentityCreationException, com.ibm.workplace.wcm.api.exceptions.OperationFailedException, PrerenderException, PreviousStageNotEnabledException, com.ibm.workplace.wcm.api.exceptions.ProjectException, RenderingPluginException, RestoreFailedException, com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException, VirtualPortalNotFoundException

public abstract class WCMException
extends java.lang.Exception
implements Localized

The base Web Content Manager API Exception.

Since:
5.1
See Also:
Serialized Form

Field Summary
static int ERR_APTRIX
          default error code
 
Constructor Summary
protected WCMException()
          Construtor to only be used by sub classes
  WCMException(Localized localizedMessage)
          Constructor that requires a localized message
  WCMException(Localized localizedMessage, java.lang.Throwable cause)
          Constructor that requires a localized message
  WCMException(java.lang.String detail)
          Constructor that requires detail
  WCMException(java.lang.String detail, java.lang.Throwable cause)
          Constructor that requires detail plus a cause exception
protected WCMException(java.lang.Throwable cause)
          Constructor to only be used by sub classes
 
Method Summary
 java.lang.Throwable getCause()
          Retrieves the cause exception for this exception
 java.lang.String getDescription(java.util.Locale paramLocale)
          Returns the localized message for this exception.
 int getErrorCode()
          The error code for this exception.
 ListModel<java.util.Locale> getLocales()
          Locales suppported by the Localized message.
 java.lang.String getMessage()
          Retrieves the message that accompanies this exception.
 java.lang.String getMessage(java.util.Locale locale)
          Returns a localized message if one has been set on this exception.
 java.lang.String getTitle(java.util.Locale paramLocale)
          Returns the localized message for this exception.
 void printStackTrace()
          Overridden to include cause
 void printStackTrace(java.io.PrintStream s)
          Overridden to include cause
 void printStackTrace(java.io.PrintWriter s)
          Overridden to include cause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERR_APTRIX

public static final int ERR_APTRIX
default error code

See Also:
Constant Field Values
Constructor Detail

WCMException

protected WCMException()
Construtor to only be used by sub classes


WCMException

protected WCMException(java.lang.Throwable cause)
Constructor to only be used by sub classes

Parameters:
cause - the exception that caused this exception

WCMException

public WCMException(java.lang.String detail)
Constructor that requires detail

Parameters:
detail - a message describing extra information about the exception

WCMException

public WCMException(java.lang.String detail,
                    java.lang.Throwable cause)
Constructor that requires detail plus a cause exception

Parameters:
detail - a message description extra information about the exception
cause - the exception that caused this exception

WCMException

public WCMException(Localized localizedMessage)
Constructor that requires a localized message

Parameters:
localizedMessage - a localized message description extra information about the exception

WCMException

public WCMException(Localized localizedMessage,
                    java.lang.Throwable cause)
Constructor that requires a localized message

Parameters:
localizedMessage - a localized message description extra information about the exception
cause - the exception that caused this exception
Method Detail

getLocales

public ListModel<java.util.Locale> getLocales()
Locales suppported by the Localized message.

Specified by:
getLocales in interface Localized
Returns:
the locales supported by the localized message if one is defined otherwise returns an empty list.

getMessage

public java.lang.String getMessage(java.util.Locale locale)
Returns a localized message if one has been set on this exception. If no localized message has been set then the standard message will be returned.

Parameters:
locale - the desired Locale for the message
Returns:
a localized message if one has been set on this exception
Since:
8.0

getMessage

public java.lang.String getMessage()
Retrieves the message that accompanies this exception. The message also includes the causes exception if there is a cause exception.

Overrides:
getMessage in class java.lang.Throwable
Returns:
the exception's message

getTitle

public java.lang.String getTitle(java.util.Locale paramLocale)
Returns the localized message for this exception.

Specified by:
getTitle in interface Localized
Parameters:
paramLocale - the desired Locale for the message
Returns:
localized message for this exception.
Since:
8.0

getDescription

public java.lang.String getDescription(java.util.Locale paramLocale)
Returns the localized message for this exception.

Specified by:
getDescription in interface Localized
Parameters:
paramLocale - the desired Locale for the message
Returns:
localized message for this exception.
Since:
8.0

getCause

public java.lang.Throwable getCause()
Retrieves the cause exception for this exception

Overrides:
getCause in class java.lang.Throwable
Returns:
the cause exception or null if there was no cause exception.

getErrorCode

public int getErrorCode()
The error code for this exception.

Note:This implementation is the default error code for the AptrixException. Subclasses may override this for a more appropriate error number.

Returns:
the error code for this exception.

printStackTrace

public void printStackTrace()
Overridden to include cause

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Overridden to include cause

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Overridden to include cause

Overrides:
printStackTrace in class java.lang.Throwable