com.jurismarches.vradi.services.managers
Class FormTypeManager

java.lang.Object
  extended by com.jurismarches.vradi.services.managers.FormTypeManager

public class FormTypeManager
extends Object

Class containing the metods to manage the form types : - creation, update, retrieving - cache filling

Version:
$Revision: 684 $ $Date: 2010-04-07 22:59:41 +0200 (mer., 07 avril 2010) $
Author:
schorlet

Constructor Summary
FormTypeManager()
           
FormTypeManager(org.sharengo.wikitty.WikittyProxy proxy)
           
 
Method Summary
 File addTemplate(org.sharengo.wikitty.WikittyExtension extension, File template)
          Associates a new template file to the specified extension
 List<org.sharengo.wikitty.WikittyExtension> getAllFormTypes()
          Retrieves all the form types
 Map<String,String> getAssociatedFields(String extensionName, String templateName)
           
 org.sharengo.wikitty.WikittyExtension getFormType(String name)
          Retrieves the form type whose name is the parameter 'name'
 Map<String,org.sharengo.wikitty.FieldType> getFormTypeFields(String name)
          Retrieves the fields of the form type whose name is the parameter 'name'
 File getTemplate(String extensionName, String templateName)
           
 File[] getTemplates(org.sharengo.wikitty.WikittyExtension extension)
          Lists the template files associated with the specified extension
 void setAssociatedFields(String extensionName, String templateName, Map<String,String> fieldMap)
           
 org.sharengo.wikitty.WikittyExtension updateFormType(String name, Map<String,org.sharengo.wikitty.FieldType> fields, String requires, Map<String,String> tagValues)
          Updates the form type whose name is 'name'
 org.sharengo.wikitty.WikittyExtension updateFormType(org.sharengo.wikitty.WikittyExtension extension)
          Update the form type given in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormTypeManager

public FormTypeManager(org.sharengo.wikitty.WikittyProxy proxy)

FormTypeManager

public FormTypeManager()
Method Detail

getAllFormTypes

public List<org.sharengo.wikitty.WikittyExtension> getAllFormTypes()
Retrieves all the form types

Returns:
a list containing all the form types

getFormType

public org.sharengo.wikitty.WikittyExtension getFormType(String name)
                                                  throws VradiException
Retrieves the form type whose name is the parameter 'name'

Parameters:
name - the name of the form type we want to retrieve
Returns:
the form type whose name is the paramater
Throws:
VradiException

getFormTypeFields

public Map<String,org.sharengo.wikitty.FieldType> getFormTypeFields(String name)
                                                             throws VradiException
Retrieves the fields of the form type whose name is the parameter 'name'

Parameters:
name - the name of the form type we want to retrieve the fields
Returns:
a map containing the field names and their type
Throws:
VradiException

updateFormType

public org.sharengo.wikitty.WikittyExtension updateFormType(String name,
                                                            Map<String,org.sharengo.wikitty.FieldType> fields,
                                                            String requires,
                                                            Map<String,String> tagValues)
                                                     throws VradiException
Updates the form type whose name is 'name'

Parameters:
name - the name of the form type to update
fields - the new fields of the form type
requires - the new requires of the form type
tagValues - the new tag values of the form type
Returns:
the form type up to date
Throws:
VradiException

updateFormType

public org.sharengo.wikitty.WikittyExtension updateFormType(org.sharengo.wikitty.WikittyExtension extension)
                                                     throws VradiException
Update the form type given in parameter

Parameters:
extension - the form type to update
Returns:
the form type up to date
Throws:
VradiException

addTemplate

public File addTemplate(org.sharengo.wikitty.WikittyExtension extension,
                        File template)
                 throws VradiException
Associates a new template file to the specified extension

Parameters:
extension -
template -
Returns:
the file copied in the vradi template folder
Throws:
IOException
VradiException

getTemplate

public File getTemplate(String extensionName,
                        String templateName)
Parameters:
extensionName -
templateName -
Returns:

getTemplates

public File[] getTemplates(org.sharengo.wikitty.WikittyExtension extension)
Lists the template files associated with the specified extension

Parameters:
extension -
Returns:

getAssociatedFields

public Map<String,String> getAssociatedFields(String extensionName,
                                              String templateName)
                                       throws VradiException
Throws:
VradiException

setAssociatedFields

public void setAssociatedFields(String extensionName,
                                String templateName,
                                Map<String,String> fieldMap)
                         throws VradiException
Throws:
VradiException


Copyright © 2009-2010 JurisMarches. All Rights Reserved.