01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/sam/trunk/component/src/java/org/sakaiproject/tool/assessment/integration/helper/standalone/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.standalone;
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.integration.helper.ifc.PublishingTargetHelper;
28: import org.sakaiproject.tool.assessment.qti.constants.AuthoringConstantStrings;
29:
30: /**
31: *
32: * <p>Description:
33: * This is a stub standalone context implementation helper delegate class for
34: * the PublishingTarget class. All but one method is unimplemented.
35: * "Standalone" means that Samigo (Tests and Quizzes)
36: * is running without the context of the Sakai portal and authentication
37: * mechanisms, and therefore we leave standalone-unused methods unimplemented.</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:
49: public class PublishingTargetHelperImpl implements
50: PublishingTargetHelper {
51: private static Log log = LogFactory
52: .getLog(PublishingTargetHelperImpl.class);
53:
54: /**
55: * Gets to whom you can publish.
56: * @return map of key value pairs:
57: * e.g. "Authenticated Users"->"AUTHENTICATED_USERS"
58: */
59: public HashMap getTargets() {
60: HashMap map = new HashMap();
61: map.put(AuthoringConstantStrings.ANONYMOUS, "ANONYMOUS_USERS");
62: map.put(AuthoringConstantStrings.AUTHENTICATED,
63: "AUTHENTICATED_USERS");
64: return map;
65: }
66:
67: }
|