001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.workflow.search;
022:
023: import com.liferay.portal.kernel.dao.search.DisplayTerms;
024: import com.liferay.portal.kernel.util.ParamUtil;
025: import com.liferay.portal.kernel.util.StringPool;
026:
027: import javax.portlet.RenderRequest;
028:
029: /**
030: * <a href="TaskDisplayTerms.java.html"><b><i>View Source</i></b></a>
031: *
032: * @author Brian Wing Shun Chan
033: *
034: */
035: public class TaskDisplayTerms extends DisplayTerms {
036:
037: public static final String INSTANCE_ID = "instanceId";
038:
039: public static final String TASK_NAME = "taskName";
040:
041: public static final String DEFINITION_NAME = "definitionName";
042:
043: public static final String ASSIGNED_TO = "assignedTo";
044:
045: public static final String CREATE_DATE_GT = "createDateGT";
046:
047: public static final String CREATE_DATE_LT = "createDateLT";
048:
049: public static final String START_DATE_GT = "startDateGT";
050:
051: public static final String START_DATE_LT = "startDateLT";
052:
053: public static final String END_DATE_GT = "endDateGT";
054:
055: public static final String END_DATE_LT = "endDateLT";
056:
057: public static final String HIDE_ENDED_TASKS = "hideEndedTasks";
058:
059: public TaskDisplayTerms(RenderRequest req) {
060: super (req);
061:
062: instanceId = ParamUtil.getLong(req, INSTANCE_ID);
063: taskName = ParamUtil.getString(req, TASK_NAME);
064: definitionName = ParamUtil.getString(req, DEFINITION_NAME);
065: assignedTo = ParamUtil.getString(req, ASSIGNED_TO);
066: hideEndedTasks = ParamUtil.getBoolean(req, HIDE_ENDED_TASKS);
067: }
068:
069: public long getInstanceId() {
070: return instanceId;
071: }
072:
073: public String getInstanceIdString() {
074: if (instanceId != 0) {
075: return String.valueOf(instanceId);
076: } else {
077: return StringPool.BLANK;
078: }
079: }
080:
081: public String getTaskName() {
082: return taskName;
083: }
084:
085: public String getDefinitionName() {
086: return definitionName;
087: }
088:
089: public String getAssignedTo() {
090: return assignedTo;
091: }
092:
093: public String getCreateDateGT() {
094: return createDateGT;
095: }
096:
097: public String getCreateDateLT() {
098: return createDateLT;
099: }
100:
101: public String getStartDateGT() {
102: return startDateGT;
103: }
104:
105: public String getStartDateLT() {
106: return startDateLT;
107: }
108:
109: public String getEndDateGT() {
110: return endDateGT;
111: }
112:
113: public String getEndDateLT() {
114: return endDateLT;
115: }
116:
117: public boolean isHideEndedTasks() {
118: return hideEndedTasks;
119: }
120:
121: protected long instanceId;
122: protected String taskName;
123: protected String definitionName;
124: protected String assignedTo;
125: protected String createDateGT;
126: protected String createDateLT;
127: protected String startDateGT;
128: protected String startDateLT;
129: protected String endDateGT;
130: protected String endDateLT;
131: protected boolean hideEndedTasks;
132:
133: }
|