KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > contineo > admin > ExtMenu


1 /*
2  * ExtMenu.java
3  *
4  * Created on 9. Februar 2004, 17:46
5  */

6
7 package org.contineo.admin;
8
9 /**
10  *
11  * @author Michael Scholz
12  */

13 public class ExtMenu extends Menu {
14     
15     /**
16      * Defines the size of the requested menu; this is either
17      * the number of children or the size of the file the
18      * menu is pointing to.
19      * @uml.property name="size"
20      */

21     private int size;
22     
23     /**
24      * Defines if the user requesting the menu has write access
25      */

26     private boolean writable;
27     
28     /**
29      * Defines if the document is checked out
30      */

31     private int docStatus;
32     
33     /**
34      * Defines the user name of the one who has checked out the document
35      */

36     private String JavaDoc checkoutUser;
37     
38     /** Creates a new instance of ExtMenu */
39     public ExtMenu(Menu m) {
40         this.setMenuGroup(m.getMenuGroup());
41         this.setMenuHier(m.getMenuHier());
42         this.setMenuIcon(m.getMenuIcon());
43         this.setMenuId(m.getMenuId());
44         this.setMenuParent(m.getMenuParent());
45         this.setMenuPath(m.getMenuPath());
46         this.setMenuRef(m.getMenuRef());
47         this.setMenuSort(m.getMenuSort());
48         this.setMenuText(m.getMenuText());
49         this.setMenuType(m.getMenuType());
50         size = 0;
51         writable = false;
52         docStatus = -1;
53         checkoutUser = "";
54     }
55
56     /**
57      * Get property size
58      * @uml.property name="size"
59      */

60     public int getSize() {
61         return size;
62     }
63
64     /**
65      * Set property size
66      * @uml.property name="size"
67      */

68     public void setSize(int sz) {
69         size = sz;
70     }
71
72     /**
73      * Get property writable
74      * @uml.property name="writable"
75      */

76     public boolean getWritable() {
77         return writable;
78     }
79     
80     /**
81      * Set property writable
82      * @uml.property name="writable"
83      */

84     public void setWritable(boolean wa) {
85         writable = wa;
86     }
87     
88     /**
89      * Get property docStatus
90      * @return docStatus
91      */

92     public int getDocStatus()
93     {
94         return docStatus;
95     }
96     
97     /**
98      * Set property docStatus
99      * @param status New value for docStatus
100      */

101     public void setDocStatus(int status)
102     {
103         docStatus = status;
104     }
105     
106     /**
107      * Get property checkoutUser
108      * @return checkoutUser
109      */

110     public String JavaDoc getCheckoutUser()
111     {
112         return checkoutUser;
113     }
114     
115     /**
116      * Set property checkoutUser
117      * @param user New value for docStatus
118      */

119     public void setCheckoutUser(String JavaDoc user)
120     {
121         checkoutUser = user;
122     }
123 }
124
Popular Tags