01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/wizard/api/src/java/org/theospi/portfolio/wizard/model/EvaluationContentWrapperForWizardPage.java $
03: * $Id: EvaluationContentWrapperForWizardPage.java 18535 2006-11-29 18:32:53Z 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.matrix.WizardPageHelper;
31: import org.theospi.portfolio.matrix.model.WizardPage;
32: import org.theospi.portfolio.shared.model.EvaluationContentWrapper;
33: import org.theospi.portfolio.wizard.WizardFunctionConstants;
34: import org.theospi.portfolio.wizard.model.Wizard;
35:
36: public class EvaluationContentWrapperForWizardPage extends
37: EvaluationContentWrapper {
38:
39: public EvaluationContentWrapperForWizardPage(Id id, String title,
40: Agent owner, Date submittedDate, String wizardType,
41: String siteId) throws UserNotDefinedException {
42:
43: setId(id);
44: setTitle(title);
45: setSubmittedDate(submittedDate);
46: setSiteTitle(super .fetchSiteName(siteId));
47:
48: if (owner != null) {
49: setOwner(UserDirectoryService.getUser(owner.getId()
50: .getValue()));
51: if (wizardType
52: .equals(WizardFunctionConstants.WIZARD_TYPE_SEQUENTIAL)) {
53: setUrl("openEvaluationPageSeqRedirect");
54: } else {
55: setUrl("openEvaluationPageHierRedirect");
56: }
57: }
58: setEvalType(WizardPage.TYPE);
59:
60: Set params = new HashSet();
61:
62: params.add(new ParamBean("page_id", getId().getValue()));
63: params.add(new ParamBean("readOnlyMatrix", "true"));
64: params
65: .add(new ParamBean(
66: "session."
67: + WizardPageHelper.SEQUENTIAL_WIZARD_CURRENT_STEP,
68: null));
69:
70: setUrlParams(params);
71: }
72: }
|