KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > action > ParameterDefinitionImpl


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.repo.action;
18
19 import java.io.Serializable JavaDoc;
20
21 import org.alfresco.service.cmr.action.ParameterDefinition;
22 import org.alfresco.service.namespace.QName;
23
24 /**
25  * Parameter definition implementation class.
26  *
27  * @author Roy Wetherall
28  */

29 public class ParameterDefinitionImpl implements ParameterDefinition, Serializable JavaDoc
30 {
31     /**
32      * Serial version UID
33      */

34     private static final long serialVersionUID = 3976741384558751799L;
35
36     /**
37      * The name of the parameter
38      */

39     private String JavaDoc name;
40     
41     /**
42      * The type of the parameter
43      */

44     private QName type;
45     
46     /**
47      * The display label
48      */

49     private String JavaDoc displayLabel;
50     
51     /**
52      * Indicates whether it is mandatory for the parameter to be set
53      */

54     private boolean isMandatory = false;
55
56     /**
57      * Constructor
58      *
59      * @param name the name of the parameter
60      * @param type the type of the parameter
61      * @param displayLabel the display label
62      */

63     public ParameterDefinitionImpl(
64             String JavaDoc name,
65             QName type,
66             boolean isMandatory,
67             String JavaDoc displayLabel)
68     {
69         this.name = name;
70         this.type = type;
71         this.displayLabel = displayLabel;
72         this.isMandatory = isMandatory;
73     }
74     
75     /**
76      * @see org.alfresco.service.cmr.action.ParameterDefinition#getName()
77      */

78     public String JavaDoc getName()
79     {
80         return this.name;
81     }
82
83     /**
84      * @see org.alfresco.service.cmr.action.ParameterDefinition#getType()
85      */

86     public QName getType()
87     {
88         return this.type;
89     }
90     
91     /**
92      * @see org.alfresco.service.cmr.action.ParameterDefinition#isMandatory()
93      */

94     public boolean isMandatory()
95     {
96         return this.isMandatory;
97     }
98
99     /**
100      * @see org.alfresco.service.cmr.action.ParameterDefinition#getDisplayLabel()
101      */

102     public String JavaDoc getDisplayLabel()
103     {
104         return this.displayLabel;
105     }
106 }
107
Popular Tags