View Javadoc

1   package pl.caltha.forms;
2   
3   /***
4    * Defines container for user inputed form data and form's UI state.
5    *
6    * @author <a href="mailto:zwierzem@ngo.pl">Damian Gajda</a>
7    * @version $Id: Instance.java,v 1.2 2005/02/08 20:33:22 rafal Exp $
8    */
9   public interface Instance
10  {
11      /*** Getter for session wide instance id.
12       * @return Value of instance id. */
13      public String getId();
14  
15      /*** Returns <code>true</code> if instance has been changed by the user. */
16      public boolean isDirty();
17  
18      /*** Sets a dirty flag on instance object - for use when changing instance's
19       * internal data - like dom4j document. */
20      public void setDirty(boolean dirtyFlag);
21  
22      /*** Returns <code>true</code> if instance is valid and the user requested
23       * a submit operation on this instance. */
24      public boolean isSubmitted();
25  
26      /*** Return <code>true</code> if instance has valid values and all
27       * of required values are inputed. */
28      public boolean isValid();
29  
30      /*** Return <code>true</code> if instance has all required values. */
31      public boolean hasRequired();
32      
33      /*** Returns XML schemata URI for this Instance object. */
34      public String getSchemaURI();
35      
36      /*** Returns DOM4J Document object with this Instance's user inputed data. */
37      public org.dom4j.Document getDocument();
38  }