View Javadoc

1   /*
2    * WebFlow Navigation Manager: webflow definiton, server side navigation history and automatic session cleaning.
3    * Distributed under LGPL license at web site http://wfnm.sourceforge.net .
4    */
5   package net.sf.wfnm;
6   
7   import java.io.Serializable;
8   
9   import java.util.HashSet;
10  import java.util.Set;
11  
12  
13  /***
14   * Defines a page as an url and a object set owned.
15   *
16   * @author <a href="mailto:malbari@users.sourceforge.net">Maurizio Albari</a>
17   * @version 1.0.6
18   */
19  public class Page implements ObjectSetOwner, Serializable {
20      /*** 
21       * The object set owned.
22       */
23      private Set ownedObjectSet;
24  
25      /*** 
26       * The url of this page.
27       */
28      private String url;
29  
30      /***
31       * Creates a new Page object.
32       *
33       * @param url url of this page
34       */
35      public Page(String url) {
36          super();
37          this.url = url;
38      }
39  
40      /***
41       * Gets the object set owned by this page.
42       *
43       * @return the object set owned by this page
44       */
45      public Set getOwnedObjectSet() {
46          if (ownedObjectSet == null) {
47              this.ownedObjectSet = new HashSet();
48          }
49  
50          return ownedObjectSet;
51      }
52  
53      /***
54       * Gets the url of this page.
55       *
56       * @return the url of this page
57       */
58      public String getUrl() {
59          return url;
60      }
61  }