KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ve > luz > ica > jackass > deploy > util > Component


1 /*
2  * Copyright (c) 2003 by The Jackass Team
3  * Licensed under the Open Software License version 2.0
4  */

5 package ve.luz.ica.jackass.deploy.util;
6
7 import ve.luz.ica.jackass.deploy.descriptor.ica.ComponentIcaType;
8 import ve.luz.ica.jackass.deploy.descriptor.standard.ComponentType;
9 import ve.luz.ica.jackass.deploy.descriptor.standard.NameContext;
10
11 /**
12  * Component allows access to the information stored in the deployment descriptors.
13  * This class is a wrapper around the ComponentType and IcaComponentType classes
14  * generated by Castor.
15  * @author Carlos Arévalo
16  */

17 public class Component
18 {
19     private ComponentType component = null;
20     private ComponentIcaType icaComponent = null;
21
22     /**
23      * Class constructor
24      * @param comp the ComponentType object generated by Castor
25      * @param icaComp The ComponentIcaType object generated by Castor
26      */

27     public Component(ComponentType comp, ComponentIcaType icaComp)
28     {
29         component = comp;
30         icaComponent = icaComp;
31     }
32
33     /**
34      * Returns the standard component as generated by Castor
35      * @return the wrapped component
36      */

37     public ComponentType getStandardComponent()
38     {
39         return this.component;
40     }
41
42     /**
43      * Returns the ica component as generated by Castor
44      * @return the wrapped ica component
45      */

46     public ComponentIcaType getIcaComponent()
47     {
48         return this.icaComponent;
49     }
50
51     /**
52      * Returns the value of field 'name'.
53      *
54      * @return the value of field 'name'.
55      */

56     public java.lang.String JavaDoc getName()
57     {
58         return this.component.getName();
59     } //-- java.lang.String getName()
60

61     /**
62      * Returns the value of field 'nameContext'.
63      *
64      * @return the value of field 'nameContext'.
65      */

66     public String JavaDoc getNameContext()
67     {
68         NameContext nc = component.getNameContext();
69         return nc == null ? null : nc.getValue();
70     } //-- ve.luz.ica.jackass.deploy.descriptor.standard.NameContext getNameContext()
71

72     /**
73      * Returns the component interface
74      * @return the component interface
75      */

76     public String JavaDoc getInterface()
77     {
78         return this.component.getInterface().getValue();
79     }
80
81     /**
82      * Returns the component implementation
83      * @return the component implementation
84      */

85     public String JavaDoc getImplementation()
86     {
87         return this.component.getImplementation().getValue();
88     }
89
90     /**
91      * Returns the value of field 'properties'.
92      *
93      * @return the value of field 'properties'.
94      */

95     public ve.luz.ica.jackass.deploy.descriptor.standard.Properties getProperties()
96     {
97         return this.component.getProperties();
98     } //-- ve.luz.ica.jackass.deploy.descriptor.standard.Properties getProperties()
99

100
101     /**
102      * Returns the value of field 'deploymentGroup'.
103      *
104      * @return the value of field 'deploymentGroup'.
105      */

106     public String JavaDoc getDeploymentGroup()
107     {
108         return this.icaComponent.getDeploymentGroup().getValue();
109     } //-- ve.luz.ica.jackass.deploy.descriptor.ica.DeploymentGroup getDeploymentGroup()
110

111     /**
112      * Returns the component's deployement requirements as they apear in the deployment descriptor
113      * The list of deployment requirements
114      * @return the component's deployment requirements
115      */

116     public ve.luz.ica.jackass.deploy.descriptor.ica.DeploymentRequirements getDeploymentRequirements()
117     {
118         return this.icaComponent.getDeploymentRequirements();
119     } //-- ve.luz.ica.jackass.deploy.descriptor.ica.DeploymentRequirements[] getDeploymentRequirements()
120

121 }
122
Popular Tags