1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.security.om;
18
19 import java.io.Serializable;
20 import java.sql.Timestamp;
21 import java.util.Collection;
22
23 /***
24 * <p>Interface representing a policy permission. This will be used by the
25 * {@link org.apache.jetspeed.security.impl.RdbmsPolicy} to retrieve a permission
26 * policy according to JAAS where permission are used in JAAS:</p>
27 * <pre>
28 * <code>grant [SignedBy "signer_names"] [, CodeBase "URL"]
29 * [, InternalPrincipal [principal_class_name] "principal_name"]
30 * [, InternalPrincipal [principal_class_name] "principal_name"] ...
31 * {
32 * permission permission_class_name [ "target_name" ]
33 * [, "action"] [, SignedBy "signer_names"];
34 * permission ...
35 * };
36 * </code>
37 * </pre>
38 * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
39 */
40 public interface InternalPermission extends Serializable, Cloneable
41 {
42
43 /***
44 * <p>Getter for the permission id.</p>
45 * @return The permission id.
46 */
47 long getPermissionId();
48
49 /***
50 * <p>Setter for the permission id.</p>
51 * @param permissionId The permission id.
52 */
53 void setPermissionId(long permissionId);
54
55 /***
56 * <p>Getter for the permission classname.</p>
57 * @return The permission classname.
58 */
59 String getClassname();
60
61 /***
62 * <p>Setter for the permission classname.</p>
63 * @param classname The permission classname.
64 */
65 void setClassname(String classname);
66
67 /***
68 * <p>Getter for the permission resource name.</p>
69 * @return The permission resource name.
70 */
71 String getName();
72
73 /***
74 * <p>Setter for the permission resource name.</p>
75 * @param name The permission resource name.
76 */
77 void setName(String name);
78
79 /***
80 * <p>Getter for the permission actions.</p>
81 * @return The permission actions.
82 */
83 String getActions();
84
85 /***
86 * <p>Setter for the permission actions.</p>
87 * @param actions The permission actions.
88 */
89 void setActions(String actions);
90
91 /***
92 * <p>Getter for the permission principals.</p>
93 * @return The permission principals.
94 */
95 Collection getPrincipals();
96
97 /***
98 * <p>Setter for the permission principals.</p>
99 * @param principals The permission principals.
100 */
101 void setPrincipals(Collection principals);
102
103 /***
104 * <p>Getter for creation date.</p>
105 * @return The creation date.
106 */
107 Timestamp getCreationDate();
108
109 /***
110 * <p>Setter for the creation date.</p>
111 * @param creationDate The creation date.
112 */
113 void setCreationDate(Timestamp creationDate);
114
115 /***
116 * <p>Getter for the modified date.</p>
117 * @return The modified date.
118 */
119 Timestamp getModifiedDate();
120
121 /***
122 * <p>Setter for the modified date.</p>
123 * @param modifiedDate The modified date.
124 */
125 void setModifiedDate(Timestamp modifiedDate);
126
127 /***
128 * <p>Equals method used to appropriately compare 2 {@link InternalPermission} objects.</p>
129 * @param object The object to compare with.
130 * @return The comparison result.
131 */
132 boolean equals(Object object);
133 }