com.ptc.windchill.cadx.common.htmllog
Class HTMLLogManager

java.lang.Object
  extended bycom.ptc.windchill.cadx.common.htmllog.HTMLLogManager
All Implemented Interfaces:
Externalizable, Serializable

public class HTMLLogManager
extends Object
implements Externalizable



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String CONTEXT_KEY
           
private static String COOKIE_LOGID_KEY
           
static long EXTERNALIZATION_VERSION_UID
           
static String MSG_FIELDS_SEPARATOR
           
static String NO_OBJECT_FOR_ACTION_KEY
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static String SHOW_FIRST_MSG_KEY
           
static String SHOW_MAX_MSGS_KEY
           
static String SHOW_STATUS_KEY
           
private  HTTPState state
           
static String STATUS_MSG_KEY
           
private static boolean VERBOSE
           
 
Constructor Summary
  HTMLLogManager()
           
protected HTMLLogManager(HTTPState state)
           
 
Method Summary
static void addDebugMessage(String messageCode, String message, Exception exception)
          

Supported API: false
static void addDebugMessage(String messageCode, String rb, String rbKey, Object[] params, Exception exception)
          

Supported API: false
static void addErrorMessage(String messageCode, String message, Exception exception)
          

Supported API: false
static void addErrorMessage(String messageCode, String rb, String rbKey, Object[] params, Exception exception)
          

Supported API: false
static void addInfoMessage(String messageCode, String message, Exception exception)
          

Supported API: false
static void addInfoMessage(String messageCode, String rb, String rbKey, Object[] params, Exception exception)
          

Supported API: false
private static void addSessionStatusMessage(String msg)
           
static void addStatusMessage(String messageCode, String message, Exception exception)
          

Supported API: false
static void addStatusMessage(String messageCode, String rb, String rbKey, Object[] params, Exception exception)
          

Supported API: false
static void addWarningMessage(String messageCode, String message, Exception exception)
          

Supported API: false
static void addWarningMessage(String messageCode, String rb, String rbKey, Object[] params, Exception exception)
          

Supported API: false
static void clearLog()
          Utility method to clear all log messages for the current user session.
private static Locale getLocale()
           
static List getLogMessages(int max_nof_messages, boolean most_recent)
          Utility method to get list of messages for the current session.
static int getLogStatus()
          Deprecated.  
private static String getSessionStatusMessage()
           
 HTTPState getState()
           
static String getStatusMessage(Properties queryData)
          Utility method to return the most recent message which is to be displayed in the status line of the HTML UI pages.
static boolean hasStatusMessage()
          Deprecated.  
