public class VersioningUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EXPRESSION_SEPARATOR |
static String |
EXPRESSION_WILDCARD |
static com.sun.enterprise.util.LocalStringManagerImpl |
LOCALSTRINGS |
static String |
REPOSITORY_DASH |
| Constructor and Description |
|---|
VersioningUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkIdentifier(String appName)
Check a versionned application name.
|
static String |
getExpression(String appName)
Extract the version identifier / expression for a given application name
that complies with versioning rules.
|
static String |
getRepositoryName(String appName)
Replaces colons with dashs in the given application name.
|
static String |
getUntaggedName(String appName)
Extract the untagged name for a given application name that complies
with versioning rules (version identifier / expression) or not.
|
static List<String> |
getVersions(String untaggedName,
List<com.sun.enterprise.config.serverbeans.Application> allApplications)
Extract the set of version(s) of the given application from a set of
applications.
|
static Boolean |
isUntagged(String appName)
Test if the given application name is an untagged name
|
static Boolean |
isVersionExpression(String appName)
Test if the given application name is a version expression
|
static Boolean |
isVersionExpressionWithWildCard(String appName)
Test if the given application name is a version expression containing
any wildcard character.
|
static Boolean |
isVersionIdentifier(String appName)
Test if the given application name is a version identifier.
|
static List<String> |
matchExpression(List<String> listVersion,
String appName)
Search for the version(s) matched by the expression contained in the given
application name.
|
public static final com.sun.enterprise.util.LocalStringManagerImpl LOCALSTRINGS
public static final String EXPRESSION_SEPARATOR
public static final String EXPRESSION_WILDCARD
public static final String REPOSITORY_DASH
public static final String getUntaggedName(String appName) throws VersioningSyntaxException
appName - the application nameVersioningSyntaxException - if the given application name had some
critical patterns.public static final String getExpression(String appName) throws VersioningSyntaxException
appName - the application nameVersioningSyntaxException - if the given application name had some
critical patterns.public static final void checkIdentifier(String appName) throws VersioningException
appName - the application nameVersioningSyntaxException - if the given application name had some
critical patterns.VersioningException - if the given application name had some
wildcard character(s) in its identifier part.public static final List<String> getVersions(String untaggedName, List<com.sun.enterprise.config.serverbeans.Application> allApplications)
untaggedName - the application name as an untagged version : an
application name without version identifierallApplications - the set of applicationspublic static final List<String> matchExpression(List<String> listVersion, String appName) throws VersioningException
listVersion - the set of all versions of the applicationappName - the application name containing the expressionVersioningException - if the expression is an identifier matching
a version not registered, or if getExpression throws an exceptionpublic static final String getRepositoryName(String appName)
appName - the application namepublic static final Boolean isUntagged(String appName) throws VersioningSyntaxException
appName - the application nametrue is the given application name is not versionedVersioningSyntaxException - if getUntaggedName
throws exceptionpublic static final Boolean isVersionExpression(String appName) throws VersioningSyntaxException
appName - the application nametrue if the appName is a version expressionVersioningSyntaxException - if isUntaggedName
throws exceptionpublic static final Boolean isVersionExpressionWithWildCard(String appName) throws VersioningSyntaxException
appName - the application nametrue if the appName is a version expression matching
more than one version.VersioningSyntaxException - if isVersionExpression
throws exceptionpublic static final Boolean isVersionIdentifier(String appName) throws VersioningSyntaxException
appName - the application nametrue if the appName is a version identifierVersioningSyntaxException - if isVersionExpression
throws exceptionCopyright © 2015. All rights reserved.