|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfedora.server.journal.helpers.JournalHelper
public class JournalHelper
A collection of utility methods for use in the Journal classes.
| Field Summary |
|---|
| Method Summary | |
|---|---|
static java.lang.String |
captureStackTrace(java.lang.Throwable e)
Capture the full stack trace of an Exception, and return it in a String. |
static java.io.File |
copyToTempFile(java.io.InputStream serialization)
Copy an input stream to a temporary file, so we can hand an input stream to the delegate and have another input stream for the journal. |
static java.lang.Object |
createInstanceAccordingToParameter(java.lang.String parameterName,
java.lang.Class<?>[] argClasses,
java.lang.Object[] args,
java.util.Map<java.lang.String,java.lang.String> parameters)
Look in the system parameters and create an instance of the named class. |
static java.lang.Object |
createInstanceFromClassname(java.lang.String className,
java.lang.Class<?>[] argClasses,
java.lang.Object[] args)
Create an instance of the named class. |
static java.io.File |
createTempFile()
Create a temporary file. |
static java.lang.String |
createTimestampedFilename(java.lang.String filenamePrefix,
java.util.Date date)
Create the name for a Journal file or a log file, based on the prefix and the current date. |
static java.lang.String |
formatDate(java.util.Date date)
Format a date for the journal or the log. |
static boolean |
isTempFile(java.io.File file)
Is this file one that we created as a temp file? |
static java.util.Date |
parseDate(java.lang.String date)
Parse a date from the journal. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.io.File copyToTempFile(java.io.InputStream serialization)
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public static java.io.File createTempFile()
throws java.io.IOException
java.io.IOExceptionpublic static boolean isTempFile(java.io.File file)
public static java.lang.String captureStackTrace(java.lang.Throwable e)
public static java.lang.Object createInstanceAccordingToParameter(java.lang.String parameterName,
java.lang.Class<?>[] argClasses,
java.lang.Object[] args,
java.util.Map<java.lang.String,java.lang.String> parameters)
throws JournalException
parameterName - The name of the system parameter that contains the classnameargClasses - What types of arguments are required by the constructor?args - Arguments to provide to the instance constructor.parameters - The system parameters
JournalException
public static java.lang.Object createInstanceFromClassname(java.lang.String className,
java.lang.Class<?>[] argClasses,
java.lang.Object[] args)
throws JournalException
className - The classname of the desired instanceargClasses - What types of arguments are required by the constructor?args - Arguments to provide to the instance constructor.
JournalExceptionpublic static java.lang.String formatDate(java.util.Date date)
public static java.util.Date parseDate(java.lang.String date)
throws JournalException
JournalException
public static java.lang.String createTimestampedFilename(java.lang.String filenamePrefix,
java.util.Date date)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||