01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/wizard/api-impl/src/java/org/theospi/portfolio/wizard/taggable/impl/WizardItemImpl.java $
03: * $Id: WizardItemImpl.java 21095 2007-02-07 18:00:48Z jmpease@syr.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2007 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.taggable.impl;
21:
22: import org.sakaiproject.assignment.taggable.api.TaggableActivity;
23: import org.sakaiproject.assignment.taggable.api.TaggableItem;
24: import org.theospi.portfolio.matrix.model.WizardPage;
25:
26: public class WizardItemImpl implements TaggableItem {
27:
28: TaggableActivity activity;
29:
30: WizardPage page;
31:
32: WizardReference reference;
33:
34: public WizardItemImpl(WizardPage page, TaggableActivity activity) {
35: this .page = page;
36: this .activity = activity;
37:
38: reference = new WizardReference(WizardReference.REF_PAGE, page
39: .getId().toString());
40: }
41:
42: public Object getObject() {
43: return page;
44: }
45:
46: public TaggableActivity getActivity() {
47: return activity;
48: }
49:
50: public String getContent() {
51: return "";
52: }
53:
54: public String getReference() {
55: return reference.toString();
56: }
57:
58: public String getTitle() {
59: return page.getOwner().getDisplayName() + " - "
60: + page.getPageDefinition().getTitle();
61: }
62:
63: public String getUserId() {
64: return page.getOwner().getId().getValue();
65: }
66: }
|