01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/rights/tags/sakai_2-4-1/rights-api/api/src/java/org/sakaiproject/rights/api/RightsService.java $
03: * $Id: RightsService.java 17729 2006-11-01 15:48:20Z lance@indiana.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.rights.api;
21:
22: import org.sakaiproject.exception.IdUnusedException;
23:
24: public interface RightsService {
25: /**
26: * @param entityRef
27: * @return
28: */
29: public RightsAssignment addRightsAssignment(String entityRef);
30:
31: /**
32: * @param context
33: * @return
34: */
35: public SiteRightsPolicy addSiteRightsPolicy(String context);
36:
37: /**
38: * @param context
39: * @param userId
40: * @return
41: */
42: public UserRightsPolicy addUserRightsPolicy(String context,
43: String userId);
44:
45: /**
46: * @param entityRef
47: * @return
48: */
49: public RightsAssignment getRightsAssignment(String entityRef)
50: throws IdUnusedException;
51:
52: /**
53: * @param context
54: * @return
55: */
56: public SiteRightsPolicy getSiteRightsPolicy(String context);
57:
58: /**
59: * @param context
60: * @param userId
61: * @return
62: */
63: public UserRightsPolicy getUserRightsPolicy(String context,
64: String userId);
65:
66: /**
67: * @param rights
68: */
69: public void save(RightsAssignment rights);
70:
71: /**
72: * @param policy
73: */
74: public void save(RightsPolicy policy);
75:
76: /**
77: * @param entityRef
78: * @param rights
79: */
80: public void setRightsAssignment(String entityRef,
81: RightsAssignment rights);
82:
83: } // interface CopyrightService
|