KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > clipbuilder > html > bean > ClippersManagerBean


1 package org.jahia.clipbuilder.html.bean;
2
3 import java.util.*;
4
5 /**
6  * Bean that contain list of loaded clipper/template
7  *
8  *@author Tlili Khaled
9  */

10 public class ClippersManagerBean {
11     private ArrayList clippersBeanList = new ArrayList();
12     private Hashtable clippersBeanHash = new Hashtable();
13
14
15     /**
16      * Constructor for the ClippersManagerBean object
17      */

18     public ClippersManagerBean() {
19     }
20
21
22     /**
23      * Sets the ClippersBeanList attribute of the ClippersManagerBean object
24      *
25      *@param clippersBeanList The new ClippersBeanList value
26      */

27     public void setClippersBeanList(ArrayList clippersBeanList) {
28         this.clippersBeanList = clippersBeanList;
29     }
30
31
32     /**
33      * Sets the ClippersBeanHash attribute of the ClippersManagerBean object
34      *
35      *@param clippersBeanHash The new ClippersBeanHash value
36      */

37     public void setClippersBeanHash(Hashtable clippersBeanHash) {
38         this.clippersBeanHash = clippersBeanHash;
39     }
40
41
42     /**
43      * Gets the Empty attribute of the ClippersManagerBean object
44      *
45      *@param v The new Empty value
46      */

47     public void setEmpty(int v) {
48
49     }
50
51
52     /**
53      * Sets the Empty attribute of the ClippersManagerBean object
54      *
55      *@return The Empty value
56      */

57     public int getEmpty() {
58         if (getClippersBeanList().isEmpty()) {
59             return 0;
60         }
61         else {
62             return 1;
63         }
64     }
65
66
67     /**
68      * Gets the ClipperBean attribute of the ClippersManagerBean object
69      *
70      *@param key Description of Parameter
71      *@return The ClipperBean value
72      */

73     public ClipperBean getClipperBean(String JavaDoc key) {
74         return (ClipperBean) getClippersBeanHash().get(key);
75     }
76
77
78     /**
79      * Gets the ClippersBeanHash attribute of the ClippersManagerBean object
80      *
81      *@return The ClippersBeanHash value
82      */

83     public Hashtable getClippersBeanHash() {
84         return clippersBeanHash;
85     }
86
87
88     /**
89      * Gets the ClippersBeanList attribute of the ClippersManagerBean object
90      *
91      *@return The ClippersBeanList value
92      */

93     public ArrayList getClippersBeanList() {
94         return clippersBeanList;
95     }
96
97
98     /**
99      * Adds a feature to the Clipper attribute of the ManageClippersForm object
100      *
101      *@param cBean The feature to be added to the Clipper attribute
102      */

103     public void addClipper(ClipperBean cBean) {
104         getClippersBeanList().add(cBean);
105         getClippersBeanHash().put(cBean.getName(), cBean);
106     }
107
108 }
109
Popular Tags