1 13 package org.jahia.services.acl; 14 15 import java.io.Serializable ; 16 import java.util.Vector ; 17 18 import org.apache.log4j.Logger; 19 import org.jahia.exceptions.JahiaException; 20 21 28 public class JahiaBaseACL extends JahiaAbstractACL implements Serializable { 29 37 public static final int READ_RIGHTS = 0; 38 39 public static final int WRITE_RIGHTS = 1; 40 41 public static final int ADMIN_RIGHTS = 2; 42 43 public static final int RIGHTS_MAX_OFFSET = 3; 44 45 public static final int ALL_RIGHTS = 0x7; 47 public static final int RIGHTS_INHERITANCE_FLAG = 1 << RIGHTS_MAX_OFFSET; 49 private static final Logger logger = Logger.getLogger(JahiaAbstractACL.class); 50 51 59 public JahiaBaseACL(int aclID) throws ACLNotFoundException, JahiaException { 60 super(aclID); 61 } 62 63 67 public JahiaBaseACL() throws JahiaException { 68 super(); 69 } 70 71 75 public Vector getBitdesc() { 76 return new Vector (getActionNames()); 77 } 78 79 public static char[] getSymbols() { 80 int size = getActionNames().size(); 81 if (size > getSharedActions().length) 82 size = getSharedActions().length; 83 char[] symbols = new char[size]; 84 System.arraycopy(getSharedActions(), 0, symbols, 0, size); 85 return symbols; 86 } 87 88 public final int size() { 90 return getActionNames().size(); 91 } 92 93 98 public Object clone() { 99 100 try { 101 JahiaBaseACL baseACL = new JahiaBaseACL(); 102 baseACL.mACL = (JahiaACL) mACL.clone(); 103 return baseACL; 104 } catch (JahiaException ex) { 105 } 106 return null; 107 } 108 109 } 110 | Popular Tags |