001: /**********************************************************************************
002: * $URL:https://source.sakaiproject.org/svn/osp/trunk/matrix/tool/src/java/org/theospi/portfolio/matrix/control/MatrixFormBean.java $
003: * $Id:MatrixFormBean.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2005, 2006 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.control;
021:
022: import java.util.List;
023:
024: import org.sakaiproject.metaobj.shared.model.Id;
025: import org.theospi.portfolio.matrix.model.Criterion;
026: import org.theospi.portfolio.matrix.model.Matrix;
027:
028: /**
029: * @author apple
030: */
031: public class MatrixFormBean {
032:
033: private String action;
034: private Id nodeId;
035: private Id cellId;
036: private Matrix matrix;
037: private List criteria;
038: private String[] selectedCriteria;
039:
040: /**
041: * @return Returns the action.
042: */
043: public String getAction() {
044: return action;
045: }
046:
047: /**
048: * @param action The action to set.
049: */
050: public void setAction(String action) {
051: this .action = action;
052: }
053:
054: /**
055: * @return Returns the matrix.
056: */
057: public Matrix getMatrix() {
058: return matrix;
059: }
060:
061: /**
062: * @param matrix The matrix to set.
063: */
064: public void setMatrix(Matrix matrix) {
065: this .matrix = matrix;
066: }
067:
068: /**
069: * @return Returns the nodeId.
070: */
071: public Id getNodeId() {
072: return nodeId;
073: }
074:
075: /**
076: * @param nodeId The nodeId to set.
077: */
078: public void setNodeId(Id nodeId) {
079: this .nodeId = nodeId;
080: }
081:
082: /**
083: * @return Returns the criteria.
084: */
085: public List getCriteria() {
086: return criteria;
087: }
088:
089: /**
090: * @param criteria The criteria to set.
091: */
092: public void setCriteria(List criteria) {
093: this .criteria = criteria;
094: }
095:
096: /**
097: * @return Returns the cellId.
098: */
099: public Id getCellId() {
100: return cellId;
101: }
102:
103: /**
104: * @param cellId The cellId to set.
105: */
106: public void setCellId(Id cellId) {
107: this .cellId = cellId;
108: }
109:
110: /**
111: * @return Returns the selectedCriteria.
112: */
113: public String[] getSelectedCriteria() {
114: return selectedCriteria;
115: }
116:
117: /**
118: * @param selectedCriteria The selectedCriteria to set.
119: */
120: public void setSelectedCriteria(String[] selectedCriteria) {
121: this .selectedCriteria = selectedCriteria;
122: }
123:
124: /**
125: * @param list
126: */
127: public void setSelectedCriteria(List list) {
128: if (list == null)
129: return;
130: int size = list.size();
131: if (size == 0)
132: return;
133: String[] result = new String[size];
134: for (int i = 0; i < size; i++) {
135: result[i] = ((Criterion) list.get(i)).getId().getValue();
136: }
137: setSelectedCriteria(result);
138: }
139:
140: }
|