001: /*
002: * CoadunationAdmin: The admin frontend for coadunation.
003: * Copyright (C) 2007 - 2008 Rift IT Contracting
004: *
005: * This library is free software; you can redistribute it and/or
006: * modify it under the terms of the GNU Lesser General Public
007: * License as published by the Free Software Foundation; either
008: * version 2.1 of the License, or (at your option) any later version.
009: *
010: * This library is distributed in the hope that it will be useful,
011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013: * Lesser General Public License for more details.
014: *
015: * You should have received a copy of the GNU Lesser General Public
016: * License along with this library; if not, write to the Free Software
017: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
018: *
019: * MethodDef.java
020: */
021:
022: // package path
023: package com.rift.coad.web.admin.client;
024:
025: // imports
026: import com.google.gwt.user.client.rpc.IsSerializable;
027:
028: /**
029: * This object represents a method description
030: *
031: * @author brett chaldecott
032: */
033: public class MethodDef implements IsSerializable {
034:
035: // private member variables
036: private String name = null;
037: private String description = null;
038: private VariableDef result = null;
039: private VariableDef[] parameters = null;
040:
041: /**
042: * Creates a new instance of MethodDef
043: */
044: public MethodDef() {
045: }
046:
047: /**
048: * Creates a new instance of MethodDef
049: *
050: * @param name The name of the method.
051: * @param description The description of the method.
052: * @param result The result definition.
053: * @param parameters The parameters.
054: */
055: public MethodDef(String name, String description,
056: VariableDef result, VariableDef[] parameters) {
057: this .name = name;
058: this .description = description;
059: this .result = result;
060: this .parameters = parameters;
061: }
062:
063: /**
064: * This method returns the name of the method.
065: */
066: public String getName() {
067: return name;
068: }
069:
070: /**
071: * This method sets the name of the method.
072: *
073: * @param name The name of the method.
074: */
075: public void setName(String name) {
076: this .name = name;
077: }
078:
079: /**
080: * This method returns the description of this method.
081: *
082: * @return The string containing the description of this method.
083: */
084: public String getDescription() {
085: return description;
086: }
087:
088: /**
089: * This method sets the description of the method.
090: *
091: * @param description The description of this method.
092: */
093: public void setDescription(String description) {
094: this .description = description;
095: }
096:
097: /**
098: * This method returns the result of the variable definition.
099: *
100: * @return The definition of the result.
101: */
102: public VariableDef getResult() {
103: return result;
104: }
105:
106: /**
107: * This method sets the result of method.
108: *
109: * @param result The result of the method.
110: */
111: public void setResult(VariableDef result) {
112: this .result = result;
113: }
114:
115: /**
116: * This method returns the parameter definition information.
117: *
118: * @return The list of parameters.
119: */
120: public VariableDef[] getParameters() {
121: return parameters;
122: }
123:
124: /**
125: * This method sets the parameters of the method.
126: *
127: * @param parameters The list of parameters.
128: */
129: public void setParameters(VariableDef[] parameters) {
130: this.parameters = parameters;
131: }
132: }
|