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="InstanceDisplayTerms.java.html"><b><i>View Source</i></b></a>
031: *
032: * @author Brian Wing Shun Chan
033: *
034: */
035: public class InstanceDisplayTerms extends DisplayTerms {
036:
037: public static final String DEFINITION_ID = "definitionId";
038:
039: public static final String INSTANCE_ID = "instanceId";
040:
041: public static final String DEFINITION_NAME = "definitionName";
042:
043: public static final String DEFINITION_VERSION = "definitionVersion";
044:
045: public static final String START_DATE_GT = "startDateGT";
046:
047: public static final String START_DATE_LT = "startDateLT";
048:
049: public static final String END_DATE_GT = "endDateGT";
050:
051: public static final String END_DATE_LT = "endDateLT";
052:
053: public static final String HIDE_ENDED_TASKS = "hideEndedTasks";
054:
055: public InstanceDisplayTerms(RenderRequest req) {
056: super (req);
057:
058: definitionId = ParamUtil.getLong(req, DEFINITION_ID);
059: instanceId = ParamUtil.getLong(req, INSTANCE_ID);
060: definitionName = ParamUtil.getString(req, DEFINITION_NAME);
061: definitionVersion = ParamUtil
062: .getString(req, DEFINITION_VERSION);
063: hideEndedTasks = ParamUtil.getBoolean(req, HIDE_ENDED_TASKS);
064: }
065:
066: public long getDefinitionId() {
067: return definitionId;
068: }
069:
070: public String getDefinitionIdString() {
071: if (definitionId != 0) {
072: return String.valueOf(definitionId);
073: } else {
074: return StringPool.BLANK;
075: }
076: }
077:
078: public long getInstanceId() {
079: return instanceId;
080: }
081:
082: public String getInstanceIdString() {
083: if (instanceId != 0) {
084: return String.valueOf(instanceId);
085: } else {
086: return StringPool.BLANK;
087: }
088: }
089:
090: public String getDefinitionName() {
091: return definitionName;
092: }
093:
094: public String getDefinitionVersion() {
095: return definitionVersion;
096: }
097:
098: public String getStartDateGT() {
099: return startDateGT;
100: }
101:
102: public String getStartDateLT() {
103: return startDateLT;
104: }
105:
106: public String getEndDateGT() {
107: return endDateGT;
108: }
109:
110: public String getEndDateLT() {
111: return endDateLT;
112: }
113:
114: public boolean isHideEndedTasks() {
115: return hideEndedTasks;
116: }
117:
118: protected long definitionId;
119: protected long instanceId;
120: protected String definitionName;
121: protected String definitionVersion;
122: protected String startDateGT;
123: protected String startDateLT;
124: protected String endDateGT;
125: protected String endDateLT;
126: protected boolean hideEndedTasks;
127:
128: }
|