public class BaseDeployer
extends Object
implements com.liferay.portal.kernel.deploy.auto.AutoDeployer, com.liferay.portal.kernel.deploy.Deployer
Modifier and Type | Field and Description |
---|---|
protected String |
appServerType |
protected String |
auiTaglibDTD |
protected String |
baseDir |
static String |
DEPLOY_TO_PREFIX |
protected String |
destDir |
protected String |
filePattern |
protected List<String> |
jars |
protected String |
jbossPrefix |
protected String |
portletExtTaglibDTD |
protected String |
portletTaglibDTD |
protected String |
securityTaglibDTD |
protected Set<Path> |
tempDirPaths |
protected String |
themeTaglibDTD |
protected String |
tomcatLibDir |
protected String |
uiTaglibDTD |
protected boolean |
unpackWar |
protected String |
utilTaglibDTD |
protected List<String> |
wars |
protected String |
wildflyPrefix |
Constructor and Description |
---|
BaseDeployer() |
BaseDeployer(List<String> wars,
List<String> jars) |
Modifier and Type | Method and Description |
---|---|
void |
addExtJar(List<String> jars,
String resource) |
void |
addRequiredJar(List<String> jars,
String resource) |
int |
autoDeploy(com.liferay.portal.kernel.deploy.auto.context.AutoDeploymentContext autoDeploymentContext) |
void |
checkArguments() |
com.liferay.portal.kernel.deploy.auto.AutoDeployer |
cloneAutoDeployer() |
void |
close() |
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,
com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) |
void |
copyPortalDependencies(File srcFile) |
void |
copyProperties(File srcFile,
com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) |
void |
copyTlds(File srcFile,
com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) |
void |
copyTomcatContextXml(File targetDir) |
void |
copyXmls(File srcFile,
String displayName,
com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) |
void |
deploy(String context) |
void |
deployDirectory(File srcFile,
File mergeDir,
File deployDir,
String displayName,
boolean overwrite,
com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) |
void |
deployDirectory(File srcFile,
String displayName,
boolean override,
com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) |
int |
deployFile(com.liferay.portal.kernel.deploy.auto.context.AutoDeploymentContext autoDeploymentContext) |
boolean |
deployFile(File srcFile,
File mergeDir,
File deployDir,
String displayName,
boolean overwrite,
com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) |
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<com.liferay.portal.kernel.plugin.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(com.liferay.portal.kernel.plugin.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,
com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) |
com.liferay.portal.kernel.plugin.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,
com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) |
String |
wrapCDATA(String string) |
public static final String DEPLOY_TO_PREFIX
protected String appServerType
protected String auiTaglibDTD
protected String baseDir
protected String destDir
protected String filePattern
protected List<String> jars
protected String jbossPrefix
protected String portletExtTaglibDTD
protected String portletTaglibDTD
protected String securityTaglibDTD
protected final Set<Path> tempDirPaths
protected String themeTaglibDTD
protected String tomcatLibDir
protected String uiTaglibDTD
protected boolean unpackWar
protected String utilTaglibDTD
protected List<String> wars
protected String wildflyPrefix
public BaseDeployer()
public BaseDeployer(List<String> wars, List<String> jars)
public static void main(String[] args)
public void addExtJar(List<String> jars, String resource) throws Exception
addExtJar
in interface com.liferay.portal.kernel.deploy.Deployer
Exception
public void addRequiredJar(List<String> jars, String resource) throws Exception
addRequiredJar
in interface com.liferay.portal.kernel.deploy.Deployer
Exception
public int autoDeploy(com.liferay.portal.kernel.deploy.auto.context.AutoDeploymentContext autoDeploymentContext) throws com.liferay.portal.kernel.deploy.auto.AutoDeployException
autoDeploy
in interface com.liferay.portal.kernel.deploy.auto.AutoDeployer
com.liferay.portal.kernel.deploy.auto.AutoDeployException
public void checkArguments()
checkArguments
in interface com.liferay.portal.kernel.deploy.Deployer
public com.liferay.portal.kernel.deploy.auto.AutoDeployer cloneAutoDeployer() throws com.liferay.portal.kernel.deploy.auto.AutoDeployException
cloneAutoDeployer
in interface com.liferay.portal.kernel.deploy.auto.AutoDeployer
com.liferay.portal.kernel.deploy.auto.AutoDeployException
public void close() throws IOException
close
in interface com.liferay.portal.kernel.deploy.auto.AutoDeployer
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void copyDependencyXml(String fileName, String targetDir) throws Exception
copyDependencyXml
in interface com.liferay.portal.kernel.deploy.Deployer
Exception
public void copyDependencyXml(String fileName, String targetDir, Map<String,String> filterMap) throws Exception
copyDependencyXml
in interface com.liferay.portal.kernel.deploy.Deployer
Exception
public void copyDependencyXml(String fileName, String targetDir, Map<String,String> filterMap, boolean overwrite) throws Exception
copyDependencyXml
in interface com.liferay.portal.kernel.deploy.Deployer
Exception
public void copyJars(File srcFile, com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) throws Exception
copyJars
in interface com.liferay.portal.kernel.deploy.Deployer
Exception
public void copyPortalDependencies(File srcFile) throws Exception
Exception
public void copyProperties(File srcFile, com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) throws Exception
copyProperties
in interface com.liferay.portal.kernel.deploy.Deployer
Exception
public void copyTlds(File srcFile, com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) throws Exception
copyTlds
in interface com.liferay.portal.kernel.deploy.Deployer
Exception
public void copyTomcatContextXml(File targetDir) throws Exception
Exception
public void copyXmls(File srcFile, String displayName, com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) throws Exception
copyXmls
in interface com.liferay.portal.kernel.deploy.Deployer
Exception
public void deploy(String context) throws Exception
Exception
public void deployDirectory(File srcFile, File mergeDir, File deployDir, String displayName, boolean overwrite, com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) throws Exception
Exception
public void deployDirectory(File srcFile, String displayName, boolean override, com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) throws Exception
Exception
public int deployFile(com.liferay.portal.kernel.deploy.auto.context.AutoDeploymentContext autoDeploymentContext) throws Exception
Exception
public boolean deployFile(File srcFile, File mergeDir, File deployDir, String displayName, boolean overwrite, com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) throws Exception
Exception
public String fixPortalDependencyJar(String portalJar)
public DeploymentHandler getDeploymentHandler()
public String getDisplayName(File srcFile)
public String getDynamicResourceServletContent()
public String getExtraContent(double webXmlVersion, File srcFile, String displayName) throws Exception
Exception
public String getExtraFiltersContent(double webXmlVersion, File srcFile) throws Exception
Exception
public String getIgnoreFiltersContent(File srcFile) throws Exception
Exception
public String getInvokerFilterContent()
public String getInvokerFilterContent(String dispatcher)
public String getPluginPackageLicensesXml(List<com.liferay.portal.kernel.plugin.License> licenses)
public String getPluginPackageLiferayVersionsXml(List<String> liferayVersions)
public Properties getPluginPackageProperties(File srcFile) throws Exception
Exception
public String getPluginPackageRequiredDeploymentContextsXml(List<String> requiredDeploymentContexts)
public String getPluginPackageTagsXml(List<String> tags)
public Map<String,String> getPluginPackageXmlFilterMap(com.liferay.portal.kernel.plugin.PluginPackage pluginPackage)
public String getPluginType()
public String getServletContextIncludeFiltersContent(double webXmlVersion, File srcFile) throws Exception
Exception
public String getSessionFiltersContent() throws Exception
Exception
public String getSpeedFiltersContent(File srcFile) throws Exception
Exception
public boolean isJEEDeploymentEnabled()
public void mergeDirectory(File mergeDir, File targetDir)
public void postDeploy(String destDir, String deployDir) throws Exception
Exception
public void postDeployGlassfish(String destDir, String deployDir) throws Exception
Exception
public void postDeployJBoss(String destDir, String deployDir) throws Exception
Exception
public void postDeployWildfly(String destDir, String deployDir) throws Exception
Exception
public Map<String,String> processPluginPackageProperties(File srcFile, String displayName, com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) throws Exception
processPluginPackageProperties
in interface com.liferay.portal.kernel.deploy.Deployer
Exception
public com.liferay.portal.kernel.plugin.PluginPackage readPluginPackage(File file)
readPluginPackage
in interface com.liferay.portal.kernel.deploy.Deployer
PluginPackageUtil._readPluginPackageServletContext(
javax.servlet.ServletContext)
public void rewriteFiles(File srcDir) throws Exception
Exception
public String secureWebXml(String content, boolean hasCustomServletListener, boolean securityManagerEnabled) throws Exception
Exception
public void setAppServerType(String appServerType)
setAppServerType
in interface com.liferay.portal.kernel.deploy.Deployer
public void setAuiTaglibDTD(String auiTaglibDTD)
setAuiTaglibDTD
in interface com.liferay.portal.kernel.deploy.Deployer
public void setBaseDir(String baseDir)
setBaseDir
in interface com.liferay.portal.kernel.deploy.Deployer
public void setDestDir(String destDir)
setDestDir
in interface com.liferay.portal.kernel.deploy.Deployer
public void setFilePattern(String filePattern)
setFilePattern
in interface com.liferay.portal.kernel.deploy.Deployer
public void setJars(List<String> jars)
setJars
in interface com.liferay.portal.kernel.deploy.Deployer
public void setJbossPrefix(String jbossPrefix)
setJbossPrefix
in interface com.liferay.portal.kernel.deploy.Deployer
public void setPortletExtTaglibDTD(String portletExtTaglibDTD)
setPortletExtTaglibDTD
in interface com.liferay.portal.kernel.deploy.Deployer
public void setPortletTaglibDTD(String portletTaglibDTD)
setPortletTaglibDTD
in interface com.liferay.portal.kernel.deploy.Deployer
public void setSecurityTaglibDTD(String securityTaglibDTD)
setSecurityTaglibDTD
in interface com.liferay.portal.kernel.deploy.Deployer
public void setThemeTaglibDTD(String themeTaglibDTD)
setThemeTaglibDTD
in interface com.liferay.portal.kernel.deploy.Deployer
public void setTomcatLibDir(String tomcatLibDir)
setTomcatLibDir
in interface com.liferay.portal.kernel.deploy.Deployer
public void setUiTaglibDTD(String uiTaglibDTD)
setUiTaglibDTD
in interface com.liferay.portal.kernel.deploy.Deployer
public void setUnpackWar(boolean unpackWar)
setUnpackWar
in interface com.liferay.portal.kernel.deploy.Deployer
public void setUtilTaglibDTD(String utilTaglibDTD)
setUtilTaglibDTD
in interface com.liferay.portal.kernel.deploy.Deployer
public void setWars(List<String> wars)
setWars
in interface com.liferay.portal.kernel.deploy.Deployer
public void setWildflyPrefix(String wildflyPrefix)
setWildflyPrefix
in interface com.liferay.portal.kernel.deploy.Deployer
public void updateDeployDirectory(File srcFile) throws Exception
Exception
public String updateLiferayWebXml(double webXmlVersion, File srcFile, String webXmlContent) throws Exception
Exception
public void updateWebXml(File webXml, File srcFile, String displayName, com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) throws Exception
updateWebXml
in interface com.liferay.portal.kernel.deploy.Deployer
Exception
public String wrapCDATA(String string)
wrapCDATA
in interface com.liferay.portal.kernel.deploy.Deployer