KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > tools > PortalToolFunction


1 /*
2  * Copyright 1999-2005 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 package org.apache.cocoon.portal.tools;
17
18 /**
19  * Represents a function the user can call via the ui or the ToolManager
20  *
21  * @version CVS $Id: PortalToolFunction.java 148910 2005-01-28 18:19:44Z cziegeler $
22  */

23 public class PortalToolFunction implements PortalToolComponent {
24     
25     // Function name (displayed to the user, maybe an i18n-key)
26
private String JavaDoc name ="";
27     // id to access the function
28
private String JavaDoc id ="";
29     // corresponding flow function
30
private String JavaDoc function="";
31     
32     private boolean internal = false;
33     /**
34      * Constructor
35      */

36     public PortalToolFunction() {}
37     
38     /**
39      * Constructor
40      * @param name Function-Name
41      * @param id Id
42      * @param function Corresponding flow functino
43      */

44     public PortalToolFunction(String JavaDoc name, String JavaDoc id, String JavaDoc function) {
45         this.name = name;
46         this.id = id;
47         this.function = function;
48     }
49     
50     /* (non-Javadoc)
51      * @see org.apache.cocoon.portal.tools.PortalToolComponent#getId()
52      */

53     public String JavaDoc getId() {
54         return id;
55     }
56     /* (non-Javadoc)
57      * @see org.apache.cocoon.portal.tools.PortalToolComponent#setId(java.lang.String)
58      */

59     public void setId(String JavaDoc id) {
60         this.id = id;
61     }
62     /* (non-Javadoc)
63      * @see org.apache.cocoon.portal.tools.PortalToolComponent#getName()
64      */

65     public String JavaDoc getName() {
66         return name;
67     }
68     /* (non-Javadoc)
69      * @see org.apache.cocoon.portal.tools.PortalToolComponent#setName(java.lang.String)
70      */

71     public void setName(String JavaDoc name) {
72         this.name = name;
73     }
74     /**
75      * Returns the Functionname
76      * @return
77      */

78     public String JavaDoc getFunction() {
79         return function;
80     }
81     
82     /**
83      * Sets the Functionname
84      * @param path
85      */

86     public void setFunction(String JavaDoc path) {
87         this.function = path;
88     }
89     
90     
91     /**
92      * not in use!
93      * @return
94      */

95     public boolean isInternal() {
96         return internal;
97     }
98     
99     /**
100      * not in use!
101      * @param internal
102      */

103     public void setInternal(boolean internal) {
104         this.internal = internal;
105     }
106 }
107
Popular Tags