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 * Abstract base class for Group, Role and Permissions 29 * classes. 30 * <br> 31 * Implements common methods. 32 * 33 */ 34 public abstract class Actor 35 { 36 /*** Actor identifier */ 37 protected long id; 38 39 /*** Actor name */ 40 protected String name; 41 42 /*** Log4j category */ 43 protected Category cat; 44 45 46 /*** 47 * Default Constructor. 48 */ 49 protected Actor() 50 { 51 cat = Category.getInstance(this.getClass()); 52 } 53 54 55 /*** 56 * Constructor. Set the Actor name. 57 * 58 * @param String name the Actor name. 59 */ 60 protected Actor(String name) 61 { 62 this(); 63 this.name = name; 64 } 65 66 67 /*** 68 * Constructor. Set the Actor identifier. 69 * 70 * @param long id the Actor identifier. 71 */ 72 protected Actor(long id) 73 { 74 this(); 75 this.id = id; 76 } 77 78 79 /*** 80 * Sets the id attribute of the Actor object 81 * 82 * @param v The new id value 83 */ 84 public void setId(long v) 85 { 86 id = v; 87 } 88 89 90 /*** 91 * Sets the name attribute of the Actor object 92 * 93 * @param v The new name value 94 */ 95 public void setName(String v) 96 { 97 name = v; 98 } 99 100 101 /*** 102 * Gets the id attribute of the Actor object 103 * 104 * @return The id value 105 */ 106 public long getId() 107 { 108 return id; 109 } 110 111 112 /*** 113 * Gets the name attribute of the Actor object 114 * 115 * @return The name value 116 */ 117 public String getName() 118 { 119 return name; 120 } 121 } 122 123 124

This page was automatically generated by Maven