1 4 package org.objectweb.speedo.pobjects.cap; 5 6 import java.util.Collection ; 7 8 11 public class JDORole { 12 13 14 private int id; 15 16 17 private String label; 18 19 20 private Collection scopes; 21 22 23 private Collection actions; 24 25 32 public JDORole( 33 int id, 34 String label, 35 Collection scopes, 36 Collection actions) 37 { 38 this.id = id; 39 this.label = label; 40 this.scopes = scopes; 41 this.actions = actions; 42 } 43 44 50 public void addAction( 51 JDOAction action, 52 boolean isDisplayedInMenu, 53 int displayOrder) 54 { 55 JDORoleHasAction action4role = new JDORoleHasAction(this, action, isDisplayedInMenu, displayOrder); 56 actions.add(action4role); 57 } 58 59 65 public boolean hasScope(JDOScope scope) 66 { 67 return scopes.contains(scope); 68 } 69 70 76 public boolean hasAction(JDOAction action) 77 { 78 return actions.contains(action); 79 } 80 81 85 public int getId() 86 { 87 return id; 88 } 89 90 94 public void setId(int id) 95 { 96 this.id = id; 97 } 98 99 103 public String getLabel() 104 { 105 return label; 106 } 107 108 112 public void setLabel(String label) 113 { 114 this.label = label; 115 } 116 117 121 public Collection getScopes() 122 { 123 return scopes; 124 } 125 126 130 public void setScopes(Collection scopes) 131 { 132 this.scopes = scopes; 133 } 134 135 139 public Collection getActions() 140 { 141 return actions; 142 } 143 144 148 public void setActions(Collection actions) 149 { 150 this.actions = actions; 151 } 152 153 } | Popular Tags |