KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > config > serverbeans > ResponsePolicy


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23  
24 /**
25  * This generated bean class ResponsePolicy matches the DTD element response-policy
26  *
27  */

28
29 package com.sun.enterprise.config.serverbeans;
30
31 import org.w3c.dom.*;
32 import org.netbeans.modules.schema2beans.*;
33 import java.beans.*;
34 import java.util.*;
35 import java.io.Serializable JavaDoc;
36 import com.sun.enterprise.config.ConfigBean;
37 import com.sun.enterprise.config.ConfigException;
38 import com.sun.enterprise.config.StaleWriteConfigException;
39 import com.sun.enterprise.util.i18n.StringManager;
40
41 // BEGIN_NOI18N
42

43 public class ResponsePolicy extends ConfigBean implements Serializable JavaDoc
44 {
45
46     static Vector comparators = new Vector();
47     private static final org.netbeans.modules.schema2beans.Version runtimeVersion = new org.netbeans.modules.schema2beans.Version(4, 2, 0);
48
49
50     public ResponsePolicy() {
51         this(Common.USE_DEFAULT_VALUES);
52     }
53
54     public ResponsePolicy(int options)
55     {
56         super(comparators, runtimeVersion);
57         // Properties (see root bean comments for the bean graph)
58
initPropertyTables(0);
59         this.initialize(options);
60     }
61
62     // Setting the default values of the properties
63
void initialize(int options) {
64
65     }
66
67     /**
68     * Getter for AuthSource of the Element response-policy
69     * @return the AuthSource of the Element response-policy
70     */

71     public String JavaDoc getAuthSource() {
72             return getAttributeValue(ServerTags.AUTH_SOURCE);
73     }
74     /**
75     * Modify the AuthSource of the Element response-policy
76     * @param v the new value
77     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
78     */

79     public void setAuthSource(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
80         setAttributeValue(ServerTags.AUTH_SOURCE, v, overwrite);
81     }
82     /**
83     * Modify the AuthSource of the Element response-policy
84     * @param v the new value
85     */

86     public void setAuthSource(String JavaDoc v) {
87         setAttributeValue(ServerTags.AUTH_SOURCE, v);
88     }
89     /**
90     * Getter for AuthRecipient of the Element response-policy
91     * @return the AuthRecipient of the Element response-policy
92     */

93     public String JavaDoc getAuthRecipient() {
94             return getAttributeValue(ServerTags.AUTH_RECIPIENT);
95     }
96     /**
97     * Modify the AuthRecipient of the Element response-policy
98     * @param v the new value
99     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
100     */

101     public void setAuthRecipient(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
102         setAttributeValue(ServerTags.AUTH_RECIPIENT, v, overwrite);
103     }
104     /**
105     * Modify the AuthRecipient of the Element response-policy
106     * @param v the new value
107     */

108     public void setAuthRecipient(String JavaDoc v) {
109         setAttributeValue(ServerTags.AUTH_RECIPIENT, v);
110     }
111     /**
112     * get the xpath representation for this element
113     * returns something like abc[@name='value'] or abc
114     * depending on the type of the bean
115     */

116     protected String JavaDoc getRelativeXPath() {
117         String JavaDoc ret = null;
118         ret = "response-policy";
119         return (null != ret ? ret.trim() : null);
120     }
121
122     /*
123     * generic method to get default value from dtd
124     */

125     public static String JavaDoc getDefaultAttributeValue(String JavaDoc attr) {
126         if(attr == null) return null;
127         attr = attr.trim();
128     return null;
129     }
130     //
131
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
132         comparators.add(c);
133     }
134
135     //
136
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
137         comparators.remove(c);
138     }
139     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
140     }
141
142     // Dump the content of this bean returning it as a String
143
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
144         String JavaDoc s;
145         Object JavaDoc o;
146         org.netbeans.modules.schema2beans.BaseBean n;
147     }
148     public String JavaDoc dumpBeanNode(){
149         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
150         str.append("ResponsePolicy\n"); // NOI18N
151
this.dump(str, "\n "); // NOI18N
152
return str.toString();
153     }}
154
155 // END_NOI18N
156

157
Popular Tags