1 package org.kuali.student.enrollment.class1.hold.service.facade;
2
3 import org.kuali.rice.kim.api.role.Role;
4 import org.kuali.student.r2.common.dto.ContextInfo;
5 import org.kuali.student.r2.common.exceptions.DoesNotExistException;
6 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
7 import org.kuali.student.r2.common.exceptions.MissingParameterException;
8 import org.kuali.student.r2.common.exceptions.OperationFailedException;
9 import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
10
11 import java.util.List;
12
13 /**
14 * Used to support service calls related to exam offerings. *
15 *
16 * @author Kuali Student Team
17 */
18 public interface HoldIssueAuthorizingOrgFacade {
19
20 /**
21 * Retrieves a list of Roles/Functions that apply to hold issues
22 *
23 * Apply Hold to a Student
24 * Expire the Applied Hold on Students
25 *
26 * @param contextInfo
27 * @return list of Roles
28 */
29 List<Role> getHoldFunctions(ContextInfo contextInfo);
30
31 /**
32 * Store (or persist) the binding between the Hold Issue, the Org Id, and the Role/Function (Apply or Expire)
33 *
34 * @param holdIssueId
35 * @param orgId
36 * @param role
37 * @param contextInfo
38 * @throws DoesNotExistException
39 * @throws MissingParameterException
40 * @throws InvalidParameterException
41 * @throws OperationFailedException
42 * @throws PermissionDeniedException
43 */
44 void storeBinding(String holdIssueId, String orgId, Role role, ContextInfo contextInfo)
45 throws DoesNotExistException, MissingParameterException, InvalidParameterException, OperationFailedException, PermissionDeniedException;
46
47 /**
48 * Remove the binding between:The Hold Issue, the Org Id, and the Role/Function (Apply or Expire)
49 *
50 * @param holdIssueId
51 * @param orgId
52 * @param role
53 * @param contextInfo
54 * @throws DoesNotExistException
55 * @throws MissingParameterException
56 * @throws InvalidParameterException
57 * @throws OperationFailedException
58 * @throws PermissionDeniedException
59 */
60 void removeBinding(String holdIssueId, String orgId, Role role, ContextInfo contextInfo)
61 throws DoesNotExistException, MissingParameterException, InvalidParameterException, OperationFailedException, PermissionDeniedException;
62
63 /**
64 * Retrieves bindings by the Function and Hold Issue so we can display the list of orgs associated with this hold issue and function.
65 *
66 * @param roleId
67 * @param holdIssueId
68 * @param contextInfo
69 * @return list of org ids
70 * @throws PermissionDeniedException
71 * @throws MissingParameterException
72 * @throws InvalidParameterException
73 * @throws OperationFailedException
74 * @throws DoesNotExistException
75 */
76 List<String> getBindingByRoleAndHoldIssue(String roleId, String holdIssueId, ContextInfo contextInfo)
77 throws PermissionDeniedException, MissingParameterException, InvalidParameterException, OperationFailedException, DoesNotExistException;
78
79 /**
80 *
81 * @param principalId
82 * @param holdIssueId
83 * @param actionEvent
84 * @return
85 */
86 public boolean canPerformFunction(String principalId, String holdIssueId, String actionEvent);
87 }