Liferay 6.1.2-ce-ga3

com.liferay.portal.tools.deploy
Class BaseDeployer

java.lang.Object
  extended by com.liferay.portal.tools.deploy.BaseDeployer
All Implemented Interfaces:
AutoDeployer, Deployer
Direct Known Subclasses:
ExtDeployer, HookDeployer, LayoutTemplateDeployer, PortletDeployer, ThemeDeployer, WebDeployer

public class BaseDeployer
extends Object
implements AutoDeployer, Deployer


Field Summary
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  String themeTaglibDTD
           
protected  String tomcatLibDir
           
protected  String uiTaglibDTD
           
protected  boolean unpackWar
           
protected  String utilTaglibDTD
           
protected  List<String> wars
           
 
Fields inherited from interface com.liferay.portal.kernel.deploy.auto.AutoDeployer
CODE_DEFAULT, CODE_NOT_APPLICABLE, CODE_SKIP_NEWER_VERSION
 
Constructor Summary
BaseDeployer()
           
BaseDeployer(List<String> wars, List<String> jars)
           
 
Method Summary
 void addExtJar(List<String> jars, String resource)
           
 void addRequiredJar(List<String> jars, String resource)
           
 int autoDeploy(AutoDeploymentContext autoDeploymentContext)
           
 void checkArguments()
           
 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 copyDtds(File srcFile, PluginPackage pluginPackage)
           
 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 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 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 postDeployWebSphere(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 updateDeployDirectory(File srcFile)
           
 void updateGeronimoWebXml(File srcFile, String displayName, PluginPackage pluginPackage)
           
 String updateLiferayWebXml(double webXmlVersion, File srcFile, String webXmlContent)
           
 void updateWebXml(File webXml, File srcFile, String displayName, PluginPackage pluginPackage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

BaseDeployer

public BaseDeployer()

BaseDeployer

public BaseDeployer(List<String> wars,
                    List<String> jars)
Method Detail

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

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

copyDtds

public void copyDtds(File srcFile,
                     PluginPackage pluginPackage)
              throws Exception
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)

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

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

postDeployWebSphere

public void postDeployWebSphere(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

updateDeployDirectory

public void updateDeployDirectory(File srcFile)
                           throws Exception
Throws:
Exception

updateGeronimoWebXml

public void updateGeronimoWebXml(File srcFile,
                                 String displayName,
                                 PluginPackage pluginPackage)
                          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

Liferay 6.1.2-ce-ga3