205 * one that uses a Vector, etc).
206 *
207 * @return a new PermissionCollection object for this type of Permission, or
208 * null if one is not defined.
209 */
210
211 public PermissionCollection newPermissionCollection() {
212 return null;
213 }
214
215 /**
216 * Returns a string describing this Permission. The convention is to
217 * specify the class name, the permission name, and the actions in
218 * the following format: '("ClassName" "name" "actions")', or
219 * '("ClassName" "name")' if actions list is null or empty.
220 *
221 * @return information about this Permission.
222 */
223 public String toString() {
224 String actions = getActions();
225 if ((actions == null) || (actions.length() == 0)) { // OPTIONAL
226 return "(\"" + getClass().getName() + "\" \"" + name + "\")";
227 } else {
228 return "(\"" + getClass().getName() + "\" \"" + name +
229 "\" \"" + actions + "\")";
230 }
231 }
232 }
|
205 * one that uses a Vector, etc).
206 *
207 * @return a new PermissionCollection object for this type of Permission, or
208 * null if one is not defined.
209 */
210
211 public PermissionCollection newPermissionCollection() {
212 return null;
213 }
214
215 /**
216 * Returns a string describing this Permission. The convention is to
217 * specify the class name, the permission name, and the actions in
218 * the following format: '("ClassName" "name" "actions")', or
219 * '("ClassName" "name")' if actions list is null or empty.
220 *
221 * @return information about this Permission.
222 */
223 public String toString() {
224 String actions = getActions();
225 if (actions == null || actions.isEmpty()) { // OPTIONAL
226 return "(\"" + getClass().getName() + "\" \"" + name + "\")";
227 } else {
228 return "(\"" + getClass().getName() + "\" \"" + name +
229 "\" \"" + actions + "\")";
230 }
231 }
232 }
|