001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: *
017: */
018:
019: /* $Id: TaskWrapperParameters.java 473861 2006-11-12 03:51:14Z gregor $ */
020:
021: package org.apache.lenya.cms.task;
022:
023: import java.util.Map;
024:
025: /**
026: * The task wrapper parameters
027: * @deprecated Use the usecase framework instead.
028: */
029: public class TaskWrapperParameters extends ParameterWrapper {
030:
031: /**
032: * <code>TASK_ID</code> The task id
033: */
034: public static final String TASK_ID = "task-id";
035: /**
036: * <code>WEBAPP_URL</code> The webapp URL
037: */
038: public static final String WEBAPP_URL = "webapp-url";
039: /**
040: * <code>PREFIX</code> The prefix
041: */
042: public static final String PREFIX = "wrapper";
043:
044: protected static final String[] REQUIRED_KEYS = { TASK_ID,
045: WEBAPP_URL };
046:
047: /**
048: * Ctor.
049: * @param parameters The parameter map to use.
050: */
051: public TaskWrapperParameters(Map parameters) {
052: super (parameters);
053: }
054:
055: /**
056: * Returns the required keys.
057: * @return A string array.
058: */
059: public String[] getRequiredKeys() {
060: return REQUIRED_KEYS;
061: }
062:
063: /**
064: * Returns the task ID.
065: * @return A string.
066: */
067: public String getTaskId() {
068: return get(TASK_ID);
069: }
070:
071: /**
072: * Returns the webapp URL.
073: * @return A string.
074: */
075: public String getWebappUrl() {
076: return get(WEBAPP_URL);
077: }
078:
079: /**
080: * Sets the webapp URL.
081: * @param url A url.
082: */
083: public void setWebappUrl(String url) {
084: put(WEBAPP_URL, url);
085: }
086:
087: /**
088: * Sets the task ID.
089: * @param taskId A string.
090: */
091: public void setTaskId(String taskId) {
092: put(TASK_ID, taskId);
093: }
094:
095: /**
096: * @see org.apache.lenya.cms.task.ParameterWrapper#getPrefix()
097: */
098: public String getPrefix() {
099: return PREFIX;
100: }
101:
102: }
|