com.jurismarches.vradi.services.managers
Class FormTypeManager

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

public class FormTypeManager
extends java.lang.Object

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

Version:
$Revision: 1086 $ $Date: 2010-06-14 18:23:41 +0200 (lun., 14 juin 2010) $
Author:
schorlet

Constructor Summary
FormTypeManager()
           
FormTypeManager(org.nuiton.wikitty.WikittyProxy proxy)
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> getAssociatedFields(java.lang.String extensionName, java.lang.String templateName)
          Get association between template fields and extension fields.
 org.nuiton.wikitty.WikittyExtension getFormType(java.lang.String name)
          Retrieves the form type whose name is the parameter 'name'
 java.util.Map<java.lang.String,org.nuiton.wikitty.FieldType> getFormTypeFields(java.lang.String name)
          Retrieves the fields of the form type whose name is the parameter 'name'
 java.io.File getTemplate(java.lang.String extensionName, java.lang.String templateName)
           
 java.util.Collection<java.lang.String> getTemplateFilenames(org.nuiton.wikitty.WikittyExtension extension)
          Get the template file names associated with the specified extension.
 java.io.File[] getTemplates(org.nuiton.wikitty.WikittyExtension extension)
          Deprecated. 
 void setAssociatedFields(java.lang.String extensionName, java.lang.String templateName, java.util.Map<java.lang.String,java.lang.String> fieldMap)
          Save association between template fields and user selected fields into external xml field next to template.
 org.nuiton.wikitty.WikittyExtension updateFormType(java.lang.String name, java.util.Map<java.lang.String,org.nuiton.wikitty.FieldType> fields, java.lang.String requires, java.util.Map<java.lang.String,java.lang.String> tagValues)
          Updates the form type whose name is 'name'
 org.nuiton.wikitty.WikittyExtension updateFormType(org.nuiton.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.nuiton.wikitty.WikittyProxy proxy)

FormTypeManager

public FormTypeManager()
Method Detail

getFormType

public org.nuiton.wikitty.WikittyExtension getFormType(java.lang.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 parameter
Throws:
VradiException

getFormTypeFields

public java.util.Map<java.lang.String,org.nuiton.wikitty.FieldType> getFormTypeFields(java.lang.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.nuiton.wikitty.WikittyExtension updateFormType(java.lang.String name,
                                                          java.util.Map<java.lang.String,org.nuiton.wikitty.FieldType> fields,
                                                          java.lang.String requires,
                                                          java.util.Map<java.lang.String,java.lang.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.nuiton.wikitty.WikittyExtension updateFormType(org.nuiton.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

getTemplate

public java.io.File getTemplate(java.lang.String extensionName,
                                java.lang.String templateName)
Parameters:
extensionName -
templateName -
Returns:

getTemplates

@Deprecated
public java.io.File[] getTemplates(org.nuiton.wikitty.WikittyExtension extension)
Deprecated. 

Lists the template files associated with the specified extension

Parameters:
extension -
Returns:

getTemplateFilenames

public java.util.Collection<java.lang.String> getTemplateFilenames(org.nuiton.wikitty.WikittyExtension extension)
Get the template file names associated with the specified extension.

Parameters:
extension - extension
Returns:
extension's template file names

getAssociatedFields

public java.util.Map<java.lang.String,java.lang.String> getAssociatedFields(java.lang.String extensionName,
                                                                            java.lang.String templateName)
                                                                     throws VradiException
Get association between template fields and extension fields.

Parameters:
extensionName -
templateName -
Returns:
association map or null is there is no association yet
Throws:
VradiException

setAssociatedFields

public void setAssociatedFields(java.lang.String extensionName,
                                java.lang.String templateName,
                                java.util.Map<java.lang.String,java.lang.String> fieldMap)
                         throws VradiException
Save association between template fields and user selected fields into external xml field next to template. Xml file is created a first call.

Parameters:
extensionName -
templateName -
fieldMap -
Throws:
VradiException


Copyright © 2009-2010 JurisMarches. All Rights Reserved.