001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/matrix/api/src/java/org/theospi/portfolio/matrix/MatrixManager.java $
003: * $Id: MatrixManager.java 21737 2007-02-19 20:25:58Z chmaurer@iupui.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2005, 2006, 2007 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.theospi.portfolio.matrix;
021:
022: import java.io.IOException;
023: import java.io.OutputStream;
024: import java.util.List;
025: import java.util.Set;
026:
027: import org.sakaiproject.entity.api.Reference;
028: import org.sakaiproject.metaobj.shared.model.Agent;
029: import org.sakaiproject.metaobj.shared.model.Id;
030: import org.theospi.portfolio.matrix.model.Attachment;
031: import org.theospi.portfolio.matrix.model.Cell;
032: import org.theospi.portfolio.matrix.model.Criterion;
033: import org.theospi.portfolio.matrix.model.Level;
034: import org.theospi.portfolio.matrix.model.Matrix;
035: import org.theospi.portfolio.matrix.model.Scaffolding;
036: import org.theospi.portfolio.matrix.model.ScaffoldingCell;
037: import org.theospi.portfolio.matrix.model.WizardPage;
038: import org.theospi.portfolio.shared.mgt.WorkflowEnabledManager;
039: import org.theospi.portfolio.shared.model.Node;
040:
041: /**
042: * @author apple
043: */
044: public interface MatrixManager extends WorkflowEnabledManager {
045:
046: public static final String EXPOSED_MATRIX_KEY = "osp.exposedmatrix.scaffolding.id";
047:
048: Matrix getMatrix(Id scaffoldingId, Id agentId);
049:
050: List getCellsByScaffoldingCell(Id scaffoldingCellId);
051:
052: List getPagesByPageDef(Id pageDefId);
053:
054: Cell getCell(Matrix matrix, Criterion rootCriterion, Level level);
055:
056: void unlockNextCell(Cell cell);
057:
058: Criterion getCriterion(Id criterionId);
059:
060: Level getLevel(Id levelId);
061:
062: Cell getCell(Id cellId);
063:
064: Cell getCellFromPage(Id pageId);
065:
066: List getCells(Matrix matrix);
067:
068: Id storeCell(Cell cell);
069:
070: Id storePage(WizardPage page);
071:
072: Scaffolding storeScaffolding(Scaffolding scaffolding);
073:
074: Scaffolding saveNewScaffolding(Scaffolding scaffolding);
075:
076: Id storeScaffoldingCell(ScaffoldingCell scaffoldingCell);
077:
078: void publishScaffolding(Id scaffoldingId);
079:
080: void previewScaffolding(Id scaffoldingId);
081:
082: Object store(Object obj);
083:
084: Object save(Object obj);
085:
086: Matrix createMatrix(Agent owner, Scaffolding scaffolding);
087:
088: Attachment getAttachment(Id attachmentId);
089:
090: Attachment attachArtifact(Id pageId, Reference artifactId);
091:
092: void detachArtifact(final Id pageId, final Id artifactId);
093:
094: void detachForm(final Id pageId, final Id artifactId);
095:
096: void removeFromSession(Object obj);
097:
098: void clearSession();
099:
100: Matrix getMatrix(Id matrixId);
101:
102: public List getMatricesForWarehousing();
103:
104: Scaffolding getScaffolding(Id scaffoldingId);
105:
106: /**
107: *
108: * @param siteIdStr
109: * @param userId
110: * @return
111: */
112: public List findAvailableScaffolding(String siteIdStr, Agent user);
113:
114: List findPublishedScaffolding(List sites);
115:
116: ScaffoldingCell getNextScaffoldingCell(
117: ScaffoldingCell scaffoldingCell, int progressionOption);
118:
119: ScaffoldingCell getScaffoldingCell(Criterion criterion, Level level);
120:
121: ScaffoldingCell getScaffoldingCell(Id id);
122:
123: ScaffoldingCell getScaffoldingCellByWizardPageDef(Id id);
124:
125: String getScaffoldingCellsStatus(Id id);
126:
127: Set getPageContents(WizardPage page);
128:
129: Set getPageForms(WizardPage page);
130:
131: //List getPageArtifacts(WizardPage page);
132: List getCellsByArtifact(Id artifactId);
133:
134: List getCellsByForm(Id artifactId);
135:
136: Cell submitCellForEvaluation(Cell cell);
137:
138: WizardPage submitPageForEvaluation(WizardPage page);
139:
140: /**
141: * gets all the cells, pages, and wizards that this user can evaluate within a worksite
142: * @param agent Agent
143: * @param worksiteId Id
144: * @return List of org.theospi.portfolio.shared.model.EvaluationContentWrapper
145: */
146: List getEvaluatableItems(Agent agent, Id worksiteId);
147:
148: /**
149: * gets all the cells, pages, and wizards that this user can evaluate within all worksites they are a member of
150: * @param agent Agent
151: * @return List of org.theospi.portfolio.shared.model.EvaluationContentWrapper
152: */
153: List getEvaluatableItems(Agent agent);
154:
155: /**
156: * @param matrixId
157: */
158: void deleteMatrix(Id matrixId);
159:
160: void deleteScaffolding(Id scaffoldingId);
161:
162: public void exposeMatrixTool(Scaffolding scaffolding);
163:
164: public void removeExposedMatrixTool(Scaffolding scaffolding);
165:
166: void packageScffoldingForExport(Id scaffoldingId, OutputStream os)
167: throws IOException;
168:
169: Node getNode(Id artifactId);
170:
171: Node getNode(Reference ref);
172:
173: Scaffolding uploadScaffolding(Reference uploadedScaffoldingFile,
174: String toContext) throws IOException;
175:
176: //Scaffolding uploadScaffolding(String toContext, ZipInputStream zis) throws IOException;
177:
178: void checkPageAccess(String id);
179:
180: Scaffolding createDefaultScaffolding();
181:
182: public List getScaffolding();
183:
184: public List getScaffoldingForWarehousing();
185:
186: public List getMatrices(Id scaffoldingId);
187:
188: public List getMatrices(Id scaffoldingId, Id agentId);
189:
190: WizardPage getWizardPage(Id pageId);
191:
192: List getWizardPagesForWarehousing();
193:
194: Matrix getMatrixByPage(Id pageId);
195:
196: public boolean isUseExperimentalMatrix();
197: }
|