1 13 package info.magnolia.jaas.principal; 14 15 import info.magnolia.cms.security.auth.ACL; 16 17 import java.util.ArrayList ; 18 import java.util.List ; 19 20 import org.apache.commons.lang.StringUtils; 21 import org.apache.commons.lang.builder.ToStringBuilder; 22 import org.apache.commons.lang.builder.ToStringStyle; 23 24 25 29 public class ACLImpl implements ACL { 30 31 34 private static final long serialVersionUID = 222L; 35 36 private static final String NAME = "acl"; 37 38 41 private String name; 42 43 private List list; 44 45 private String repository; 46 47 private String workspace; 48 49 52 public ACLImpl() { 53 this.list = new ArrayList (); 54 } 55 56 60 public String getName() { 61 if (StringUtils.isEmpty(this.name)) { 62 return NAME; 63 } 64 return this.name; 65 } 66 67 70 public void setName(String name) { 71 this.name = name; 72 } 73 74 78 public String getRepository() { 79 return this.repository; 80 } 81 82 86 public void setRepository(String repository) { 87 this.repository = repository; 88 } 89 90 94 public String getWorkspace() { 95 return this.workspace; 96 } 97 98 102 public void setWorkspace(String workspace) { 103 this.workspace = workspace; 104 } 105 106 110 public void addPermission(Object permission) { 111 this.list.add(permission); 112 } 113 114 118 public void setList(List list) { 119 this.list.clear(); 120 this.list.addAll(list); 121 } 122 123 126 public List getList() { 127 return this.list; 128 } 129 130 133 public String toString() { 134 return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", this.name).append( 135 "workspace", 136 this.workspace).append("repository", this.repository).append("list", this.list).toString(); 137 } 138 139 } 140 | Popular Tags |