Package com.zfabrik.dev.util
Class ComponentCopyTool
java.lang.Object
com.zfabrik.dev.util.ComponentCopyTool
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyComponentResources(String cn, File target, ComponentCopyTool.Mode mode)
Copy a component's resource folder into target.static void
copyComponentToRepositoryFolder(String cn, File target, ComponentCopyTool.Mode mode)
Copy a component into a file system component resource format.static FSCRDBComponent
inspectComponent(String cn)
Inpect a component and create a component repository implementation that holds more meta data.static void
writeProperties(String cn, File targetFolder)
Create a component's property file, if the component has only properties and no resource folder
-
Constructor Details
-
ComponentCopyTool
public ComponentCopyTool()
-
-
Method Details
-
inspectComponent
Inpect a component and create a component repository implementation that holds more meta data. In particular whether there is resources other than properties.- Throws:
IOException
-
copyComponentResources
public static void copyComponentResources(String cn, File target, ComponentCopyTool.Mode mode) throws ExceptionCopy a component's resource folder into target. Depending on the mode setting, source files and folders may be stripped while copying. Note that this operation may trigger a compilation step. This method expects aFSCRDBComponent
object as created frominspectComponent(String)
.- Throws:
Exception
-
writeProperties
Create a component's property file, if the component has only properties and no resource folder- Throws:
Exception
-
copyComponentToRepositoryFolder
public static void copyComponentToRepositoryFolder(String cn, File target, ComponentCopyTool.Mode mode) throws ExceptionCopy a component into a file system component resource format. That is, the component layout will be rebuild in the target folder, as if to be fed into another standard component repository. I.e. if the component has properties only, a file<module>/<component>.properties
will be created, and if the component has resources, the complete folder structure<module>/<component>
will be created. Depending on the mode setting, source files and folders may be stripped while copying. Note that this operation may trigger a Java compilation.- Parameters:
cn
-target
-mode
-- Throws:
Exception
-