01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/wizard/api/src/java/org/theospi/portfolio/wizard/model/EvaluationContentWrapperForWizard.java $
03: * $Id: EvaluationContentWrapperForWizard.java 18220 2006-11-17 21:57:46Z chmaurer@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 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.theospi.portfolio.wizard.model;
21:
22: import java.util.Date;
23: import java.util.HashSet;
24: import java.util.Set;
25:
26: import org.sakaiproject.metaobj.shared.model.Agent;
27: import org.sakaiproject.metaobj.shared.model.Id;
28: import org.sakaiproject.user.api.UserNotDefinedException;
29: import org.sakaiproject.user.cover.UserDirectoryService;
30: import org.theospi.portfolio.shared.model.EvaluationContentWrapper;
31:
32: public class EvaluationContentWrapperForWizard extends
33: EvaluationContentWrapper {
34:
35: public EvaluationContentWrapperForWizard(Id id, String title,
36: Agent owner, Date submittedDate, String siteId)
37: throws UserNotDefinedException {
38:
39: Set params = new HashSet();
40:
41: setId(id);
42: setTitle(title);
43: setSubmittedDate(submittedDate);
44: setSiteTitle(super .fetchSiteName(siteId));
45:
46: if (owner != null) {
47: setOwner(UserDirectoryService.getUser(owner.getId()
48: .getValue()));
49: params.add(new ParamBean("session.WIZARD_USER_ID",
50: getOwner().getId()));
51: setUrl("openEvaluationWizardRedirect");
52: }
53:
54: setEvalType(CompletedWizard.TYPE);
55:
56: params.add(new ParamBean("session.CURRENT_WIZARD_ID", getId()
57: .getValue()));
58:
59: setUrlParams(params);
60: }
61:
62: }
|