1 23 24 package org.apache.slide.security; 25 26 import java.util.Enumeration ; 27 28 import org.apache.slide.common.Namespace; 29 import org.apache.slide.common.NamespaceConfig; 30 import org.apache.slide.common.ServiceAccessException; 31 import org.apache.slide.common.SlideToken; 32 import org.apache.slide.structure.ActionNode; 33 import org.apache.slide.structure.ObjectNode; 34 import org.apache.slide.structure.ObjectNotFoundException; 35 import org.apache.slide.structure.SubjectNode; 36 import org.apache.slide.event.VetoException; 37 38 43 public interface Security { 44 45 46 48 53 void init (Namespace namespace, NamespaceConfig namespaceConfig); 54 55 65 Enumeration enumeratePermissions(SlideToken token, ObjectNode object) 66 throws ServiceAccessException, ObjectNotFoundException, 67 AccessDeniedException; 68 69 80 Enumeration enumeratePermissions(SlideToken token, ObjectNode object, boolean includeInherited) 81 throws ServiceAccessException, ObjectNotFoundException, 82 AccessDeniedException; 83 84 85 95 Enumeration enumeratePermissions(SlideToken token, String object) 96 throws ServiceAccessException, ObjectNotFoundException, 97 AccessDeniedException; 98 99 110 Enumeration enumeratePermissions(SlideToken token, String object, boolean includeInherited) 111 throws ServiceAccessException, ObjectNotFoundException, 112 AccessDeniedException; 113 114 115 125 void setPermissions(SlideToken token, String object, 126 Enumeration permissions) 127 throws ServiceAccessException, ObjectNotFoundException, 128 AccessDeniedException; 129 130 131 143 void grantPermission(SlideToken token, ObjectNode object, 144 SubjectNode subject, ActionNode action) 145 throws ServiceAccessException, ObjectNotFoundException, 146 AccessDeniedException, VetoException; 147 148 149 159 void grantPermission(SlideToken token, NodePermission permission) 160 throws ServiceAccessException, ObjectNotFoundException, 161 AccessDeniedException, VetoException; 162 163 164 177 void grantPermission(SlideToken token, ObjectNode object, 178 SubjectNode subject, ActionNode action, 179 boolean inheritable) 180 throws ServiceAccessException, ObjectNotFoundException, 181 AccessDeniedException, VetoException; 182 183 184 196 void denyPermission(SlideToken token, ObjectNode object, 197 SubjectNode subject, ActionNode action) 198 throws ServiceAccessException, ObjectNotFoundException, 199 AccessDeniedException, VetoException; 200 201 202 212 void denyPermission(SlideToken token, NodePermission permission) 213 throws ServiceAccessException, ObjectNotFoundException, 214 AccessDeniedException, VetoException; 215 216 217 230 void denyPermission(SlideToken token, ObjectNode object, 231 SubjectNode subject, ActionNode action, 232 boolean inheritable) 233 throws ServiceAccessException, ObjectNotFoundException, 234 AccessDeniedException, VetoException; 235 236 237 249 void revokePermission(SlideToken token, ObjectNode object, 250 SubjectNode subject, ActionNode action) 251 throws ServiceAccessException, ObjectNotFoundException, 252 AccessDeniedException, VetoException; 253 254 255 265 public void revokePermission(SlideToken token, NodePermission permission) 266 throws ServiceAccessException, ObjectNotFoundException, 267 AccessDeniedException, VetoException; 268 269 270 271 272 283 void checkCredentials(SlideToken token, ObjectNode object, 284 ActionNode action) 285 throws ServiceAccessException, AccessDeniedException; 286 287 288 301 void checkPermission(ObjectNode object, SubjectNode subject, 302 ActionNode action) 303 throws ServiceAccessException, AccessDeniedException, 304 ObjectNotFoundException; 305 306 318 void checkPermission(SlideToken token, ObjectNode object, ActionNode action) 319 throws ServiceAccessException, AccessDeniedException, 320 ObjectNotFoundException; 321 322 335 boolean hasPermission(ObjectNode object, SubjectNode subject, 336 ActionNode action) 337 throws ServiceAccessException, ObjectNotFoundException; 338 339 352 boolean hasPermission(SlideToken token, ObjectNode object, ActionNode action) 353 throws ServiceAccessException, ObjectNotFoundException; 354 355 364 boolean hasRole(SlideToken token, String role) 365 throws ServiceAccessException, ObjectNotFoundException; 366 367 368 377 boolean hasRole(ObjectNode object, String role) 378 throws ServiceAccessException, ObjectNotFoundException; 379 380 381 386 Enumeration getRoles(ObjectNode object); 387 388 389 394 Enumeration getRoles(SlideToken token) 395 throws ServiceAccessException, ObjectNotFoundException; 396 397 Enumeration getRoles(SlideToken token, SubjectNode subjectNode) 398 throws ServiceAccessException, ObjectNotFoundException; 399 400 405 ObjectNode getPrincipal(SlideToken token) 406 throws ServiceAccessException, ObjectNotFoundException; 407 408 417 boolean matchAction(SlideToken slideToken, ActionNode checkAction, ActionNode permAction) throws ServiceAccessException; 418 419 432 boolean matchPrincipal(SlideToken token, SubjectNode checkSubject, SubjectNode permSubject) throws ServiceAccessException; 433 } 434 | Popular Tags |