KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lenya > cms > task > TaskWrapperParameters


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17
18 /* $Id: TaskWrapperParameters.java 42598 2004-03-01 16:18:28Z gregor $ */
19
20 package org.apache.lenya.cms.task;
21
22 import java.util.Map JavaDoc;
23
24 public class TaskWrapperParameters extends ParameterWrapper {
25
26     public static final String JavaDoc TASK_ID = "task-id";
27     public static final String JavaDoc WEBAPP_URL = "webapp-url";
28
29     protected static final String JavaDoc[] REQUIRED_KEYS = { TASK_ID, WEBAPP_URL };
30
31     public static final String JavaDoc PREFIX = "wrapper";
32
33     /**
34      * Ctor.
35      * @param parameters The parameter map to use.
36      */

37     public TaskWrapperParameters(Map JavaDoc parameters) {
38         super(parameters);
39     }
40
41     /**
42      * Returns the required keys.
43      * @return A string array.
44      */

45     public String JavaDoc[] getRequiredKeys() {
46         return REQUIRED_KEYS;
47     }
48
49     /**
50      * Returns the task ID.
51      * @return A string.
52      */

53     public String JavaDoc getTaskId() {
54         return get(TASK_ID);
55     }
56
57     /**
58      * Returns the webapp URL.
59      * @return A string.
60      */

61     public String JavaDoc getWebappUrl() {
62         return get(WEBAPP_URL);
63     }
64
65     /**
66      * Sets the webapp URL.
67      * @param url A url.
68      */

69     public void setWebappUrl(String JavaDoc url) {
70         put(WEBAPP_URL, url);
71     }
72
73     /**
74      * Sets the task ID.
75      * @param taskId A string.
76      */

77     public void setTaskId(String JavaDoc taskId) {
78         put(TASK_ID, taskId);
79     }
80
81     /**
82      * @see org.apache.lenya.cms.task.ParameterWrapper#getPrefix()
83      */

84     public String JavaDoc getPrefix() {
85         return PREFIX;
86     }
87     
88 }
89
Popular Tags