public class DeploymentUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DeploymentUtil.ComponentDeploymentMessageSummary
Creates a summary about the deployment process for the component
|
static class |
DeploymentUtil.DeploymentMessageSummary<T extends lumis.portal.deployment.DeploymentMessage,O>
Abstract class for deployment message summary.
|
static class |
DeploymentUtil.ModuleDeploymentMessageSummary
Creates a summary about the deployment process for the module
|
Modifier and Type | Field and Description |
---|---|
static String |
DEPLOY_FOLDER_NAME |
static String |
INSTALLED_MODULES_FOLDER
Folder that the modules files are stored.
|
static String |
META_INF_LUMIS_MODULE_XML |
static String |
META_INF_LUMIS_PACKAGE_NAME |
static String |
META_INF_LUMIS_PACKAGE_XML |
static Pattern |
PATTERN_INVALID_CHARACTERS_FILE_NAME
Pattern that determines whether the characters in the module id are invalid.
|
static String |
TEMP_JAR_MODULE_SUFIX |
static String |
TO_BE_DELETE_JAR_MODULE_SUFIX |
Constructor and Description |
---|
DeploymentUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
clearStylesCache(Collection<String> stylesPath)
Clears the cache of the styles with the given paths.
|
static void |
copyJarsInPackageToDeploymentFolder(IFile rootFile)
Copy recursively the files stored on the temp folder to the deployment final folder.
|
static void |
copyModuleToDeploymentFolder(IFile moduleFile,
String moduleId,
ModuleDiff diff)
Copy recursively the files stored on the temp folder to the deployment final folder.
|
static void |
copyPublicFiles(File portalFile,
File baseFolder)
Copies all public files from the given component public file path to each website.
|
static void |
copyPublicFiles(File portalFile,
File baseFolder,
IWebsite website)
Copies all public files from the given component public file path to the static directory of the given website.
|
static void |
copyPublicFiles(String componentPublicFilesPath,
JarFile moduleFile)
Copies all public files from the given component public file path to each website.
|
static void |
copyPublicFiles(String componentPublicFilesPath,
JarFile moduleFile,
Collection<IWebsite> websites)
Copies all public files from the given component public file path to the given website only.
|
static void |
createChannelComponent(String name,
String channelId,
String exportToPath,
IModule module,
IFile componentDefinitionFile,
ITransaction transaction) |
static void |
deletePublicFiles(Set<String> componentPublicFilesPaths)
Deletes the given files from public folder.
|
static void |
deletePublicFiles(Set<String> componentPublicFilesPaths,
IWebsite website)
Deletes the given files from public folder for the given website.
|
static Set<String> |
getAllAvailableResources()
Returns all available resources of all deployed modules.
|
static File |
getComponentFile(IComponent component)
Utility method to obtain an archive file relative to a component.
|
static File |
getComponentFile(IComponent component,
ComponentFolder folder)
Returns the relative folder path within a component.
|
static String |
getComponentPathById(String id)
Returns the component path by it's id.
|
static String |
getComponentPathById(String id,
boolean withStartSlash)
Returns the component path by it's id.
|
static Document |
getModuleDefinitionFromJarModule(File moduleFile)
Returns the module descriptor for a module JAR file.
|
static File |
getModuleFile(IModule module)
Utility method to obtain an archive file relative to a module.
|
static File |
getModuleFile(IModule module,
ModuleType moduleType)
Utility method to obtain an archive file relative to a module.
|
static LocalDataFile |
getModuleLocalDataFile(IModule module)
Utility method to obtain an archive file relative to a module.
|
static LocalDataFile |
getModuleLocalDataFile(String moduleId)
Utility method to obtain an archive file relative to a module.
|
static String |
getModuleRelativePath(IModule module)
Returns the module's relative file path.
|
static String |
getModuleRelativePath(String moduleId)
Returns the module's relative file path.
|
static File |
getNewVersionModuleFile(IModule module)
Utility method to obtain the new version of the archive file relative to a module.
|
static LocalDataFile |
getNewVersionModuleLocalDataFile(IModule module)
Utility method to obtain the new version of the archive file relative to a module.
|
static String |
getNewVersionModuleRelativePath(IModule module)
Returns the module's new version relative file path.
|
static File |
getOldVersionModuleFile(IModule module)
Utility method to obtain the old version of the archive file relative to a module.
|
static LocalDataFile |
getOldVersionModuleLocalDataFile(IModule module)
Utility method to obtain the old version of the archive file relative to a module.
|
static String |
getOldVersionModuleRelativePath(IModule module)
Returns the module's old version relative file path.
|
static Set<String> |
getResourcesOfModule(IModule module)
Returns all available resources of a given module.
|
static Collection<String> |
readAllStylesFromModule(IModule module)
Returns all styles present in the given module.
|
static Collection<String> |
readAllStylesFromModule(IModule module,
File moduleFile)
Returns all styles present in the given module.
|
static ClusterMirroredLocalDataFile |
renameTempPortalFileToFinalModulePortalFile(LocalDataFile tempPortalFile)
Renames the temp module file to the unique module file name.
|
public static final Pattern PATTERN_INVALID_CHARACTERS_FILE_NAME
public static final String META_INF_LUMIS_PACKAGE_NAME
public static final String META_INF_LUMIS_PACKAGE_XML
public static final String INSTALLED_MODULES_FOLDER
public static final String DEPLOY_FOLDER_NAME
public static final String TEMP_JAR_MODULE_SUFIX
public static final String TO_BE_DELETE_JAR_MODULE_SUFIX
public static final String META_INF_LUMIS_MODULE_XML
public static String getComponentPathById(String id)
id
- the component id.public static String getComponentPathById(String id, boolean withStartSlash)
id
- the component id.withStartSlash
- indicates whether a start slash should be included.public static Document getModuleDefinitionFromJarModule(File moduleFile) throws SAXException, IOException, PortalException
moduleFile
- the module JAR file.SAXException
- if any problem will be found in the component definition XML.IOException
- if any error occurs during the file.PortalException
- if any other error occurs during the process.public static ClusterMirroredLocalDataFile renameTempPortalFileToFinalModulePortalFile(LocalDataFile tempPortalFile) throws PortalException, IOException
tempPortalFile
- the temp portal file to be renamed;PortalException
IOException
public static File getModuleFile(IModule module) throws PortalException
module
- the module.moduleType
- the module type.PortalException
- if any error occurs during the process.public static File getOldVersionModuleFile(IModule module) throws PortalException
module
- the module.moduleType
- the module type.PortalException
- if any error occurs during the process.public static LocalDataFile getOldVersionModuleLocalDataFile(IModule module) throws PortalException
module
- the module.moduleType
- the module type.PortalException
- if any error occurs during the process.public static String getOldVersionModuleRelativePath(IModule module)
module
- the module.public static File getNewVersionModuleFile(IModule module) throws PortalException
module
- the module.moduleType
- the module type.PortalException
- if any error occurs during the process.public static LocalDataFile getNewVersionModuleLocalDataFile(IModule module) throws PortalException
module
- the module.moduleType
- the module type.PortalException
- if any error occurs during the process.public static String getNewVersionModuleRelativePath(IModule module)
module
- the module.public static File getModuleFile(IModule module, ModuleType moduleType) throws PortalException
module
- the module.moduleType
- the module type.PortalException
- if any error occurs during the process.public static LocalDataFile getModuleLocalDataFile(IModule module) throws PortalException
module
- the module.moduleType
- the module type.PortalException
- if any error occurs during the process.public static LocalDataFile getModuleLocalDataFile(String moduleId) throws PortalException
module
- the module.PortalException
- if any error occurs during the process.public static String getModuleRelativePath(IModule module)
module
- the modulepublic static String getModuleRelativePath(String moduleId)
moduleId
- the moduleIdpublic static File getComponentFile(IComponent component) throws PortalException
component
- the module identifier.PortalException
public static File getComponentFile(IComponent component, ComponentFolder folder) throws PortalException
component
- the component.folder
- the desired folder type.PortalException
public static void copyPublicFiles(File portalFile, File baseFolder) throws PortalException, IOException
portalFile
- the folder to be processed.baseFolder
- the base folder.PortalException
- if any error occurs during the process.IOException
public static void copyPublicFiles(File portalFile, File baseFolder, IWebsite website) throws PortalException, IOException
portalFile
- the folder to be processed.baseFolder
- the base folder.webiste
- the website.PortalException
- if any error occurs during the process.IOException
public static void deletePublicFiles(Set<String> componentPublicFilesPaths) throws PortalException
componentPublicFilesPaths
- the files.PortalException
public static void deletePublicFiles(Set<String> componentPublicFilesPaths, IWebsite website) throws PortalException
componentPublicFilesPaths
- the files.website
- the websitePortalException
public static void copyPublicFiles(String componentPublicFilesPath, JarFile moduleFile) throws PortalException, IOException
componentPublicFilesPath
- the base path of the component.portalFile
- the component filePath.PortalException
- if any error occurs during the process.IOException
public static void copyPublicFiles(String componentPublicFilesPath, JarFile moduleFile, Collection<IWebsite> websites) throws PortalException, IOException
componentPublicFilesPath
- the base path of the component.portalFile
- the component filePath.websites
- the websites the files should be copied to.PortalException
- if any error occurs during the process.IOException
public static void copyJarsInPackageToDeploymentFolder(IFile rootFile) throws IOException
rootFile
- the package folder.IOException
- if any error occurs during the process.public static void copyModuleToDeploymentFolder(IFile moduleFile, String moduleId, ModuleDiff diff) throws IOException
moduleFile
- the current portal file.moduleId
- the module id.diff
- files diffIOException
- if any error occurs during the process.public static Set<String> getAllAvailableResources() throws PortalException
PortalException
public static Set<String> getResourcesOfModule(IModule module) throws PortalException
module
- the module.PortalException
public static void createChannelComponent(String name, String channelId, String exportToPath, IModule module, IFile componentDefinitionFile, ITransaction transaction) throws UnexpectedException, PortalException, IOException
public static Collection<String> readAllStylesFromModule(IModule module) throws PortalException
module
- the module.PortalException
public static Collection<String> readAllStylesFromModule(IModule module, File moduleFile) throws PortalException
module
- the module.moduleFile
- the module file.PortalException
public static void clearStylesCache(Collection<String> stylesPath) throws PortalException
stylesPath
- the styles paths.PortalException
LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.