01: // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
02: // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
03: // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
04: // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
05: // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
06: // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
07: // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
08: // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
09: // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
10: // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
11: // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
12: // POSSIBILITY OF SUCH DAMAGE.
13: //
14: // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
15: package com.metaboss.sdlctools.services.codegeneration;
16:
17: import com.metaboss.enterprise.bs.BSException;
18:
19: /** This interface offers operations dealing with code generation of the service
20: * proxies layer. Proxy is a plugin mechanism, which is both implementor of the interface and user
21: * of the same interface. Using JNDI mapping configuration it is possible to "plug in" proxy
22: * code in between service client and service implementation. Such proxy for example may
23: * be used to write operations invocations log file or provide secure fence around operations.
24: * This generator should assume that service interface has been generated elsewhere and can be obtained via
25: * JNDI lookup. */
26: public interface BSServiceProxyGenerator {
27: /** Naming URL of the component */
28: public static final String COMPONENT_URL = "component:/com.metaboss.sdlctools.services.codegeneration.BSServiceProxyGenerator";
29:
30: /** Generates service proxy implementation sourcecode for the particular service within particular enterprise
31: * @param pGenerationDirectoryPath directory to generate code to
32: * @param pServiceRef service to generate proxy code for */
33: public void generateSourceCodeForService(
34: String pGenerationDirectoryPath, String pServiceRef)
35: throws BSException;
36:
37: /** Generates service proxy implementation sourcecode for the particular whole servciemodule within particular enterprise
38: * @param pGenerationDirectoryPath directory to generate code to
39: * @param pServicemoduleRef servicemodule to generate proxy code for */
40: public void generateSourceCodeForServicemodule(
41: String pGenerationDirectoryPath, String pServiceModuleRef)
42: throws BSException;
43:
44: /** Returns the name of the package where proxy implementation code is generated to
45: * @param pServiceRef service the proxy associated with */
46: public String getPackageNameForService(String pServiceRef)
47: throws BSException;
48:
49: /** Returns the name of the root package where proxy implementation code is generated to
50: * @param pServicemoduleRef service the proxy associated with */
51: public String getPackageNameForServicemodule(
52: String pServicemoduleRef) throws BSException;
53:
54: /** @return array of names of adapters, which are required by this adapter,
55: * may be null or zero length array if this proxy generator is not relying on any adapter. */
56: public String[] getRequiredAdapters() throws BSException;
57: }
|