|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.muse.tools.generator.projectizer.AbstractProjectizer
public abstract class AbstractProjectizer
AbstractProjectizer contains methods that are useful to projectizers built so far.
Field Summary | |
---|---|
protected File |
_targetDirectory
The target base directory in which the projectizer will projectize. |
protected static String |
DEFAULT_RMD_NAME_SUFFIX
|
protected static String |
DEFAULT_WSDL_NAME_SUFFIX
The default extension for WSDL files. |
protected static String |
PLACE_HOLDER
A placeholder in strings that can be replaced with a specific string. |
Constructor Summary | |
---|---|
AbstractProjectizer()
|
Method Summary | |
---|---|
protected void |
checkDirectory(File directory)
Check to make sure that the given directory exists or can be created. |
protected void |
checkParentDirectory(File destination)
Check to make sure that the parent directory of a given file exists or can be created. |
protected void |
copyJars(String[] moduleNames,
File baseModulesDir,
File destDir)
Utility method for copying jars from the Muse distribution. |
protected void |
copyJars(String[] moduleNames,
File baseModulesDir,
File destDir,
FileFilter filter)
|
protected void |
copyStreamCheck(InputStream inputStream,
File destination)
Writes an InputStream to a file provided that
the file doesn't already exist, and if it does then the _overwrite
variable must be set to true. |
protected void |
copyTemplate(File sourceDir,
File destinationDir)
Copies all of the files (recursively) from the source folder into the parent folder. |
protected String |
createClassloadablePath(String directory,
String filename)
|
protected void |
createJavaSources(File javaSourceDir,
Map[] filesMaps)
Given a list of Maps (mapping file names to file contents) write the files to the target directory. |
protected void |
createJavaSources(File javaSourceDir,
Map[] filesMaps,
Set[] ignoreSets)
Given a list of Maps (mapping file names to file contents) write the files to the target directory. |
protected void |
createOverwriteManifest()
Create the overwrite manifest for this projectizer. |
protected void |
createRouterEntries(File routerEntriesDir,
String serviceName,
Map capabilities)
Create a router entry for the given service in the given directory. |
protected String |
getMetadataFileName(String wsdlRelativePath,
Document wsdl)
|
protected String |
getWsdlFileName(String wsdlRelativePath,
Document wsdl)
|
protected String |
loadString(InputStream inputStream,
Object[] filler)
Read an InputStream replacing all occurences of PLACE_HOLDER
with the values provided in the filler. |
protected void |
setTargetDirectory(File targetDirectory,
boolean overwrite)
Set the target directory for this projectizer. |
protected void |
updatePortType(Document wsdl,
MetadataDescriptor metadata,
File metadataFile)
|
protected void |
writeStringtoFile(String string,
File destination)
Write a string to a file without doing any overwrite checks. |
protected void |
writeToFileCheck(Node node,
File destination)
Serializes an XML node and writes it out to a file provided that the file doesn't already exist, and if it does then the _overwrite variable must be set to true. |
protected void |
writeToFileCheck(String string,
File destination)
|
protected void |
writeToFileCheck(String string,
File destination,
boolean overwritable)
Writes a string to a file provided that the file doesn't already exist, and if it does then the _overwrite variable must be set to true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.muse.tools.generator.projectizer.Projectizer |
---|
projectize |
Methods inherited from interface org.apache.muse.tools.generator.util.Configurable |
---|
getConfigurationDataDescriptions |
Field Detail |
---|
protected static final String DEFAULT_WSDL_NAME_SUFFIX
protected static final String DEFAULT_RMD_NAME_SUFFIX
protected static final String PLACE_HOLDER
protected File _targetDirectory
Constructor Detail |
---|
public AbstractProjectizer()
Method Detail |
---|
protected void writeToFileCheck(Node node, File destination) throws Exception
node
- The DOM node to write outdestination
- The file where this should be written
Exception
- If anything goes wrongprotected void writeToFileCheck(String string, File destination) throws Exception
Exception
protected void writeToFileCheck(String string, File destination, boolean overwritable) throws Exception
string
- The string to write outdestination
- The file where this should be writtenoverwritable
- Flag to see if this filename should be passed to the OverwriteHelper
Exception
- If anything goes wrongprotected void copyStreamCheck(InputStream inputStream, File destination) throws Exception
InputStream
to a file provided that
the file doesn't already exist, and if it does then the _overwrite
variable must be set to true.
inputStream
- The InputStream
to write outdestination
- The file where this should be written
Exception
- If anything goes wrongprotected String loadString(InputStream inputStream, Object[] filler) throws Exception
InputStream
replacing all occurences of PLACE_HOLDER
with the values provided in the filler.
inputStream
- The source inputfiller
- The filler for the string template
Exception
- If anything goes wrongprotected void copyTemplate(File sourceDir, File destinationDir) throws Exception
sourceDir
- The source folderdestinationDir
- The destination, ie what the folder will be called
Exception
protected void createRouterEntries(File routerEntriesDir, String serviceName, Map capabilities) throws Exception
routerEntriesDir
- The directory where the router entries should be createdserviceName
- The name of the service
Exception
- If anything goes wrongprotected void createJavaSources(File javaSourceDir, Map[] filesMaps) throws Exception
javaSourceDir
- The target directoryfilesMaps
- A list of Maps which map file names to file content
Exception
- If anything goes wrongprotected void createJavaSources(File javaSourceDir, Map[] filesMaps, Set[] ignoreSets) throws Exception
javaSourceDir
- The target directoryfilesMaps
- A list of Maps which map file names to file contentignoreSets
- A list of sets of files to not include in the overwrite manifest
Exception
- If anything goes wrongprotected void copyJars(String[] moduleNames, File baseModulesDir, File destDir) throws Exception
moduleNames
- The modules to copybaseModulesDir
- The location where the modules residedestDir
- The destination directory
IOException
- If anything goes wrong
Exception
protected void copyJars(String[] moduleNames, File baseModulesDir, File destDir, FileFilter filter) throws Exception
Exception
protected void writeStringtoFile(String string, File destination) throws Exception
string
- The string to writedestination
- The file into which to write the string
Exception
protected void checkParentDirectory(File destination) throws Exception
destination
- Target file to check
Exception
protected void checkDirectory(File directory) throws Exception
directory
- Target directory to check
Exception
protected void setTargetDirectory(File targetDirectory, boolean overwrite)
targetDirectory
- The target directory for the projectizeroverwrite
- Flag to determine if every conflicting file should be overwrittenprotected void createOverwriteManifest() throws Exception
Exception
protected String getWsdlFileName(String wsdlRelativePath, Document wsdl)
protected String getMetadataFileName(String wsdlRelativePath, Document wsdl)
protected String createClassloadablePath(String directory, String filename)
protected void updatePortType(Document wsdl, MetadataDescriptor metadata, File metadataFile)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |