ak.err
Class AppErrorItem

java.lang.Object
  |
  +--ak.err.AppErrorItem

public class AppErrorItem
extends java.lang.Object
implements java.io.Serializable

Class AppErrorItem contains the description of an error. This class is member of any particular application error. This class can be converted to particular Error-Structure (e.g. CORBA-Exception struct)

Version:
V1.1 Copyright(c)2000 Alexej Kupin
See Also:
Serialized Form

Field Summary
protected  java.lang.String application
           
protected  java.lang.String category
           
protected  java.lang.String component
           
protected  java.lang.String doAction
           
protected  java.lang.String info
           
protected  java.lang.String message
           
protected  java.lang.String messageShort
           
protected  java.lang.String severity
           
protected  java.lang.String time
           
 
Constructor Summary
AppErrorItem()
          default constructor
AppErrorItem(java.lang.String sText)
          constructs object AppErrorItem from String see more in StringToObj
AppErrorItem(java.lang.String sApp, java.lang.String sSeverity, java.lang.String sCategory, java.lang.String sMsg, java.lang.String sMsgShort, java.lang.String sDoAction, java.lang.String sComponent, java.lang.String sInfo, java.lang.String sTime)
          constructs AppErrorItem with given attributs
 
Method Summary
 void addComponent(java.lang.String sComponent)
          Adds a component to the component-string (usefull for the nested exceptions) component is usually: "class.Name"
 void addInfo(java.lang.String sInfo)
          Adds a String to the info-string (usefull for the nested exceptions)
 void addParam(java.lang.String sParam)
          Adds the a String to the message (usefull for the nested exceptions)
private  java.lang.String cutParam(java.lang.String sName, java.lang.String sInput)
          this is a private method used by StringToObj-conversion
 java.lang.String getApp()
          Access(get) to the member: application
 java.lang.String getCategory()
          Access(get) to the member: category
 java.lang.String getComponent()
          Access(get) to the member: component
 java.lang.String getInfo()
          Access(get) to the member: info
 java.lang.String getMsg()
          Access(get) to the member: message
 java.lang.String getMsgShort()
          Access(get) to the member: messageShort
private  java.lang.String getParam(java.lang.String sInput, java.lang.String sName)
          this is a private method used by StringToObj-conversion
 java.lang.String getRecomendation()
          Access(get) to the member: doAction
 java.lang.String getSeverity()
          Access(get) to the member: severity
 java.lang.String getTime()
          Access(get) to the member: time
 java.lang.String ObjToString()
          Converts AppErrorItem to a String (e.g. usefull for CORBA/RMI communication)
 void SetEnv(java.lang.String sApp, java.lang.String sSeverity, java.lang.String sCategory)
          Sets error environment: - Application Name (-> config file) - Error severity(e.g.
 void SetMsg(java.lang.String sMsg, java.lang.String sMsgShort, java.lang.String sDoAction)
          Sets error message: - Full message(e.g. for log-file) - Short message(e.g. for user) - Recomended action
 boolean StringToObj(java.lang.String sMsg)
          Exstracts AppErrorItem Object from a String (e.g. usefull for CORBA/RMI communication) the String contains not an object (see ObjToString) the String will be attached to the parameter:info
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

application

protected java.lang.String application

severity

protected java.lang.String severity

category

protected java.lang.String category

message

protected java.lang.String message

messageShort

protected java.lang.String messageShort

doAction

protected java.lang.String doAction

component

protected java.lang.String component

info

protected java.lang.String info

time

protected java.lang.String time
Constructor Detail

AppErrorItem

public AppErrorItem()
default constructor

AppErrorItem

public AppErrorItem(java.lang.String sText)
constructs object AppErrorItem from String see more in StringToObj

AppErrorItem

public AppErrorItem(java.lang.String sApp,
                    java.lang.String sSeverity,
                    java.lang.String sCategory,
                    java.lang.String sMsg,
                    java.lang.String sMsgShort,
                    java.lang.String sDoAction,
                    java.lang.String sComponent,
                    java.lang.String sInfo,
                    java.lang.String sTime)
constructs AppErrorItem with given attributs
Method Detail

ObjToString

public java.lang.String ObjToString()
Converts AppErrorItem to a String (e.g. usefull for CORBA/RMI communication)

StringToObj

public boolean StringToObj(java.lang.String sMsg)
Exstracts AppErrorItem Object from a String (e.g. usefull for CORBA/RMI communication) the String contains not an object (see ObjToString) the String will be attached to the parameter:info

getParam

private java.lang.String getParam(java.lang.String sInput,
                                  java.lang.String sName)
this is a private method used by StringToObj-conversion

cutParam

private java.lang.String cutParam(java.lang.String sName,
                                  java.lang.String sInput)
this is a private method used by StringToObj-conversion

SetEnv

public void SetEnv(java.lang.String sApp,
                   java.lang.String sSeverity,
                   java.lang.String sCategory)
Sets error environment: - Application Name (-> config file) - Error severity(e.g. FATAL/MINOR) - Category(e.g. DB/CONN/SYSTEM)

SetMsg

public void SetMsg(java.lang.String sMsg,
                   java.lang.String sMsgShort,
                   java.lang.String sDoAction)
Sets error message: - Full message(e.g. for log-file) - Short message(e.g. for user) - Recomended action

addParam

public void addParam(java.lang.String sParam)
Adds the a String to the message (usefull for the nested exceptions)

addComponent

public void addComponent(java.lang.String sComponent)
Adds a component to the component-string (usefull for the nested exceptions) component is usually: "class.Name"

addInfo

public void addInfo(java.lang.String sInfo)
Adds a String to the info-string (usefull for the nested exceptions)

getApp

public java.lang.String getApp()
Access(get) to the member: application

getSeverity

public java.lang.String getSeverity()
Access(get) to the member: severity

getCategory

public java.lang.String getCategory()
Access(get) to the member: category

getMsg

public java.lang.String getMsg()
Access(get) to the member: message

getMsgShort

public java.lang.String getMsgShort()
Access(get) to the member: messageShort

getRecomendation

public java.lang.String getRecomendation()
Access(get) to the member: doAction

getComponent

public java.lang.String getComponent()
Access(get) to the member: component

getInfo

public java.lang.String getInfo()
Access(get) to the member: info

getTime

public java.lang.String getTime()
Access(get) to the member: time