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 String
CONTAINER_FILE
static String
CONTAINER_FILE_COMPAT
static String
FRAGMENT_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 void
collectXMLFragments(ContainerDescriptor cd, File file)
protected ContainerDescriptor
getContainer(File home, File file)
Reads a container fragment metadata file and returns the container descriptor.protected ContainerDescriptor
getDefaultContainer(File directory)
protected FragmentDescriptor
getDirectoryFragment(File directory)
protected String
getJarArtifactName(String name)
protected FragmentDescriptor
getJARFragment(File file)
static String
getRelativeChildPath(String parent, String child)
ContainerDescriptor
getRootContainer()
protected String
getSymbolicName(File file)
protected FragmentDescriptor
getXMLFragment(File file)
void
init()
void
init(File metadata, File[] files)
protected void
init(ContainerDescriptor cd)
protected void
init(ContainerDescriptor cd, File dir)
protected void
init(ContainerDescriptor cd, File[] files)
protected void
initContextProperties(CommandContext ctx)
protected static String
listFragmentDescriptor(FragmentDescriptor fd)
static void
main(String[] args)
void
predeploy()
protected static void
predeploy(ContainerDescriptor cd)
protected static void
printInfo(FragmentRegistry fragments)
static void
process(File home, File metadata, File[] files)
Run preprocessing in the given home directory and using the given list of bundles.protected void
processBundleForCompat(FragmentDescriptor fd, File file)
protected void
processFile(ContainerDescriptor cd, File file)
protected void
processManifest(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
-
-