Class DeploymentPreprocessor
- java.lang.Object
-
- org.nuxeo.runtime.deployment.preprocessor.DeploymentPreprocessor
-
public class DeploymentPreprocessor extends Object
Initializer for the deployment skeleton, taking care of creating templates, aggregating default components before runtime is started.- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTAINER_FILEstatic StringCONTAINER_FILE_COMPATstatic StringFRAGMENT_FILE
-
Constructor Summary
Constructors Constructor Description DeploymentPreprocessor(File dir)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcollectXMLFragments(ContainerDescriptor cd, File file)protected ContainerDescriptorgetContainer(File home, File file)Reads a container fragment metadata file and returns the container descriptor.protected ContainerDescriptorgetDefaultContainer(File directory)protected FragmentDescriptorgetDirectoryFragment(File directory)protected StringgetJarArtifactName(String name)protected FragmentDescriptorgetJARFragment(File file)static StringgetRelativeChildPath(String parent, String child)ContainerDescriptorgetRootContainer()protected StringgetSymbolicName(File file)protected FragmentDescriptorgetXMLFragment(File file)voidinit()voidinit(File metadata, File[] files)protected voidinit(ContainerDescriptor cd)protected voidinit(ContainerDescriptor cd, File dir)protected voidinit(ContainerDescriptor cd, File[] files)protected voidinitContextProperties(CommandContext ctx)protected static StringlistFragmentDescriptor(FragmentDescriptor fd)static voidmain(String[] args)voidpredeploy()protected static voidpredeploy(ContainerDescriptor cd)protected static voidprintInfo(FragmentRegistry fragments)static voidprocess(File home, File metadata, File[] files)Run preprocessing in the given home directory and using the given list of bundles.protected voidprocessBundleForCompat(FragmentDescriptor fd, File file)protected voidprocessFile(ContainerDescriptor cd, File file)protected voidprocessManifest(FragmentDescriptor fd, String fileName, Manifest mf)
-
-
-
Field Detail
-
FRAGMENT_FILE
public static final String FRAGMENT_FILE
- See Also:
- Constant Field Values
-
CONTAINER_FILE
public static final String CONTAINER_FILE
- See Also:
- Constant Field Values
-
CONTAINER_FILE_COMPAT
public static final String CONTAINER_FILE_COMPAT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DeploymentPreprocessor
public DeploymentPreprocessor(File dir)
-
-
Method Detail
-
getRootContainer
public ContainerDescriptor getRootContainer()
-
init
public void init() throws IOException- Throws:
IOException
-
init
public void init(File metadata, File[] files) throws IOException
- Throws:
IOException
-
init
protected void init(ContainerDescriptor cd) throws IOException
- Throws:
IOException
-
initContextProperties
protected void initContextProperties(CommandContext ctx)
-
processFile
protected void processFile(ContainerDescriptor cd, File file) throws IOException
- Throws:
IOException
-
init
protected void init(ContainerDescriptor cd, File[] files) throws IOException
- Throws:
IOException
-
init
protected void init(ContainerDescriptor cd, File dir) throws IOException
- Throws:
IOException
-
predeploy
public void predeploy() throws IOException- Throws:
IOException
-
listFragmentDescriptor
protected static String listFragmentDescriptor(FragmentDescriptor fd)
-
printInfo
protected static void printInfo(FragmentRegistry fragments)
-
predeploy
protected static void predeploy(ContainerDescriptor cd) throws IOException
- Throws:
IOException
-
getXMLFragment
protected FragmentDescriptor getXMLFragment(File file) throws IOException
- Throws:
IOException
-
collectXMLFragments
protected void collectXMLFragments(ContainerDescriptor cd, File file) throws IOException
- Throws:
IOException
-
processBundleForCompat
protected void processBundleForCompat(FragmentDescriptor fd, File file)
-
getDirectoryFragment
protected FragmentDescriptor getDirectoryFragment(File directory) throws IOException
- Throws:
IOException
-
getJARFragment
protected FragmentDescriptor getJARFragment(File file) throws IOException
- Throws:
IOException
-
processManifest
protected void processManifest(FragmentDescriptor fd, String fileName, Manifest mf)
-
getContainer
protected ContainerDescriptor getContainer(File home, File file) throws IOException
Reads a container fragment metadata file and returns the container descriptor.- Throws:
IOException
-
getDefaultContainer
protected ContainerDescriptor getDefaultContainer(File directory) throws IOException
- Throws:
IOException
-
process
public static void process(File home, File metadata, File[] files) throws IOException
Run preprocessing in the given home directory and using the given list of bundles. Bundles must be ordered by the caller to have same deployment order on all computers.The metadata file is the metadat file to be used to configure the processor. If null the default location will be used (relative to home):
CONTAINER_FILE.- Throws:
IOException
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-