01: package com.technoetic.xplanner.security.auth;
02:
03: import java.util.Collection;
04: import java.util.List;
05:
06: import com.technoetic.xplanner.security.AuthenticationException;
07:
08: //DEBT Should throw AuthorizationException not AuthenticationException
09:
10: public interface Authorizer {
11: boolean hasPermission(int projectId, int personId,
12: String resourceType, int resourceId, String permission)
13: throws AuthenticationException;
14:
15: boolean hasPermission(int projectId, int personId, Object resource,
16: String permission) throws AuthenticationException;
17:
18: boolean hasPermissionForSomeProject(int personlId,
19: String resourceType, int resourceId, String permissions)
20: throws AuthenticationException;
21:
22: boolean hasPermissionForSomeProject(Collection projects,
23: int personId, String resourceType, int resourceId,
24: String permission) throws AuthenticationException;
25:
26: Collection getPeopleWithPermissionOnProject(List allPeople,
27: int projectId) throws AuthenticationException;
28:
29: Collection getRolesForPrincipalOnProject(int principalId,
30: int projectId, boolean includeWildcardProject)
31: throws AuthenticationException;
32: }
|