View Javadoc
1 /*** 2 * The contents of this file are subject to the Mozilla Public 3 * License Version 1.1 (the "License"); you may not use this file 4 * except in compliance with the License. You may obtain a copy of 5 * the License at http://www.mozilla.org/MPL/ 6 * 7 * Software distributed under the License is distributed on an "AS 8 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 * implied. See the License for the specific language governing 10 * rights and limitations under the License. 11 * 12 * The Original Code is pow2ACL library. 13 * 14 * The Initial Owner of the Original Code is Power Of Two S.R.L. 15 * Portions created by Power Of Two S.R.L. are Copyright (C) Power Of Two S.R.L. 16 * All Rights Reserved. 17 * 18 * Contributor(s): 19 */ 20 21 22 package com.pow2.acl; 23 24 import org.apache.log4j.Category; 25 26 27 /*** 28 * Simple container for Permission data. 29 * 30 * @author Luca Fossato 31 */ 32 public class Permission extends Actor 33 { 34 /*** 35 * Default constructor. 36 */ 37 public Permission() 38 { 39 // should user other constructors, with 40 // data validation versus the database schema... 41 super(); 42 } 43 44 45 /*** 46 * Constructor. Set the permission name. 47 * 48 * @param name the permission name. 49 */ 50 public Permission(String name) 51 { 52 // should validate the input name versus the ACL database; 53 // if a permission with the given name exists ino the Permission table, 54 // continue, else throw an exception... 55 super(name); 56 57 cat.debug("::Permission - created the Permission with name [" + name + "]"); 58 } 59 60 61 /*** 62 * Constructor. Set the permission identifier. 63 * 64 * @param id the permission identifier. 65 */ 66 public Permission(long id) 67 { 68 // should validate the input id versus the ACL database; 69 // if a permission with the given id exists ino the Permission table, 70 // continue, else throw an exception... 71 super(id); 72 73 cat.debug("::Permission - created the Permission with id [" + id + "]"); 74 } 75 } 76 77 78 79 80 81 82

This page was automatically generated by Maven