Package com.logicaldoc.form
Class FormManager
- java.lang.Object
-
- com.logicaldoc.form.FormManager
-
public class FormManager extends Object
Manager for Forms, a form is a document of FORM nature.- Since:
- 7.3
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description FormManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.logicaldoc.core.document.Document
create(String name, Long templateId, com.logicaldoc.core.document.DocumentHistory transaction)
Creates a new formvoid
fillForm(com.logicaldoc.core.document.Document document, String sid)
Fills the form of a document with the values and updates the file of the current versioncom.logicaldoc.core.conversion.FormatConverterManager
getConverter()
com.logicaldoc.core.document.dao.DocumentDAO
getDocumentDao()
com.logicaldoc.core.document.DocumentManager
getDocumentManager()
com.logicaldoc.core.folder.FolderDAO
getFolderDao()
com.logicaldoc.core.document.Document
getForm(long formId)
List<com.logicaldoc.core.document.Document>
getForms(long tenantId)
Gets all the forms in the given tenantcom.logicaldoc.core.folder.Folder
getFormsFolder(long tenantId)
Retrieves the folder that contains the forms.com.logicaldoc.core.store.Storer
getStorer()
com.logicaldoc.core.metadata.TemplateDAO
getTemplateDao()
com.logicaldoc.core.security.dao.TenantDAO
getTenantDao()
void
setConverter(com.logicaldoc.core.conversion.FormatConverterManager converter)
void
setDocumentDao(com.logicaldoc.core.document.dao.DocumentDAO documentDao)
void
setDocumentManager(com.logicaldoc.core.document.DocumentManager documentManager)
void
setFolderDao(com.logicaldoc.core.folder.FolderDAO folderDao)
void
setStorer(com.logicaldoc.core.store.Storer storer)
void
setTemplateDao(com.logicaldoc.core.metadata.TemplateDAO templateDao)
void
setTenantDao(com.logicaldoc.core.security.dao.TenantDAO tenantDao)
-
-
-
Method Detail
-
getFormsFolder
public com.logicaldoc.core.folder.Folder getFormsFolder(long tenantId) throws com.logicaldoc.core.PersistenceException
Retrieves the folder that contains the forms. If the folder doesn't exist it is created.- Parameters:
tenantId
- The tenant ID- Returns:
- the folder that contains the forms
- Throws:
com.logicaldoc.core.PersistenceException
- error in the database
-
getForms
public List<com.logicaldoc.core.document.Document> getForms(long tenantId) throws Exception
Gets all the forms in the given tenant- Parameters:
tenantId
- identifier of the tenant- Returns:
- the list of the forms
- Throws:
Exception
- error in the database
-
getForm
public com.logicaldoc.core.document.Document getForm(long formId) throws Exception
- Throws:
Exception
-
create
public com.logicaldoc.core.document.Document create(String name, Long templateId, com.logicaldoc.core.document.DocumentHistory transaction) throws Exception
Creates a new form- Parameters:
name
- name of the formtemplateId
- optional identifier of the template to be assigned to the formtransaction
- informations about the current session- Returns:
- The created form
- Throws:
Exception
- error in the database
-
getDocumentManager
public com.logicaldoc.core.document.DocumentManager getDocumentManager()
-
setDocumentManager
public void setDocumentManager(com.logicaldoc.core.document.DocumentManager documentManager)
-
getFolderDao
public com.logicaldoc.core.folder.FolderDAO getFolderDao()
-
setFolderDao
public void setFolderDao(com.logicaldoc.core.folder.FolderDAO folderDao)
-
getDocumentDao
public com.logicaldoc.core.document.dao.DocumentDAO getDocumentDao()
-
setDocumentDao
public void setDocumentDao(com.logicaldoc.core.document.dao.DocumentDAO documentDao)
-
setTemplateDao
public void setTemplateDao(com.logicaldoc.core.metadata.TemplateDAO templateDao)
-
fillForm
public void fillForm(com.logicaldoc.core.document.Document document, String sid) throws Exception
Fills the form of a document with the values and updates the file of the current version- Parameters:
document
- the form to fillsid
- identifier of the session- Throws:
Exception
- error in the database
-
getStorer
public com.logicaldoc.core.store.Storer getStorer()
-
setStorer
public void setStorer(com.logicaldoc.core.store.Storer storer)
-
getConverter
public com.logicaldoc.core.conversion.FormatConverterManager getConverter()
-
setConverter
public void setConverter(com.logicaldoc.core.conversion.FormatConverterManager converter)
-
getTenantDao
public com.logicaldoc.core.security.dao.TenantDAO getTenantDao()
-
setTenantDao
public void setTenantDao(com.logicaldoc.core.security.dao.TenantDAO tenantDao)
-
getTemplateDao
public com.logicaldoc.core.metadata.TemplateDAO getTemplateDao()
-
-