KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > AdminObject


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 package com.sun.enterprise.deployment;
25
26 import java.util.*;
27
28 /**
29  * <!ELEMENT adminobject (adminobject-interface, adminobject-class, config-property*)>
30  *
31  * @author Qingqing Ouyang
32  * @author Sheetal Vartak
33  */

34 public class AdminObject extends Descriptor {
35     
36     private String JavaDoc theInterface;
37     private String JavaDoc theClass;
38     private Set configProperties;
39
40     private boolean isDirty = false;
41
42     public AdminObject () {
43         this.configProperties = new OrderedSet();
44     }
45     
46     public AdminObject (String JavaDoc theInterface, String JavaDoc theClass)
47     {
48         this.theInterface = theInterface;
49         this.theClass = theClass;
50         this.configProperties = new OrderedSet();
51     }
52     
53     public String JavaDoc getAdminObjectInterface()
54     {
55         return this.theInterface;
56     }
57
58     public void setAdminObjectInterface (String JavaDoc intf) {
59     this.theInterface = intf;
60     }
61
62     public String JavaDoc getAdminObjectClass()
63     {
64         return this.theClass;
65     }
66
67     public void setAdminObjectClass (String JavaDoc cl) {
68     this.theClass = cl;
69     }
70
71     /**
72      * Set of EnvironmentProperty
73      */

74     public Set getConfigProperties()
75     {
76         return configProperties;
77     }
78       
79     /**
80      * Add a configProperty to the set
81      */

82     public void addConfigProperty(EnvironmentProperty configProperty)
83     {
84     this.configProperties.add(configProperty);
85     this.setDirty();
86     this.changed();
87     }
88
89     /**
90      * Add a configProperty to the set
91      */

92     public void removeConfigProperty(EnvironmentProperty configProperty)
93     {
94     this.configProperties.remove(configProperty);
95     this.setDirty();
96     this.changed();
97     }
98
99     public boolean isDirty()
100     {
101     return this.isDirty;
102     }
103     
104     public void changed()
105     {
106     super.changed();
107     }
108
109     private void setDirty() {
110         this.isDirty = true;
111     }
112 }
113
Popular Tags