com.jurismarches.vradi.services.managers
Class BindingManager

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

public class BindingManager
extends Object

Class containing the methods to manage the binding of the xml streams fields with the form fields : - xml field bindings creation, update and retrieving - xml streams retrieving - form creation with the data from an xml stream

Version:
$Revision: 842 $ $Date: 2010-05-05 10:04:39 +0200 (mer., 05 mai 2010) $
Author:
schorlet

Constructor Summary
BindingManager(FormTypeManager formTypeManager, FormManager formManager)
           
BindingManager(org.sharengo.wikitty.WikittyProxy proxy, FormTypeManager formTypeManager, FormManager formManager)
           
 
Method Summary
protected  void autoLoadFormsFromXmlStreams(long delay, long period)
          Regularly retrieves the information from all the xml streams and create new forms
 void autoLoadFormsFromXmlStreams(String intervalUnit, int intervalValue, Integer hour, Integer minute)
          Regularly retrieves the information from all the xml streams and create new forms
 List<XmlStream> getAllXmlStreams()
           
 int[] getFormsFromXmlStream(XmlStream xmlStream, VradiUser vradiUser)
          Creates forms with the data of an xml stream
 XmlFieldBinding getXmlFieldBinding(String xmlFieldBindingId)
          Retrieves the xml field binding whose id is xmlFieldBindingId
 List<XmlFieldBinding> getXmlFieldBindings(XmlStream xmlStream)
          Retrieves the xml field bindings whose xml stream is xmlStream
 XmlStream getXmlStream(String xmlStreamId)
           
 List<XmlFieldBinding> updateXmlFieldBindings(List<XmlFieldBinding> bindings)
          Updates the xml field bindings given in parameters
 XmlStream updateXmlStream(XmlStream xmlStream, List<XmlFieldBinding> bindings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindingManager

public BindingManager(org.sharengo.wikitty.WikittyProxy proxy,
                      FormTypeManager formTypeManager,
                      FormManager formManager)

BindingManager

public BindingManager(FormTypeManager formTypeManager,
                      FormManager formManager)
Method Detail

getXmlFieldBindings

public List<XmlFieldBinding> getXmlFieldBindings(XmlStream xmlStream)
Retrieves the xml field bindings whose xml stream is xmlStream

Parameters:
xmlStream - the xml stream associated with the xml field bindings we want to retrieve
Returns:
a list containing the xml field bindings associated with the xml stream xmlStream

getXmlFieldBinding

public XmlFieldBinding getXmlFieldBinding(String xmlFieldBindingId)
Retrieves the xml field binding whose id is xmlFieldBindingId

Parameters:
xmlFieldBindingId - the id of the xml field binding we want to retrieve
Returns:
the xml field binding whose id is xmlFieldBindingId

updateXmlFieldBindings

public List<XmlFieldBinding> updateXmlFieldBindings(List<XmlFieldBinding> bindings)
                                             throws VradiException
Updates the xml field bindings given in parameters

Parameters:
bindings - the list of the xml field bindings to update
Returns:
the list of the xml field bindings up to date
Throws:
VradiException

updateXmlStream

public XmlStream updateXmlStream(XmlStream xmlStream,
                                 List<XmlFieldBinding> bindings)
                          throws VradiException
Throws:
VradiException

getAllXmlStreams

public List<XmlStream> getAllXmlStreams()

getXmlStream

public XmlStream getXmlStream(String xmlStreamId)
                       throws VradiException
Throws:
VradiException

getFormsFromXmlStream

public int[] getFormsFromXmlStream(XmlStream xmlStream,
                                   VradiUser vradiUser)
                            throws VradiException
Creates forms with the data of an xml stream

Parameters:
xmlStream -
vradiUser -
Returns:
An array containing : - the number of created forms - the number of already existing forms - the number of forms created with date parsing error - the number of forms created with number parsing error
Throws:
VradiException - for various possible errors

autoLoadFormsFromXmlStreams

public void autoLoadFormsFromXmlStreams(String intervalUnit,
                                        int intervalValue,
                                        Integer hour,
                                        Integer minute)
                                 throws VradiException
Regularly retrieves the information from all the xml streams and create new forms

Parameters:
intervalUnit - unit of te interval between 2 retrievings (minute, hour or day)
intervalValue - interval value between two retrievings
hour - hour of the retrieving if the unit is day
minute - of the retrieving if the unit is day or hour
Throws:
VradiException

autoLoadFormsFromXmlStreams

protected void autoLoadFormsFromXmlStreams(long delay,
                                           long period)
                                    throws VradiException
Regularly retrieves the information from all the xml streams and create new forms

Parameters:
delay - the delay before the first retrieving
period - interval between two retrievings
Throws:
VradiException


Copyright © 2009-2010 JurisMarches. All Rights Reserved.