public class XmlFileVersionProvider extends Object implements VersionProvider
Modifier and Type | Field and Description |
---|---|
protected ContentRepository |
contentRepository |
protected String |
defaultVersion
Version returned if none is found.
|
protected String |
path
Path of the file containing the version.
|
protected String |
site
Name of the site.
|
protected boolean |
skipIfMissing
Indicates if the skip flag should be returned
|
protected String |
xpath
XPath expression to extract the version.
|
SKIP
Constructor and Description |
---|
XmlFileVersionProvider(String site,
String path) |
Modifier and Type | Method and Description |
---|---|
String |
getCurrentVersion()
Returns the current version.
|
void |
setContentRepository(ContentRepository contentRepository) |
void |
setDefaultVersion(String defaultVersion) |
void |
setPath(String path) |
void |
setSite(String site) |
void |
setSkipIfMissing(boolean skipIfMissing) |
void |
setXpath(String xpath) |
protected String site
protected String path
protected String xpath
protected String defaultVersion
protected boolean skipIfMissing
protected ContentRepository contentRepository
public void setContentRepository(ContentRepository contentRepository)
public void setSite(String site)
public void setPath(String path)
public void setXpath(String xpath)
public void setDefaultVersion(String defaultVersion)
public void setSkipIfMissing(boolean skipIfMissing)
public String getCurrentVersion() throws UpgradeException
getCurrentVersion
in interface VersionProvider
UpgradeException
- if there is any error getting the current versionCopyright © 2020 CrafterCMS. All rights reserved.