|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas_ws.wsgen.AbsConfigGenerator
This class realizes configuration files generation.
This class implements genEndpointConfig & genClientConfig methods;
configuration methods stay abstract (WS implementation specific).
A class is created for each WS Engine for example, a new class
called GlueConfigGenerator for Glue integration.
Field Summary | |
protected GenerationContext |
gCtx
GenerationContext |
protected static org.objectweb.util.monolog.api.Logger |
logger
WsGen logger |
Fields inherited from interface org.objectweb.jonas_ws.wsgen.ConfigGenerator |
DEBUG, DEBUG_DEFAULT, DEFAULT_MAPPING, JAVAC_NAME, JAVAC_NAME_DEFAULT, JAVAC_OPTS, KEEP_GEN, KEEP_GEN_DEFAULT, NO_CONFIG, NO_CONFIG_DEFAULT, PARSING_VAL, SERVLET_CLASS, SERVLET_NAME, VERBOSE, VERBOSE_DEFAULT |
Constructor Summary | |
AbsConfigGenerator(GenerationContext ctx)
Constructor : creates a AbsConfigGenerator object. |
Method Summary | |
protected static void |
addJavaSources(java.io.File dir,
java.util.Vector srcs)
Add all *.java files from directory into Vector. |
void |
clean()
Remove temp directories. |
protected void |
compileDir(java.io.File srcDir,
java.io.File destDir)
Compile Java sources files of directory. |
protected void |
configureClient()
configureClient has to be implemented in subClass. |
protected void |
configureEjbJarEndpoint()
configureEjbJarEndpoint has to be implemented in subClass. |
protected void |
configureWebAppEndpoint()
configureWebAppEndpoint has to be implemented in subClass. |
protected static boolean |
destroyFile(java.io.File file)
Recursively destroy the given file. |
protected void |
destroyTempDirectories()
Destroy the temporary directory used for generation. |
protected void |
genClientFiles(ServiceRef[] servRefs)
Generate client files for a set of ServiceRef. |
void |
genEjbJarClientConfig(EjbJarManager jm,
java.util.Iterator bdIt)
Generate client configuration files for each ServiceRef of bean descs. |
void |
genEjbJarEndpointConfig(WarManager wm,
WSDeploymentDesc dd)
Generate endpoint configuration files for the set of ServiceDesc included in WSDeploymentDesc contained in an EjbJar. |
void |
genWebAppClientConfig(WarManager wm,
ServiceRef[] servRefs)
Generate client configuration files for the list of ServiceRef of a War. |
void |
genWebAppEndpointConfig(WarManager wm,
WSDeploymentDesc dd)
Generate endpoint configuration files for the set of ServiceDesc included in WSDeploymentDesc contained in a WebApp. |
protected java.io.File |
getClientGenDir(java.lang.String id)
Return the generation directory from ID |
protected java.io.File |
getEjbJarEndpointGenDir(java.lang.String id)
Return the generation directory from ID |
protected java.lang.String |
getProcessingID()
Return the processing ID from GenerationContext. |
protected java.io.File |
getWebAppEndpointGenDir(java.lang.String id)
Return the generation directory from ID |
protected boolean |
isDebug()
return true if debug mode is set. |
protected boolean |
isKeepGenerated()
return true if keep generated files mode is set. |
protected boolean |
isNoConfig()
return true if noConfig mode is set. |
protected boolean |
isVerbose()
return true if verbose mode is set. |
protected void |
trace(java.lang.String msg)
Display the specified message only if verbose. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.objectweb.util.monolog.api.Logger logger
protected GenerationContext gCtx
Constructor Detail |
public AbsConfigGenerator(GenerationContext ctx)
ctx
- GenerationContext storing propertiesMethod Detail |
public void genWebAppEndpointConfig(WarManager wm, WSDeploymentDesc dd) throws WsGenException
genWebAppEndpointConfig
in interface ConfigGenerator
wm
- the managed war file.dd
- The DeploymentDesc to process (image of a webservices.xml)
WsGenException
- if generation failspublic void genEjbJarEndpointConfig(WarManager wm, WSDeploymentDesc dd) throws WsGenException
genEjbJarEndpointConfig
in interface ConfigGenerator
wm
- the war file dispatching request on EJBs endpoint.dd
- The DeploymentDesc to process (image of a webservices.xml)
WsGenException
- if generation failsprotected static void addJavaSources(java.io.File dir, java.util.Vector srcs) throws WsGenException
dir
- directory containing source files.srcs
- Vector updates with source files.
WsGenException
- when IOException occurs.protected void compileDir(java.io.File srcDir, java.io.File destDir) throws WsGenException
srcDir
- File representing source directory.destDir
- File representing destination directory.
WsGenException
- when compilation fails.protected void genClientFiles(ServiceRef[] servRefs) throws WsGenException
servRefs
- an Array of ServiceRef.
WsGenException
- when configureClient fails.public void genEjbJarClientConfig(EjbJarManager jm, java.util.Iterator bdIt) throws WsGenException
genEjbJarClientConfig
in interface ConfigGenerator
jm
- the jar file containing clients.bdIt
- an iterator on a bean desc list
WsGenException
- if generation failspublic void genWebAppClientConfig(WarManager wm, ServiceRef[] servRefs) throws WsGenException
genWebAppClientConfig
in interface ConfigGenerator
wm
- the managed war file.servRefs
- The list of ServiceRef to process.
WsGenException
- if generation failsprotected static boolean destroyFile(java.io.File file)
file
- the file to destroy.
protected void destroyTempDirectories()
protected java.lang.String getProcessingID()
protected java.io.File getWebAppEndpointGenDir(java.lang.String id)
id
- processing id
protected java.io.File getEjbJarEndpointGenDir(java.lang.String id)
id
- processing id
protected java.io.File getClientGenDir(java.lang.String id)
id
- processing id
protected void configureWebAppEndpoint() throws WsGenException
WsGenException
- if generation fails if the method isn't implementedprotected void configureEjbJarEndpoint() throws WsGenException
WsGenException
- if generation fails if the method isn't implementedprotected void configureClient() throws WsGenException
WsGenException
- if generation fails if the method isn't implementedprotected void trace(java.lang.String msg)
msg
- the message to displayprotected boolean isVerbose()
protected boolean isDebug()
protected boolean isNoConfig()
protected boolean isKeepGenerated()
public void clean()
clean
in interface ConfigGenerator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |