KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > servicemix > jbi > deployment > Descriptor


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.servicemix.jbi.deployment;
18
19 /**
20  * @version $Revision: 426415 $
21  */

22 public class Descriptor {
23     private double version;
24     private Component component;
25     private SharedLibrary sharedLibrary;
26     private ServiceAssembly serviceAssembly;
27     private Services services;
28
29     public double getVersion() {
30         return version;
31     }
32
33     public void setVersion(double version) {
34         this.version = version;
35     }
36
37     public Component getComponent() {
38         return component;
39     }
40
41     public void setComponent(Component component) {
42         this.component = component;
43     }
44
45     public SharedLibrary getSharedLibrary() {
46         return sharedLibrary;
47     }
48
49     public void setSharedLibrary(SharedLibrary sharedLibrary) {
50         this.sharedLibrary = sharedLibrary;
51     }
52
53     public ServiceAssembly getServiceAssembly() {
54         return serviceAssembly;
55     }
56
57     public void setServiceAssembly(ServiceAssembly serviceAssembly) {
58         this.serviceAssembly = serviceAssembly;
59     }
60
61     public Services getServices() {
62         return services;
63     }
64
65     public void setServices(Services services) {
66         this.services = services;
67     }
68 }
69
70 /*
71 default namespace this = "http://java.sun.com/xml/ns/jbi"
72 start =
73   element jbi {
74     attribute version { xsd:decimal },
75     ( component | shared-library | service-assembly | services)
76   }
77 component =
78   element component {
79     attribute type { "service-engine" | "binding-component" },
80     attribute component-class-loader-delegation { "parent-first" | "self-first" }?,
81     attribute bootstrap-class-loader-delegation { "parent-first" | "self-first" }?,
82     identification,
83     element component-class-name { attribute description { text }?, text },
84     element component-class-path { class-path },
85     element bootstrap-class-name { text },
86     element bootstrap-class-path { class-path },
87     shared-library-list*,
88     element* -this:* { text }*
89   }
90 shared-library =
91   element shared-library {
92     attribute class-loader-delegation { "parent-first" | "self-first" }?,
93     attribute version { text }?,
94     identification,
95     element shared-library-class-path { class-path }
96   }
97 shared-library-list =
98   element shared-library {
99     attribute version { text }?,
100     text
101   }
102 service-assembly =
103   element service-assembly {
104     identification,
105     service-unit*,
106     connections?,
107     element* -this:* { text }*
108   }
109 service-unit =
110   element service-unit {
111     identification,
112     element target {
113       element artifacts-zip { text },
114       element component-name { xsd:NCName }
115     },
116     element* -this:* { text }*
117   }
118 identification =
119   element identification {
120     element name { xsd:NCName },
121     element description { text },
122     element* -this:* { text }*
123  }
124 class-path =
125   (element path-element { text })+
126 services =
127   element services {
128     attribute binding-component { xsd:boolean },
129     provides*,
130     consumes*,
131     element* -this:* { text }*
132   }
133 connections =
134   element connections {
135     element connection {
136       element consumer {
137         ( attribute interface-name { xsd:QName } |
138           (attribute service-name { xsd:QName }, attribute endpoint-name { text })
139         )
140       },
141       element provider {
142         attribute service-name { xsd:QName }, attribute endpoint-name { text }
143       }
144     }*,
145     element* -this:* { text }*
146   }
147 provides =
148   element provides {
149     attribute interface-name { xsd:QName },
150     attribute service-name {xsd:QName }, attribute endpoint-name { text },
151     element* -this:* { text }*
152   }
153 consumes =
154   element consumes {
155     attribute interface-name { xsd:QName },
156     ( attribute service-name {xsd:QName }, attribute endpoint-name { text },
157       attribute link-type { "standard" | "hard" | "soft" }? )?,
158     element* -this:* { text }*
159   }
160 */

161
Popular Tags