public class DiagnosticContext
extends java.lang.Object
Constructor and Description |
---|
DiagnosticContext(CLLException cllException,
com.centrasite.jaxr.CentraSiteConnection connection,
java.util.Properties properties)
Construct a
DiagnosticContext instance from the given parameter values. |
DiagnosticContext(CLLException cllException,
com.centrasite.jaxr.CentraSiteConnection connection,
javax.xml.registry.infomodel.RegistryObject regObject,
java.util.Properties properties)
Construct a
DiagnosticContext instance from the given parameter values. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttachment()
Returns the attachment of diagnostics context.
|
com.centrasite.jaxr.CentraSiteConnection |
getConnection()
Returns the logged in connection object.
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getContext()
Returns the diagnostics context.
|
static java.lang.String |
getStackTrace(java.lang.Throwable throwable)
Get the stack trace string from the given Throwable instance.
|
void |
setAttachment(java.lang.String file)
Sets attachment for each diagnostics context.
|
public DiagnosticContext(CLLException cllException, com.centrasite.jaxr.CentraSiteConnection connection, java.util.Properties properties) throws CLLException
DiagnosticContext
instance from the given parameter values.cllException
- Mandatory value containing the CLLException
. Corresponding
Email template tokens: ${error.id}, ${error.message}, ${error.action}, ${error.explanation}, ${error.stacktrace}connection
- CentraSiteConnection
- Logged in JAXR connection / Guest user connection.
Corresponding Email template tokens: ${system.user.name}, ${system.repository.url}, ${user.locale}.properties
- Properties
- User-defined email template tokens for replacing the default
diagnostics email template's token.CLLException
- If there is a failure in constructing the DiagnosticContext
instancepublic DiagnosticContext(CLLException cllException, com.centrasite.jaxr.CentraSiteConnection connection, javax.xml.registry.infomodel.RegistryObject regObject, java.util.Properties properties) throws CLLException
DiagnosticContext
instance from the given parameter values.cllException
- Mandatory value containing the CLLException
. Corresponding
Email template tokens: ${error.id}, ${error.message}, ${error.action}, ${error.explanation}, ${error.stacktrace}connection
- CentraSiteConnection
- Logged in JAXR connection / Guest user connection.
Corresponding Email template tokens: ${system.user.name}, ${system.repository.url}, ${user.locale}.regObject
- RegistryObject
instance - Corresponding Email template tokens:
${entity.name}, ${entity.description}, ${entity.owner},
${entity.organization}, ${entity.state}, ${entity.type},
${entity.version}, ${entity.XML}, ${entity.URL}properties
- Properties
- User-defined email template tokens for replacing the default
diagnostics email template's token.CLLException
- If there is a failure in constructing the DiagnosticContext
instancepublic java.util.HashMap<java.lang.String,java.lang.Object> getContext()
HashMap
having connection URL and asset URL key value pairspublic java.lang.String getAttachment()
public void setAttachment(java.lang.String file)
file
- The name of the filepublic com.centrasite.jaxr.CentraSiteConnection getConnection()
CentraSiteConnection
- logged in connection objectpublic static java.lang.String getStackTrace(java.lang.Throwable throwable)
throwable
- The Throwable
instance