KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmanage > testapp > mbeans > DataFormat


1 /**
2 * Copyright (c) 2004-2005 jManage.org
3 *
4 * This is a free software; you can redistribute it and/or
5 * modify it under the terms of the license at
6 * http://www.jmanage.org.
7 *
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */

14 package org.jmanage.testapp.mbeans;
15
16 /**
17  *
18  *
19  * <p>
20  * Date: Aug 31, 2005
21  * @author Rakesh Kalra
22  */

23 public class DataFormat implements DataFormatMBean{
24
25     String JavaDoc xml1 = "<?xml version=\"1.0\"?>\n\n<root><a>1</a><b>2</b></root>";
26     String JavaDoc xml2 = "<root><a>1</a><b>2</b></root>";
27     String JavaDoc html = "<b>This is a test</b>";
28
29     // test get and set
30
public String JavaDoc getXML() {
31         return xml1;
32     }
33
34     public void setXML(String JavaDoc xml) {
35         this.xml1 = xml;
36     }
37
38     // test read only attribute
39
public String JavaDoc getXMLData() {
40         return xml2;
41     }
42
43     // test operation
44
public String JavaDoc retrieveXMLData() {
45         return xml1;
46     }
47
48     // test get and set
49
public String JavaDoc getHTML() {
50         return html;
51     }
52
53     public void setHTML(String JavaDoc html) {
54         this.html = html;
55     }
56
57     // test read only attribute
58
public String JavaDoc getHTMLData() {
59         return html;
60     }
61
62     // test operation
63
public String JavaDoc retrieveHTMLData() {
64         return html;
65     }
66 }
67
Popular Tags