public final class Patcher extends Object implements JahiaAfterInitializationService, org.springframework.beans.factory.DisposableBean
WEB-INF/var/patches/) for scripts, executes
them and renames the executed files.| Modifier and Type | Field and Description |
|---|---|
static String |
KEEP |
static String |
README |
static String |
REMOVE |
static Comparator<org.springframework.core.io.Resource> |
RESOURCE_COMPARATOR |
static String |
SUFFIX_FAILED |
static String |
SUFFIX_INSTALLED |
static String |
SUFFIX_SKIPPED |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
executeScripts(Collection<org.springframework.core.io.Resource> scripts,
String lifecyclePhase)
Execute scripts in the specified lifecycle phase
|
void |
executeScripts(Collection<org.springframework.core.io.Resource> scripts,
String lifecyclePhase,
BiConsumer<org.springframework.core.io.Resource,String> afterExecution)
Execute scripts in the specified lifecycle phase, use a callback after execution
|
void |
executeScripts(String lifecyclePhase)
Execute scripts for the given lifecycle phase
|
static Patcher |
getInstance() |
org.jahia.commons.Version |
getJahiaPreviousVersion() |
String |
getPatchesLookup() |
void |
initAfterAllServicesAreStarted() |
void |
setInterval(long interval) |
void |
setPatchers(List<PatchExecutor> patchers) |
void |
setPatchesLookup(String patchesLookup) |
void |
setServletContext(javax.servlet.ServletContext servletContext) |
public static final String README
public static final String SUFFIX_INSTALLED
public static final String SUFFIX_FAILED
public static final String SUFFIX_SKIPPED
public static final String KEEP
public static final String REMOVE
public static final Comparator<org.springframework.core.io.Resource> RESOURCE_COMPARATOR
public static Patcher getInstance()
public void executeScripts(String lifecyclePhase)
lifecyclePhase - the lifecycle phasepublic void executeScripts(Collection<org.springframework.core.io.Resource> scripts, String lifecyclePhase)
scripts - scriptslifecyclePhase - lifecyclePhasepublic void executeScripts(Collection<org.springframework.core.io.Resource> scripts, String lifecyclePhase, BiConsumer<org.springframework.core.io.Resource,String> afterExecution)
scripts - scriptslifecyclePhase - lifecyclePhaseafterExecution - afterExecution callbackpublic void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic void initAfterAllServicesAreStarted()
throws JahiaInitializationException
initAfterAllServicesAreStarted in interface JahiaAfterInitializationServiceJahiaInitializationExceptionpublic void setInterval(long interval)
public String getPatchesLookup()
public void setPatchesLookup(String patchesLookup)
public void setServletContext(javax.servlet.ServletContext servletContext)
public void setPatchers(List<PatchExecutor> patchers)
public org.jahia.commons.Version getJahiaPreviousVersion()
Copyright © 2004–2021 Jahia Solutions Group SA. All rights reserved.