View Javadoc

1   /**
2    * 2014, Digitalis Informatica. All rights reserved. Distribuicao e Gestao de Informatica, Lda. Estrada de Paco de Arcos
3    * num.9 - Piso -1 2780-666 Paco de Arcos Telefone: (351) 21 4408990 Fax: (351) 21 4408999 http://www.digitalis.pt
4    */
5   
6   package pt.digitalis.dif.dem.managers;
7   
8   import pt.digitalis.dif.dem.interfaces.ICustomFormDefinition;
9   import pt.digitalis.dif.dem.interfaces.IStageInstance;
10  
11  /**
12   * This feature manages form configurations by the user, either a general configurations or a specific instance
13   * configuration (associated with a business key provided by the developer. i.e. a custom form for each account)
14   * 
15   * @author Pedro Viegas <a href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a><br/>
16   * @created 29/01/2014
17   */
18  public interface ICustomFormManager {
19  
20      /**
21       * Reads from the underlying repository the current form customized configuration
22       * 
23       * @param stageInstance
24       *            the current stage instance from where the form submited will be infered
25       * @param businessConfigurationID
26       *            the business form instance ID
27       * @return the current configuration for the given form
28       */
29      public ICustomFormDefinition getConfiguration(IStageInstance stageInstance, String businessConfigurationID);
30  
31      /**
32       * Reads from the underlying repository the current form customized configuration
33       * 
34       * @param stageID
35       *            the form stage ID
36       * @param formName
37       *            the form name
38       * @param businessConfigurationID
39       *            the business form instance ID
40       * @return the current configuration for the given form
41       */
42      public ICustomFormDefinition getConfiguration(String stageID, String formName, String businessConfigurationID);
43  
44      /**
45       * Updates the given form configuration in the underlying repository
46       * 
47       * @param definition
48       *            the form definition to save
49       */
50      public void updateConfiguration(ICustomFormDefinition definition);
51  }