Notes
Notes - notes.io |
* System Name:Exception Handling Component
*
* Class Name: ExceptionHandlingConstants
*
* Purpose: (1) Provides constants to be used across the Exception Component.
*
*/
package com.marutisuzuki.platform.exception.constants;
import java.util.HashMap;
import java.util.Map;
/**
* ExceptionHandlingConstants is the class that defines the constants to used by
* the classes across the Exception Component.
*
* @version 1.0
* @author Nagarro
* @see com.marutisuzuki.platform.exception
*/
public class ExceptionHandlingConstants {
public static final String EXCEPTION_SYSTEM_NAME = "Exception Handling Framework";
public static final String BASE_EXCEPTION_CLASS_NAME = "BaseException";
public static final String BASE_EXCEPTION_CONSTR_NAME = "BaseException(String,String,String)";
public static final String BASE_EXCEPTION_WRAPPER_CONSTR_NAME = "BaseException(String,String,String)";
public static final String BASE_EXCEPTION_OVERLOADED_CONSTR_NAME = "BaseException(String,String,String,String"
+ "HashMap,Throwable,String,HashMap,String,String)";
public static final String TECHNICAL_RUNTIME_EXCEPTION_CONSTR_NAME = "TechnicalRuntimeException(String,String,"
+ "String)";
public static final String TECHNICAL_RUNTIME_EXCEPTION_WRAPPER_CONSTR_NAME = "TechnicalRuntimeException(String,"
+ "String,String)";
public static final String TECHNICAL_RUNTIME_EXCEPTION_OVERLOADED_CONSTR_NAME = "TechnicalRuntimeException(String,"
+ "int,String,String,String,HashMap,Throwable,String,HashMap,String,String)";
// Error messages to be used in Exception Component
public static final String ORIGINAL_EXP_NOT_SET = "Original Exception is not set";
// Tags to be used in XML formatting
public static final String XML_START = "<EXCEPTION>";
public static final String XML_END = "</EXCEPTION>";
public static final String XML_TAG_START_OPEN = "<";
public static final String XML_TAG_START_OPEN_ENTITY = "<";
public static final String XML_TAG_END_OPEN = "</";
public static final String XML_TAG_CLOSE = ">";
public static final String XML_TAG_CLOSE_ENTITY = ">";
public static final String XML_TAG_NULL_CLOSE = "/>";
/*
* XML Keys to be used in converting exception object data in XML String
*/
public static final String CODE = "CODE";
public static final String SEVERITY = "SEVERITY";
public static final String DATETIME = "DATETIME";
public static final String SOURCE = "SOURCE";
public static final String USER = "USER";
public static final String SYSTEM = "SYSTEM";
public static final String CLASS = "CLASS";
public static final String METHOD = "METHOD";
public static final String TOP_LEVEL_CODE = "TOPLEVEL-CODE";
public static final String TOP_LEVEL_MESSAGE = "TOPLEVEL-MESSAGE";
public static final String TYPE = "TYPE";
public static final String OBJECT_STATE = "OBJECT-STATE";
public static final String ORIGINAL_EXCEPTION = "ORIGINAL_EXCEPTION";
public static final String MESSAGE = "MESSAGE";
public static final String OBJECT_STATE_VARIABLE = "OBJECT_STATE_VARIABLE";
public static final String REMARK = "REMARK";
public static final String STACK_TRACE = "STACK_TRACE";
// Pattern used for Date Time formatting
public static final String DATE_TIME_PATTERN_STRING = "yyyy/MM/dd HH:mm:ss";
// Identifiers for special object handling
public static final String OBJECT_XML_KEY = "OBJECT_XML_KEY";
public static final String OBJECT_IND_HASH = "H";
public static final String OBJECT_IND_LIST = "L";
public static final String NEW_LINE = System.getProperty("line.separator");
public static final String INDENT = " ";
public static final String REMARK_SEPARATOR = "--------------------------------------------------------------";
public static final String EXCEPTION_STRING_SEPARATOR = "-----------------------------------------------------"
+ "-------------------------------------------------------";
public static final String CDATA_HEAD = "<![CDATA[";
public static final String CDATA_TAIL = "]]>";
public static final String EXCEPTION_NAME_SEPARATOR = "::";
public static final String EXCEPTION_MSG_SEPARATOR = "-";
public static final String STACK_TRACE_SEPARATOR = "; ";
public static final String TRACE_LINE_START = "<TRACE-LINE>";
public static final String TRACE_LINE_END = "</TRACE-LINE>";
public static final String NULL_STRING = "'NULL'";
public static final String BLANK_STRING = " ";
public static final String CLASS_NAME = "Class Name : ";
public static final String METHOD_NAME = "Method Name : ";
public static final String CALLING_METHOD_NAME = "Calling Method Name : ";
public static final String METHOD_PARAMETERS = "Method Parameters : ";
public static final String CLASS_NAME_TOKEN = ",ClassName=";
public static final String METHOD_NAME_TOKEN = ",MethodName=";
public static final String CODE_TOKEN = "Code=";
public static final String CLASS_NAME_SETTER = "setClassName(String)";
public static final String METHOD_NAME_SETTER = "setMethodName(String)";
public static final String CODE_SETTER = "setCode(String)";
public static final String BUNDLE_PROPERTY = "exception.resource.bundle.name";
public static final String MESSAGE_LOCALE_COUNTRY = "exception.resource.bundle.country";
public static final String MESSAGE_LOCALE_LANG = "exception.resource.bundle.lang";
public static final String STACK_TRACE_LINES_PROPERTY = "exception.stack.trace.lines";
public static final String STACK_TRACE_INCLUDED_PROPERTY = "exception.stack.trace.include";
public static final Integer STACK_TRACE_DEFAULT_LINES = 10;
public static final Integer XML_FORMATTING_INDENT_SIZE = 4;
public static final String YES = "yes";
public static final String INDENT_NUMBER = "indent-number";
public static final String XML_FORMAT = "xml";
public static final String METHOD_NAME_FORMAT_XML_STRING = "formatXmlString";
public static final String MESSAGE_PROPERTY_NOT_FOUND_IN_BUNDLE = "No Message found as Property not present in"
+ " the resource bundle";
public static final String MESSAGE_BUNDLE_NOT_FOUND = "No Message found as resource bundle not present in"
+ " the class path";
public static final String[] XML_PRINT_ORDER = { TOP_LEVEL_CODE, TOP_LEVEL_MESSAGE, TYPE, SYSTEM, SEVERITY, CODE,
MESSAGE, CLASS, METHOD, USER, OBJECT_STATE, STACK_TRACE, DATETIME, REMARK, ORIGINAL_EXCEPTION };
// Attributes which are stored as Collections for eg. OBJECT_STATE
public static final Map<String, String> EXCEPTION_COLLECTION_ATTRIBS = new HashMap<String, String>() {
{
put(OBJECT_STATE, OBJECT_IND_HASH);
}
};
public static final String JAXP_TRANSFORMER_IMPL_PROPERTY = "exception.jaxp.transformer.class";
public static final String JAXP_TRANSFORMER_IMPL_CLASS =
"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl";
/**
* This constructor, with no arguments, is declared as private and hence is
* not to be used
*
* @Method Name: ExceptionHandlingConstants()
* @version 1.0
* @author Nagarro
* @Version Author Date Change Description
*/
private ExceptionHandlingConstants() {
// No argument constructor
}
}
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team