|
Docmosis API 4.5.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.docmosis.template.store.TemplateStoreFactory
This factory provides TemplateStore instances. Currently only one store implementation is provided (a FileTemplateStore) and only one instance is created and shared by all users.
Nested Class Summary | |
static class |
TemplateStoreFactory.PresetTemplateStore
This class facades a real TemplateStore providing values for typical settings that one might use across lots of store requests. |
Field Summary | |
static String |
PROPERTY_FIELD_ALLOW_PADDED
|
static String |
PROPERTY_PLAINTEXT_FIELD_PREFIX
|
static String |
PROPERTY_PLAINTEXT_FIELD_SUFFIX
|
static String |
PROPERTY_STORE_LOCATION
|
Constructor Summary | |
TemplateStoreFactory()
|
Method Summary | |
static TemplateStore |
getStore()
Get the current Template Store with default settings. |
static TemplateStore |
getStore(boolean templateErrorsFatal)
Get an instance of a TemplateStore which has default settings for the plain text field delimiters, specifying whether errors in the template are fatal. |
static TemplateStore |
getStore(boolean templateErrorsFatal,
String plainTextFieldPrefix,
String plainTextFieldSuffix,
boolean allowPaddedFields)
Get an instance of a TemplateStore which has default settings for the plain text field delimiters and whether errors in the template are fatal. |
static void |
initialise()
Initialise the Template Store factory. |
static void |
release()
Release the template store from memory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String PROPERTY_PLAINTEXT_FIELD_PREFIX
public static final String PROPERTY_PLAINTEXT_FIELD_SUFFIX
public static final String PROPERTY_FIELD_ALLOW_PADDED
public static final String PROPERTY_STORE_LOCATION
Constructor Detail |
public TemplateStoreFactory()
Method Detail |
public static TemplateStore getStore()
IllegalStateException
- if initialise() hasn't been calledpublic static TemplateStore getStore(boolean templateErrorsFatal, String plainTextFieldPrefix, String plainTextFieldSuffix, boolean allowPaddedFields)
templateErrorsFatal
- if true template errors will be treated as fatal and an exception
will be thrown (when invalid templates are uploaded). If false, wherever possible Docmosis
will write templates errors into the rendered document when rendering to assist with development
and debugging.plainTextFieldPrefix
- if not null, the template may contain plain text markup and this
parameter is the opening delimiterplainTextFieldSuffix
- this is the closing delimiter to plainTextFieldPrefix.allowPaddedFields
- if true fields that are padded with spaces (eg << name >>) are
recognised as fields. Otherwise the spaces mean it is not recognised as a field.
IllegalStateException
- if initialise() hasn't been calledpublic static TemplateStore getStore(boolean templateErrorsFatal)
templateErrorsFatal
- if true template errors will be treated as fatal and an exception
will be thrown (when invalid templates are uploaded). If false, wherever possible Docmosis
will write templates errors into the rendered document when rendering to assist with development
and debugging.
IllegalStateException
- if initialise() hasn't been calledpublic static void initialise() throws TemplateStoreException
TemplateStoreException
- if a start problem occurspublic static void release()
|
Docmosis API 4.5.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |