01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/sam/trunk/component/src/java/org/sakaiproject/tool/assessment/integration/helper/integrated/PublishingTargetHelperImpl.java $
03: * $Id: PublishingTargetHelperImpl.java 9273 2006-05-10 22:34:28Z daisyf@stanford.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 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.tool.assessment.integration.helper.integrated;
21:
22: import java.util.HashMap;
23:
24: import org.apache.commons.logging.Log;
25: import org.apache.commons.logging.LogFactory;
26:
27: import org.sakaiproject.tool.assessment.facade.AgentFacade;
28: import org.sakaiproject.tool.assessment.integration.helper.ifc.PublishingTargetHelper;
29:
30: /**
31: *
32: * <p>Description:
33: * This is an integrated context implementation helper delegate class for
34: * the PublishingTarget class.
35: * "Integrated" means that Samigo (Tests and Quizzes)
36: * is running within the context of the Sakai portal and authentication
37: * mechanisms, and therefore makes calls on Sakai for things it needs.</p>
38: * <p>Note: To customize behavior you can add your own helper class to the
39: * Spring injection via the integrationContext.xml for your context.
40: * The particular integrationContext.xml to be used is selected by the
41: * build process.
42: * </p>
43: * <p>Sakai Project Copyright (c) 2005</p>
44: * <p> </p>
45: * @author Ed Smiley <esmiley@stanford.edu>
46: */
47:
48: public class PublishingTargetHelperImpl implements
49: PublishingTargetHelper {
50: private static Log log = LogFactory
51: .getLog(PublishingTargetHelperImpl.class);
52:
53: //private org.sakaiproject.component.api.ComponentManager cm;
54:
55: public PublishingTargetHelperImpl() {
56: }
57:
58: /**
59: * Gets to whom you can publish.
60: * @return map of key value pairs:
61: * e.g. "Authenticated Users"->"AUTHENTICATED_USERS"
62: */
63: public HashMap getTargets() {
64:
65: HashMap map = new HashMap();
66: map.put("Anonymous Users", "ANONYMOUS_USERS");
67: map.put(AgentFacade.getCurrentSiteName(), AgentFacade
68: .getCurrentSiteId());
69: return map;
70: }
71: }
|