|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jurismarches.vradi.services.managers.TemplateManager
public class TemplateManager
Template manager. Handle:
| Field Summary | |
|---|---|
protected org.nuiton.util.ApplicationConfig |
config
|
protected com.sun.star.uno.XComponentContext |
context
|
protected com.sun.star.lang.XComponent |
document
|
static int |
IMAGE_GIF
|
static int |
IMAGE_JPEG
|
static int |
IMAGE_PNG
|
static int |
IMAGE_UNKNOWN
|
protected com.sun.star.frame.XComponentLoader |
loader
|
protected static String |
USER_TEXT_FIELD_PREFIX
Prefix des champs texte utilisateurs dans les template ODT. |
| Constructor Summary | |
|---|---|
TemplateManager(org.nuiton.util.ApplicationConfig config,
File templateFile)
Init template with managed template file. |
|
| Method Summary | |
|---|---|
com.sun.star.lang.XComponent |
createDoc(File templateFile)
Créer un document. |
protected String |
createUNOFileURL(File file)
Creating a correct File URL that OpenOffice can handle. |
protected void |
fillFields(Map<String,Object> myValues)
Remplir les champs de mailing. |
void |
generateDoc(String targetFileName,
Map<String,Object> myValues,
String... imagesUrls)
|
List<String> |
getDocumentFields()
Gets the user fields or database fields of the ooo document. |
protected void |
initOpenOfficeContext()
Init openoffice bootstrap?. |
protected void |
insertImageInEndOfDocument(String imageUrl)
Inserts an image to the end of the document. |
void |
storeDocComponent(com.sun.star.lang.XComponent xDoc,
String storeUrl)
Sauver un doc donné a l'url donnée au format pdf. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.nuiton.util.ApplicationConfig config
protected com.sun.star.uno.XComponentContext context
protected com.sun.star.frame.XComponentLoader loader
protected com.sun.star.lang.XComponent document
public static final int IMAGE_UNKNOWN
public static final int IMAGE_JPEG
public static final int IMAGE_PNG
public static final int IMAGE_GIF
protected static final String USER_TEXT_FIELD_PREFIX
| Constructor Detail |
|---|
public TemplateManager(org.nuiton.util.ApplicationConfig config,
File templateFile)
throws VradiException
templateFile -
VradiException| Method Detail |
|---|
protected void initOpenOfficeContext()
throws VradiException
VradiException
public com.sun.star.lang.XComponent createDoc(File templateFile)
throws VradiException
templateFile - Le template du document
VradiException - if document can't be created
public void generateDoc(String targetFileName,
Map<String,Object> myValues,
String... imagesUrls)
throws VradiException
VradiException
public void storeDocComponent(com.sun.star.lang.XComponent xDoc,
String storeUrl)
throws VradiException
xDoc - Le document a sauvegarder (XComponent)storeUrl - Url complete du fichier (String)
VradiException - if pdf can't be exported
protected String createUNOFileURL(File file)
throws VradiException
filelocation -
VradiException - in cas of MalformedURLException
protected void fillFields(Map<String,Object> myValues)
throws VradiException
myValues - value to replace into template fields
VradiException - if values can't be replaced
protected void insertImageInEndOfDocument(String imageUrl)
throws VradiException
image - the file containing the image to insert
VradiExceptionpublic List<String> getDocumentFields()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||