@Service @PerLookup public class VersioningService extends Object
Constructor and Description |
---|
VersioningService() |
Modifier and Type | Method and Description |
---|---|
String |
getEnabledVersion(String name,
String target)
Search for the enabled version of the given application.
|
Map<String,Set<String>> |
getEnabledVersionInReferencedTargetsForExpression(String versionExpression)
Search the enabled versions on the referenced targets of each version
matched by the expression.
|
Map<String,Set<String>> |
getEnabledVersionsInReferencedTargets(String versionIdentifier)
Search the enabled versions on the referenced targets of the given version.
|
List<String> |
getMatchedVersions(String name,
String target)
Process the expression matching operation of the given application name.
|
String |
getVersionFromSameDir(File dir)
Get the version directory-deployed from the given directory
|
void |
handleDisable(String appName,
String target,
ActionReport report,
Subject subject)
Disable the enabled version of the application if it exists.
|
public Map<String,Set<String>> getEnabledVersionInReferencedTargetsForExpression(String versionExpression) throws VersioningSyntaxException
versionExpression
- a version expression (that contains wildcard character)VersioningSyntaxException
- if getEnabledVersion throws an exceptionpublic Map<String,Set<String>> getEnabledVersionsInReferencedTargets(String versionIdentifier) throws VersioningSyntaxException
versionIdentifier
- a version expression (that contains wildcard character)VersioningSyntaxException
- if getEnabledVersion throws an exceptionpublic final String getEnabledVersion(String name, String target) throws VersioningSyntaxException
name
- the application nametarget
- an option supply from admin command, it's retained for
compatibility with other releasesVersioningSyntaxException
- if getUntaggedName throws an exceptionpublic final List<String> getMatchedVersions(String name, String target) throws VersioningSyntaxException, VersioningException
name
- the application name containing the version expressiontarget
- the target we are looking for the verisonsVersioningSyntaxException
VersioningException
public void handleDisable(String appName, String target, ActionReport report, Subject subject) throws VersioningSyntaxException
appName
- application's nametarget
- an option supply from admin command, it's retained for
compatibility with other releasesreport
- ActionReport, report object to send back to client.subject
- the Subject on whose behalf to runVersioningSyntaxException
public String getVersionFromSameDir(File dir) throws VersioningSyntaxException
directory
- VersioningSyntaxException
- *Copyright © 2020. All rights reserved.