diff options
author | Ade Lee <alee@redhat.com> | 2012-01-11 12:57:53 -0500 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2012-01-11 13:49:04 -0500 |
commit | 10cfe7756e967ac91c66d33b392aeab9cf3780fb (patch) | |
tree | d5ac9b58442265d2ce5ef60e31f041ddacba1b4f /pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java | |
parent | edcb24f65cc3700e75d0a1d14dc2483f210b0ee4 (diff) | |
download | pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.gz pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.xz pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.zip |
Formatting (no line wrap in comments or code)
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java')
-rw-r--r-- | pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java | 57 |
1 files changed, 35 insertions, 22 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java b/pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java index 83026323c..9f625cdfd 100644 --- a/pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java +++ b/pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java @@ -17,19 +17,17 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.logging; - import java.text.MessageFormat; import java.util.Locale; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.MessageFormatter; - /** * The log event object that carries a log message. * This class represents System events which are CMS events - * which need to be logged to a log file. - * + * which need to be logged to a log file. + * * @version $Revision$, $Date$ * @see java.text.MessageFormat * @see com.netscape.certsrv.logging.LogResources @@ -56,12 +54,12 @@ public class SystemEvent implements IBundleLogEvent { */ private String mBundleName = LogResources.class.getName(); - private static final String INVALID_LOG_LEVEL="log level: {0} is invalid, should be 0-6"; + private static final String INVALID_LOG_LEVEL = "log level: {0} is invalid, should be 0-6"; /** * Constructs a SystemEvent message event. * <P> - * + * * @param msgFormat The message string. */ public SystemEvent(String msgFormat) { @@ -71,11 +69,12 @@ public class SystemEvent implements IBundleLogEvent { /** * Constructs a SystemEvent message with a parameter. For example, + * * <PRE> - * new SystemEvent("failed to load {0}", fileName); + * new SystemEvent("failed to load {0}", fileName); * </PRE> * <P> - * + * * @param msgFormat Details in message string format. * @param param Message string parameter. */ @@ -89,6 +88,7 @@ public class SystemEvent implements IBundleLogEvent { * Constructs a SystemEvent message from an exception. It can be used to carry * a system exception that may contain information about * the context. For example, + * * <PRE> * try { * ... @@ -97,7 +97,7 @@ public class SystemEvent implements IBundleLogEvent { * } * </PRE> * <P> - * + * * @param msgFormat Exception details in message string format. * @param exception System exception. */ @@ -110,6 +110,7 @@ public class SystemEvent implements IBundleLogEvent { /** * Constructs a SystemEvent message from a base exception. This will use the msgFormat * from the exception itself. + * * <PRE> * try { * ... @@ -118,7 +119,7 @@ public class SystemEvent implements IBundleLogEvent { * } * </PRE> * <P> - * + * * @param e CMS exception. */ public SystemEvent(Exception e) { @@ -135,7 +136,7 @@ public class SystemEvent implements IBundleLogEvent { * Constructs a SystemEvent message event with a list of parameters * that will be substituted into the message format. * <P> - * + * * @param msgFormat Message string format. * @param params List of message format parameters. */ @@ -147,7 +148,7 @@ public class SystemEvent implements IBundleLogEvent { /** * Returns the current message format string. * <P> - * + * * @return Details message. */ public String getMessage() { @@ -158,7 +159,7 @@ public class SystemEvent implements IBundleLogEvent { * Returns a list of parameters. These parameters can be * used to assist in formatting the message. * <P> - * + * * @return List of message format parameters. */ public Object[] getParameters() { @@ -169,7 +170,7 @@ public class SystemEvent implements IBundleLogEvent { * Returns localized message string. This method should * only be called if a localized string is necessary. * <P> - * + * * @return Details message. */ public String toContent() { @@ -179,7 +180,7 @@ public class SystemEvent implements IBundleLogEvent { /** * Returns the string based on the given locale. * <P> - * + * * @param locale Locale. * @return Details message. */ @@ -190,8 +191,9 @@ public class SystemEvent implements IBundleLogEvent { } /** - * Sets the resource bundle name for this class instance. This should + * Sets the resource bundle name for this class instance. This should * be overridden by subclasses who have their own resource bundles. + * * @param bundle String with the name of resource bundle. */ public void setBundleName(String bundle) { @@ -200,6 +202,7 @@ public class SystemEvent implements IBundleLogEvent { /** * Retrieves bundle name. + * * @return String with name of resource bundle. */ protected String getBundleName() { @@ -210,6 +213,7 @@ public class SystemEvent implements IBundleLogEvent { * Retrieves log source. * This is an id of the subsystem responsible * for creating the log event. + * * @return Integer source id. */ public int getSource() { @@ -219,6 +223,7 @@ public class SystemEvent implements IBundleLogEvent { /** * Sets log source. * Sets the id of the subsystem issuing the event. + * * @param source Integer source id. */ public void setSource(int source) { @@ -229,6 +234,7 @@ public class SystemEvent implements IBundleLogEvent { * Retrieves log level. * The log level of an event represents its relative importance * or severity within CMS. + * * @return Integer log level value. */ public int getLevel() { @@ -237,6 +243,7 @@ public class SystemEvent implements IBundleLogEvent { /** * Retrieves NT specific log event type. + * * @return Integer NTEventType value. */ public int getNTEventType() { @@ -246,7 +253,8 @@ public class SystemEvent implements IBundleLogEvent { /** * Sets log level, NT log event type. * For certain log levels the NT log event type gets - * set as well. + * set as well. + * * @param level Integer log level value. */ public void setLevel(int level) { @@ -277,8 +285,9 @@ public class SystemEvent implements IBundleLogEvent { /** * Retrieves log multiline attribute. + * * @return Boolean whether or not this event is multiline. - * A multiline message simply consists of more than one line. + * A multiline message simply consists of more than one line. */ public boolean getMultiline() { return mMultiline; @@ -287,6 +296,7 @@ public class SystemEvent implements IBundleLogEvent { /** * Sets log multiline attribute. A multiline message consists of * more than one line. + * * @param multiline Boolean multiline value. */ public void setMultiline(boolean multiline) { @@ -295,6 +305,7 @@ public class SystemEvent implements IBundleLogEvent { /** * Retrieves event time stamp. + * * @return Long integer of the time the event was created. */ public long getTimeStamp() { @@ -304,16 +315,17 @@ public class SystemEvent implements IBundleLogEvent { /** * Retrieves log event type. Each type of event * has an associated String type value. + * * @return String containing the type of event. */ public String getEventType() { return mEventType; } - /** * Sets log event type. Each type of event * has an associated String type value. + * * @param eventType String containing the type of event. */ public void setEventType(String eventType) { @@ -321,9 +333,10 @@ public class SystemEvent implements IBundleLogEvent { } /** - * Return string representation of log message. - * @return String containing log message. - */ + * Return string representation of log message. + * + * @return String containing log message. + */ public String toString() { if (getBundleName() == null) { MessageFormat detailMessage = new MessageFormat(mMessage); |