com.softwareag.centrasite.api.diagnostic
Class DiagnosticContext

java.lang.Object
  extended by com.softwareag.centrasite.api.diagnostic.DiagnosticContext

public class DiagnosticContext
extends java.lang.Object

DiagnosticContext class generates the diagnostics context object, wherein the context object is used in the sendDiagnostics call to replace an email template token.


Constructor Summary
DiagnosticContext(CLLException cllException, com.centrasite.jaxr.CentraSiteConnection connection, java.util.Properties properties)
           
DiagnosticContext(CLLException cllException, com.centrasite.jaxr.CentraSiteConnection connection, javax.xml.registry.infomodel.RegistryObject regObject, java.util.Properties properties)
           
 
Method Summary
 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)
           
 void setAttachment(java.lang.String file)
          Sets attachment for each diagnostics context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiagnosticContext

public DiagnosticContext(CLLException cllException,
                         com.centrasite.jaxr.CentraSiteConnection connection,
                         java.util.Properties properties)
                  throws CLLException
Parameters:
cllException - Mandatory. Email template tokens: ${error.id}, ${error.message}, ${error.action}, ${error.explanation}, ${error.stacktrace}
connection - Logged in JAXR connection / Guest user connection. Email template tokens: ${system.user.name}, ${system.repository.url}, "${user.locale}.
properties - User-defined email template tokens for replacing the default diagnostics email template's token.
Throws:
CLLException

DiagnosticContext

public DiagnosticContext(CLLException cllException,
                         com.centrasite.jaxr.CentraSiteConnection connection,
                         javax.xml.registry.infomodel.RegistryObject regObject,
                         java.util.Properties properties)
                  throws CLLException
Parameters:
cllException - Mandatory. Email template tokens: ${error.id}, ${error.message}, ${error.action}, ${error.explanation}, ${error.stacktrace}
connection - Logged in JAXR connection / Guest user connection. Email template tokens: ${system.user.name}, ${system.repository.url}, "${user.locale}.
regObject - Email template tokens: ${entity.name}, ${entity.description}, ${entity.owner}, ${entity.organization}, ${entity.state}, ${entity.type}, ${entity.version}, ${entity.XML}, ${entity.URL}
properties - User-defined email template tokens for replacing the default diagnostics email template's token.
Throws:
CLLException
Method Detail

getContext

public java.util.HashMap<java.lang.String,java.lang.Object> getContext()
Returns the diagnostics context.

Returns:
diagnostics context.

getAttachment

public java.lang.String getAttachment()
Returns the attachment of diagnostics context.

Returns:
attachment of diagnostics context.

setAttachment

public void setAttachment(java.lang.String file)
Sets attachment for each diagnostics context.

Parameters:
file -

getConnection

public com.centrasite.jaxr.CentraSiteConnection getConnection()
Returns the logged in connection object.

Returns:
logged in connection object

getStackTrace

public static java.lang.String getStackTrace(java.lang.Throwable throwable)