static boolean hasStatusMessage(Properties queryData)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(HTMLLogManager thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
static void resetLogStatus()
          Utility method to reset the status of the log.
 void setState(HTTPState a_state)
           
static void setupLogManager(HTTPState state)
          Will initialize and setup log manager instance for the current template processing session.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

state

private HTTPState state

CONTEXT_KEY

private static final String CONTEXT_KEY
See Also:
Constant Field Values

COOKIE_LOGID_KEY

private static final String COOKIE_LOGID_KEY
See Also:
Constant Field Values

VERBOSE

private static boolean VERBOSE

NO_OBJECT_FOR_ACTION_KEY

public static final String NO_OBJECT_FOR_ACTION_KEY
See Also:
Constant Field Values

STATUS_MSG_KEY

public static final String STATUS_MSG_KEY
See Also:
Constant Field Values

MSG_FIELDS_SEPARATOR

public static final String MSG_FIELDS_SEPARATOR
See Also:
Constant Field Values

SHOW_FIRST_MSG_KEY

public static final String SHOW_FIRST_MSG_KEY
See Also:
Constant Field Values

SHOW_MAX_MSGS_KEY

public static final String SHOW_MAX_MSGS_KEY
See Also:
Constant Field Values

SHOW_STATUS_KEY

public static final String SHOW_STATUS_KEY
See Also:
Constant Field Values
Constructor Detail

HTMLLogManager

protected HTMLLogManager(HTTPState state)

HTMLLogManager

public HTMLLogManager()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(HTMLLogManager thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getLogStatus

public static int getLogStatus()
Deprecated.  



Supported API: false

Returns:
int

resetLogStatus

public static void resetLogStatus()
Utility method to reset the status of the log. This should be typically called before execution of command from HTML UI pages. This will ensure that the log status info. (if any) displayed on the HTML UI pages is that of the command just executed. Typically resetLogStatus will be called in the template processor which display the status line.

Supported API: false


clearLog

public static void clearLog()
                     throws WTException
Utility method to clear all log messages for the current user session.

Supported API: false

Throws:
WTException

getLogMessages

public static List getLogMessages(int max_nof_messages,
                                  boolean most_recent)
                           throws WTException
Utility method to get list of messages for the current session. Parameters : max_nof_messages - maximum no. of messages to be returned by the method. If all messages are to be returned then -1 should be passed as parameter. most_recent - If messages are more than max_nof_messages parameter then this parameter is used to determine if most recent (parameter = true) or the first (parameter = false) messages equal to max_nof_messages should be returned.

Supported API: false

Parameters:
max_nof_messages -
most_recent -
Returns:
List
Throws:
WTException

getStatusMessage

public static String getStatusMessage(Properties queryData)
                               throws WTException
Utility method to return the most recent message which is to be displayed in the status line of the HTML UI pages.

Supported API: false

Parameters:
queryData -
Returns:
String
Throws:
WTException

addDebugMessage

public static void addDebugMessage(String messageCode,
                                   String message,
                                   Exception exception)


Supported API: false

Parameters:
messageCode -
message -
exception -

addDebugMessage

public static void addDebugMessage(String messageCode,
                                   String rb,
                                   String rbKey,
                                   Object[] params,
                                   Exception exception)


Supported API: false

Parameters:
messageCode -
rb -
rbKey -
params -
exception -

setupLogManager

public static void setupLogManager(HTTPState state)
Will initialize and setup log manager instance for the current template processing session. The new instance will be added to SessionContext with key as "cadx.HTMLLogManager". The new instance will be initialized with logid, if logid already exists in the cookie or else an unique id (based on current time) will be generated and added to the session cookie (using the wt.templateutil.processor.ServletSessionCookie class provided in new template processor). If an instance of log manager is already present for the session then this method will do nothing.

Supported API: false

Parameters:
state -

hasStatusMessage

public static boolean hasStatusMessage()
Deprecated.  



Supported API: false

Returns:
boolean

addStatusMessage

public static void addStatusMessage(String messageCode,
                                    String message,
                                    Exception exception)


Supported API: false

Parameters:
messageCode -
message -
exception -

addInfoMessage

public static void addInfoMessage(String messageCode,
                                  String message,
                                  Exception exception)


Supported API: false

Parameters:
messageCode -
message -
exception -

addWarningMessage

public static void addWarningMessage(String messageCode,
                                     String message,
                                     Exception exception)


Supported API: false

Parameters:
messageCode -
message -
exception -

addErrorMessage

public static void addErrorMessage(String messageCode,
                                   String message,
                                   Exception exception)


Supported API: false

Parameters:
messageCode -
message -
exception -

addStatusMessage

public static void addStatusMessage(String messageCode,
                                    String rb,
                                    String rbKey,
                                    Object[] params,
                                    Exception exception)


Supported API: false

Parameters:
messageCode -
rb -
rbKey -
params -
exception -

addInfoMessage

public static void addInfoMessage(String messageCode,
                                  String rb,
                                  String rbKey,
                                  Object[] params,
                                  Exception exception)


Supported API: false

Parameters:
messageCode -
rb -
rbKey -
params -
exception -

addWarningMessage

public static void addWarningMessage(String messageCode,
                                     String rb,
                                     String rbKey,
                                     Object[] params,
                                     Exception exception)


Supported API: false

Parameters:
messageCode -
rb -
rbKey -
params -
exception -

addErrorMessage

public static void addErrorMessage(String messageCode,
                                   String rb,
                                   String rbKey,
                                   Object[] params,
                                   Exception exception)


Supported API: false

Parameters:
messageCode -
rb -
rbKey -
params -
exception -

addSessionStatusMessage

private static void addSessionStatusMessage(String msg)

getSessionStatusMessage

private static String getSessionStatusMessage()

hasStatusMessage

public static boolean hasStatusMessage(Properties queryData)

getLocale

private static Locale getLocale()

getState

public HTTPState getState()

setState

public void setState(HTTPState a_state)