com.liferay.portal.tools.deploy
Class BaseDeployer
java.lang.Object
com.liferay.portal.tools.deploy.BaseDeployer
- All Implemented Interfaces:
- AutoDeployer, Deployer
- Direct Known Subclasses:
- ExtDeployer, HookDeployer, LayoutTemplateDeployer, ModuleAutoDeployer, PortletDeployer, ThemeDeployer, WebDeployer
public class BaseDeployer
- extends Object
- implements AutoDeployer, Deployer
|
Method Summary |
void |
addExtJar(List<String> jars,
String resource)
|
void |
addRequiredJar(List<String> jars,
String resource)
|
int |
autoDeploy(AutoDeploymentContext autoDeploymentContext)
|
void |
checkArguments()
|
AutoDeployer |
cloneAutoDeployer()
|
void |
copyDependencyXml(String fileName,
String targetDir)
|
void |
copyDependencyXml(String fileName,
String targetDir,
Map<String,String> filterMap)
|
void |
copyDependencyXml(String fileName,
String targetDir,
Map<String,String> filterMap,
boolean overwrite)
|
void |
copyJars(File srcFile,
PluginPackage pluginPackage)
|
void |
copyPortalDependencies(File srcFile)
|
void |
copyProperties(File srcFile,
PluginPackage pluginPackage)
|
void |
copyTlds(File srcFile,
PluginPackage pluginPackage)
|
void |
copyTomcatContextXml(File targetDir)
|
void |
copyXmls(File srcFile,
String displayName,
PluginPackage pluginPackage)
|
void |
deploy(String context)
|
void |
deployDirectory(File srcFile,
File mergeDir,
File deployDir,
String displayName,
boolean overwrite,
PluginPackage pluginPackage)
|
void |
deployDirectory(File srcFile,
String displayName,
boolean override,
PluginPackage pluginPackage)
|
int |
deployFile(AutoDeploymentContext autoDeploymentContext)
|
boolean |
deployFile(File srcFile,
File mergeDir,
File deployDir,
String displayName,
boolean overwrite,
PluginPackage pluginPackage)
|
String |
downloadJar(String jar)
|
String |
fixPortalDependencyJar(String portalJar)
|
DeploymentHandler |
getDeploymentHandler()
|
String |
getDisplayName(File srcFile)
|
String |
getDynamicResourceServletContent()
|
String |
getExtraContent(double webXmlVersion,
File srcFile,
String displayName)
|
String |
getExtraFiltersContent(double webXmlVersion,
File srcFile)
|
String |
getIgnoreFiltersContent(File srcFile)
|
String |
getInvokerFilterContent()
|
String |
getInvokerFilterContent(String dispatcher)
|
String |
getPluginPackageLicensesXml(List<License> licenses)
|
String |
getPluginPackageLiferayVersionsXml(List<String> liferayVersions)
|
Properties |
getPluginPackageProperties(File srcFile)
|
String |
getPluginPackageRequiredDeploymentContextsXml(List<String> requiredDeploymentContexts)
|
String |
getPluginPackageTagsXml(List<String> tags)
|
Map<String,String> |
getPluginPackageXmlFilterMap(PluginPackage pluginPackage)
|
String |
getPluginType()
|
String |
getServletContextIncludeFiltersContent(double webXmlVersion,
File srcFile)
|
String |
getSessionFiltersContent()
|
String |
getSpeedFiltersContent(File srcFile)
|
boolean |
isJEEDeploymentEnabled()
|
static void |
main(String[] args)
|
void |
mergeDirectory(File mergeDir,
File targetDir)
|
void |
postDeploy(String destDir,
String deployDir)
|
void |
postDeployGlassfish(String destDir,
String deployDir)
|
void |
postDeployJBoss(String destDir,
String deployDir)
|
void |
postDeployWildfly(String destDir,
String deployDir)
|
Map<String,String> |
processPluginPackageProperties(File srcFile,
String displayName,
PluginPackage pluginPackage)
|
PluginPackage |
readPluginPackage(File file)
|
void |
rewriteFiles(File srcDir)
|
String |
secureWebXml(String content,
boolean hasCustomServletListener,
boolean securityManagerEnabled)
|
void |
setAppServerType(String appServerType)
|
void |
setAuiTaglibDTD(String auiTaglibDTD)
|
void |
setBaseDir(String baseDir)
|
void |
setDestDir(String destDir)
|
void |
setFilePattern(String filePattern)
|
void |
setJars(List<String> jars)
|
void |
setJbossPrefix(String jbossPrefix)
|
void |
setPortletExtTaglibDTD(String portletExtTaglibDTD)
|
void |
setPortletTaglibDTD(String portletTaglibDTD)
|
void |
setSecurityTaglibDTD(String securityTaglibDTD)
|
void |
setThemeTaglibDTD(String themeTaglibDTD)
|
void |
setTomcatLibDir(String tomcatLibDir)
|
void |
setUiTaglibDTD(String uiTaglibDTD)
|
void |
setUnpackWar(boolean unpackWar)
|
void |
setUtilTaglibDTD(String utilTaglibDTD)
|
void |
setWars(List<String> wars)
|
void |
setWildflyPrefix(String wildflyPrefix)
|
void |
updateDeployDirectory(File srcFile)
|
String |
updateLiferayWebXml(double webXmlVersion,
File srcFile,
String webXmlContent)
|
void |
updateWebXml(File webXml,
File srcFile,
String displayName,
PluginPackage pluginPackage)
|
String |
wrapCDATA(String string)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEPLOY_TO_PREFIX
public static final String DEPLOY_TO_PREFIX
- See Also:
- Constant Field Values
appServerType
protected String appServerType
auiTaglibDTD
protected String auiTaglibDTD
baseDir
protected String baseDir
destDir
protected String destDir
filePattern
protected String filePattern
jars
protected List<String> jars
jbossPrefix
protected String jbossPrefix
portletExtTaglibDTD
protected String portletExtTaglibDTD
portletTaglibDTD
protected String portletTaglibDTD
securityTaglibDTD
protected String securityTaglibDTD
themeTaglibDTD
protected String themeTaglibDTD
tomcatLibDir
protected String tomcatLibDir
uiTaglibDTD
protected String uiTaglibDTD
unpackWar
protected boolean unpackWar
utilTaglibDTD
protected String utilTaglibDTD
wars
protected List<String> wars
wildflyPrefix
protected String wildflyPrefix
BaseDeployer
public BaseDeployer()
BaseDeployer
public BaseDeployer(List<String> wars,
List<String> jars)
main
public static void main(String[] args)
addExtJar
public void addExtJar(List<String> jars,
String resource)
throws Exception
- Specified by:
addExtJar in interface Deployer
- Throws:
Exception
addRequiredJar
public void addRequiredJar(List<String> jars,
String resource)
throws Exception
- Specified by:
addRequiredJar in interface Deployer
- Throws:
Exception
autoDeploy
public int autoDeploy(AutoDeploymentContext autoDeploymentContext)
throws AutoDeployException
- Specified by:
autoDeploy in interface AutoDeployer
- Throws:
AutoDeployException
checkArguments
public void checkArguments()
- Specified by:
checkArguments in interface Deployer
cloneAutoDeployer
public AutoDeployer cloneAutoDeployer()
throws AutoDeployException
- Specified by:
cloneAutoDeployer in interface AutoDeployer
- Throws:
AutoDeployException
copyDependencyXml
public void copyDependencyXml(String fileName,
String targetDir)
throws Exception
- Specified by:
copyDependencyXml in interface Deployer
- Throws:
Exception
copyDependencyXml
public void copyDependencyXml(String fileName,
String targetDir,
Map<String,String> filterMap)
throws Exception
- Specified by:
copyDependencyXml in interface Deployer
- Throws:
Exception
copyDependencyXml
public void copyDependencyXml(String fileName,
String targetDir,
Map<String,String> filterMap,
boolean overwrite)
throws Exception
- Specified by:
copyDependencyXml in interface Deployer
- Throws:
Exception
copyJars
public void copyJars(File srcFile,
PluginPackage pluginPackage)
throws Exception
- Specified by:
copyJars in interface Deployer
- Throws:
Exception
copyPortalDependencies
public void copyPortalDependencies(File srcFile)
throws Exception
- Throws:
Exception
copyProperties
public void copyProperties(File srcFile,
PluginPackage pluginPackage)
throws Exception
- Specified by:
copyProperties in interface Deployer
- Throws:
Exception
copyTlds
public void copyTlds(File srcFile,
PluginPackage pluginPackage)
throws Exception
- Specified by:
copyTlds in interface Deployer
- Throws:
Exception
copyTomcatContextXml
public void copyTomcatContextXml(File targetDir)
throws Exception
- Throws:
Exception
copyXmls
public void copyXmls(File srcFile,
String displayName,
PluginPackage pluginPackage)
throws Exception
- Specified by:
copyXmls in interface Deployer
- Throws:
Exception
deploy
public void deploy(String context)
throws Exception
- Throws:
Exception
deployDirectory
public void deployDirectory(File srcFile,
File mergeDir,
File deployDir,
String displayName,
boolean overwrite,
PluginPackage pluginPackage)
throws Exception
- Throws:
Exception
deployDirectory
public void deployDirectory(File srcFile,
String displayName,
boolean override,
PluginPackage pluginPackage)
throws Exception
- Throws:
Exception
deployFile
public int deployFile(AutoDeploymentContext autoDeploymentContext)
throws Exception
- Throws:
Exception
deployFile
public boolean deployFile(File srcFile,
File mergeDir,
File deployDir,
String displayName,
boolean overwrite,
PluginPackage pluginPackage)
throws Exception
- Throws:
Exception
downloadJar
public String downloadJar(String jar)
throws Exception
- Throws:
Exception
fixPortalDependencyJar
public String fixPortalDependencyJar(String portalJar)
getDeploymentHandler
public DeploymentHandler getDeploymentHandler()
getDisplayName
public String getDisplayName(File srcFile)
getDynamicResourceServletContent
public String getDynamicResourceServletContent()
getExtraContent
public String getExtraContent(double webXmlVersion,
File srcFile,
String displayName)
throws Exception
- Throws:
Exception
getExtraFiltersContent
public String getExtraFiltersContent(double webXmlVersion,
File srcFile)
throws Exception
- Throws:
Exception
getIgnoreFiltersContent
public String getIgnoreFiltersContent(File srcFile)
throws Exception
- Throws:
Exception
getInvokerFilterContent
public String getInvokerFilterContent()
getInvokerFilterContent
public String getInvokerFilterContent(String dispatcher)
getPluginPackageLicensesXml
public String getPluginPackageLicensesXml(List<License> licenses)
getPluginPackageLiferayVersionsXml
public String getPluginPackageLiferayVersionsXml(List<String> liferayVersions)
getPluginPackageProperties
public Properties getPluginPackageProperties(File srcFile)
throws Exception
- Throws:
Exception
getPluginPackageRequiredDeploymentContextsXml
public String getPluginPackageRequiredDeploymentContextsXml(List<String> requiredDeploymentContexts)
getPluginPackageTagsXml
public String getPluginPackageTagsXml(List<String> tags)
getPluginPackageXmlFilterMap
public Map<String,String> getPluginPackageXmlFilterMap(PluginPackage pluginPackage)
getPluginType
public String getPluginType()
getServletContextIncludeFiltersContent
public String getServletContextIncludeFiltersContent(double webXmlVersion,
File srcFile)
throws Exception
- Throws:
Exception
getSessionFiltersContent
public String getSessionFiltersContent()
throws Exception
- Throws:
Exception
getSpeedFiltersContent
public String getSpeedFiltersContent(File srcFile)
throws Exception
- Throws:
Exception
isJEEDeploymentEnabled
public boolean isJEEDeploymentEnabled()
mergeDirectory
public void mergeDirectory(File mergeDir,
File targetDir)
postDeploy
public void postDeploy(String destDir,
String deployDir)
throws Exception
- Throws:
Exception
postDeployGlassfish
public void postDeployGlassfish(String destDir,
String deployDir)
throws Exception
- Throws:
Exception
postDeployJBoss
public void postDeployJBoss(String destDir,
String deployDir)
throws Exception
- Throws:
Exception
postDeployWildfly
public void postDeployWildfly(String destDir,
String deployDir)
throws Exception
- Throws:
Exception
processPluginPackageProperties
public Map<String,String> processPluginPackageProperties(File srcFile,
String displayName,
PluginPackage pluginPackage)
throws Exception
- Specified by:
processPluginPackageProperties in interface Deployer
- Throws:
Exception
readPluginPackage
public PluginPackage readPluginPackage(File file)
- Specified by:
readPluginPackage in interface Deployer
- See Also:
PluginPackageUtil._readPluginPackageServletContext(
javax.servlet.ServletContext)
rewriteFiles
public void rewriteFiles(File srcDir)
throws Exception
- Throws:
Exception
secureWebXml
public String secureWebXml(String content,
boolean hasCustomServletListener,
boolean securityManagerEnabled)
throws Exception
- Throws:
Exception
setAppServerType
public void setAppServerType(String appServerType)
- Specified by:
setAppServerType in interface Deployer
setAuiTaglibDTD
public void setAuiTaglibDTD(String auiTaglibDTD)
- Specified by:
setAuiTaglibDTD in interface Deployer
setBaseDir
public void setBaseDir(String baseDir)
- Specified by:
setBaseDir in interface Deployer
setDestDir
public void setDestDir(String destDir)
- Specified by:
setDestDir in interface Deployer
setFilePattern
public void setFilePattern(String filePattern)
- Specified by:
setFilePattern in interface Deployer
setJars
public void setJars(List<String> jars)
- Specified by:
setJars in interface Deployer
setJbossPrefix
public void setJbossPrefix(String jbossPrefix)
- Specified by:
setJbossPrefix in interface Deployer
setPortletExtTaglibDTD
public void setPortletExtTaglibDTD(String portletExtTaglibDTD)
- Specified by:
setPortletExtTaglibDTD in interface Deployer
setPortletTaglibDTD
public void setPortletTaglibDTD(String portletTaglibDTD)
- Specified by:
setPortletTaglibDTD in interface Deployer
setSecurityTaglibDTD
public void setSecurityTaglibDTD(String securityTaglibDTD)
- Specified by:
setSecurityTaglibDTD in interface Deployer
setThemeTaglibDTD
public void setThemeTaglibDTD(String themeTaglibDTD)
- Specified by:
setThemeTaglibDTD in interface Deployer
setTomcatLibDir
public void setTomcatLibDir(String tomcatLibDir)
- Specified by:
setTomcatLibDir in interface Deployer
setUiTaglibDTD
public void setUiTaglibDTD(String uiTaglibDTD)
- Specified by:
setUiTaglibDTD in interface Deployer
setUnpackWar
public void setUnpackWar(boolean unpackWar)
- Specified by:
setUnpackWar in interface Deployer
setUtilTaglibDTD
public void setUtilTaglibDTD(String utilTaglibDTD)
- Specified by:
setUtilTaglibDTD in interface Deployer
setWars
public void setWars(List<String> wars)
- Specified by:
setWars in interface Deployer
setWildflyPrefix
public void setWildflyPrefix(String wildflyPrefix)
- Specified by:
setWildflyPrefix in interface Deployer
updateDeployDirectory
public void updateDeployDirectory(File srcFile)
throws Exception
- Throws:
Exception
updateLiferayWebXml
public String updateLiferayWebXml(double webXmlVersion,
File srcFile,
String webXmlContent)
throws Exception
- Throws:
Exception
updateWebXml
public void updateWebXml(File webXml,
File srcFile,
String displayName,
PluginPackage pluginPackage)
throws Exception
- Specified by:
updateWebXml in interface Deployer
- Throws:
Exception
wrapCDATA
public String wrapCDATA(String string)
- Specified by:
wrapCDATA in interface Deployer