|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.journal.helpers.JournalHelper
public class JournalHelper
A collection of utility methods for use in the Journal classes.
| Field Summary |
|---|
| Method Summary | |
|---|---|
static String |
captureStackTrace(Throwable e)
Capture the full stack trace of an Exception, and return it in a String. |
static File |
copyToTempFile(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 Object |
createInstanceAccordingToParameter(String parameterName,
Class<?>[] argClasses,
Object[] args,
Map<String,String> parameters)
Look in the system parameters and create an instance of the named class. |
static Object |
createInstanceFromClassname(String className,
Class<?>[] argClasses,
Object[] args)
Create an instance of the named class. |
static File |
createTempFile()
Create a temporary file. |
static String |
createTimestampedFilename(String filenamePrefix,
Date date)
Create the name for a Journal file or a log file, based on the prefix and the current date. |
static String |
formatDate(Date date)
Format a date for the journal or the logger. |
static boolean |
isTempFile(File file)
Is this file one that we created as a temp file? |
static Date |
parseDate(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 File copyToTempFile(InputStream serialization)
throws IOException,
FileNotFoundException
IOException
FileNotFoundException
public static File createTempFile()
throws IOException
IOExceptionpublic static boolean isTempFile(File file)
public static String captureStackTrace(Throwable e)
public static Object createInstanceAccordingToParameter(String parameterName,
Class<?>[] argClasses,
Object[] args,
Map<String,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 Object createInstanceFromClassname(String className,
Class<?>[] argClasses,
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 String formatDate(Date date)
public static Date parseDate(String date)
throws JournalException
JournalException
public static String createTimestampedFilename(String filenamePrefix,
Date date)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||