KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > speedo > pobjects > cap > JDORoleHasAction


1 /*
2  * Created on 04 nov. 2004
3  */

4 package org.objectweb.speedo.pobjects.cap;
5
6
7 /**
8  * @author mhoudu
9  */

10 public class JDORoleHasAction {
11     
12     private int roleId;
13     
14     private int actionId;
15     
16     /** the role */
17     private JDORole role;
18     
19     /** the action */
20     private JDOAction action;
21
22     /** the flag which indicates if the action has to be displayed in the menu or not */
23     private boolean isDisplayedInMenu;
24     
25     /** the display order */
26     private int displayOrder;
27     
28     /**
29      * Default constructor.
30      * @param role The role.
31      * @param action The action.
32      * @param isDisplayedInMenu The flag which indicates if the action has to be displayed in the menu or not.
33      * @param displayOrder The isplay order.
34      */

35     public JDORoleHasAction(
36             JDORole role,
37             JDOAction action,
38             boolean isDisplayedInMenu,
39             int displayOrder)
40     {
41         this.roleId = role.getId();
42         this.actionId = action.getId();
43         this.role = role;
44         this.action = action;
45         this.isDisplayedInMenu = isDisplayedInMenu;
46         this.displayOrder = displayOrder;
47     }
48
49    
50     public int getActionId() {
51         return actionId;
52     }
53     public void setActionId(int actionId) {
54         this.actionId = actionId;
55     }
56     public int getRoleId() {
57         return roleId;
58     }
59     public void setRoleId(int roleId) {
60         this.roleId = roleId;
61     }
62     /**
63      * Gets the role.
64      * @return Returns the role.
65      */

66     public JDORole getRole()
67     {
68         return role;
69     }
70     
71     /**
72      * Sets the role.
73      * @param role The role to set.
74      */

75     public void setRole(JDORole role)
76     {
77         this.role = role;
78     }
79     
80     /**
81      * Gets the action.
82      * @return Returns the action.
83      */

84     public JDOAction getAction()
85     {
86         return action;
87     }
88     
89     /**
90      * Sets the action.
91      * @param action The action to set.
92      */

93     public void setAction(JDOAction action)
94     {
95         this.action = action;
96     }
97
98     /**
99      * Gets the display order.
100      * @return Returns the display order.
101      */

102     public int getDisplayOrder()
103     {
104         return displayOrder;
105     }
106     
107     /**
108      * Sets the display order.
109      * @param displayOrder The display order to set.
110      */

111     public void setDisplayOrder(int displayOrder)
112     {
113         this.displayOrder = displayOrder;
114     }
115     
116     /**
117      * Gets the flag which indicates if the action has to be displayed in the menu or not.
118      * @return Returns the flag which indicates if the action has to be displayed in the menu or not.
119      */

120     public boolean isDisplayedInMenu()
121     {
122         return isDisplayedInMenu;
123     }
124     
125     /**
126      * Sets the flag which indicates if the action has to be displayed in the menu or not.
127      * @param isDisplayedInMenu The flag which indicates if the action has to be displayed in the menu or not, to set.
128      */

129     public void setDisplayedInMenu(boolean isDisplayedInMenu)
130     {
131         this.isDisplayedInMenu = isDisplayedInMenu;
132     }
133
134 }
Popular Tags