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: package org.apache.cocoon.portal.tools;
018:
019: /**
020: * Represents a function the user can call via the ui or the ToolManager
021: *
022: * @version CVS $Id: PortalToolFunction.java 433543 2006-08-22 06:22:54Z crossley $
023: */
024: public class PortalToolFunction implements PortalToolComponent {
025:
026: // Function name (displayed to the user, maybe an i18n-key)
027: private String name = "";
028: // id to access the function
029: private String id = "";
030: // corresponding flow function
031: private String function = "";
032:
033: private boolean internal = false;
034:
035: /**
036: * Constructor
037: */
038: public PortalToolFunction() {
039: }
040:
041: /**
042: * Constructor
043: * @param name Function-Name
044: * @param id Id
045: * @param function Corresponding flow functino
046: */
047: public PortalToolFunction(String name, String id, String function) {
048: this .name = name;
049: this .id = id;
050: this .function = function;
051: }
052:
053: /* (non-Javadoc)
054: * @see org.apache.cocoon.portal.tools.PortalToolComponent#getId()
055: */
056: public String getId() {
057: return id;
058: }
059:
060: /* (non-Javadoc)
061: * @see org.apache.cocoon.portal.tools.PortalToolComponent#setId(java.lang.String)
062: */
063: public void setId(String id) {
064: this .id = id;
065: }
066:
067: /* (non-Javadoc)
068: * @see org.apache.cocoon.portal.tools.PortalToolComponent#getName()
069: */
070: public String getName() {
071: return name;
072: }
073:
074: /* (non-Javadoc)
075: * @see org.apache.cocoon.portal.tools.PortalToolComponent#setName(java.lang.String)
076: */
077: public void setName(String name) {
078: this .name = name;
079: }
080:
081: /**
082: * Returns the Functionname
083: */
084: public String getFunction() {
085: return function;
086: }
087:
088: /**
089: * Sets the Functionname
090: * @param path
091: */
092: public void setFunction(String path) {
093: this .function = path;
094: }
095:
096: /**
097: * not in use!
098: */
099: public boolean isInternal() {
100: return internal;
101: }
102:
103: /**
104: * not in use!
105: * @param internal
106: */
107: public void setInternal(boolean internal) {
108: this.internal = internal;
109: }
110: }
|