|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.deployment.versioning.VersioningUtils
public class VersioningUtils
This class provides utility methods to handle application names in the versioning context
| Field Summary | |
|---|---|
static String |
EXPRESSION_SEPARATOR
|
static String |
EXPRESSION_WILDCARD
|
static LocalStringManagerImpl |
LOCALSTRINGS
|
static String |
REPOSITORY_DASH
|
| Constructor Summary | |
|---|---|
VersioningUtils()
|
|
| Method Summary | |
|---|---|
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<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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final LocalStringManagerImpl LOCALSTRINGS
public static final String EXPRESSION_SEPARATOR
public static final String EXPRESSION_WILDCARD
public static final String REPOSITORY_DASH
| Constructor Detail |
|---|
public VersioningUtils()
| Method Detail |
|---|
public static final String getUntaggedName(String appName)
throws VersioningSyntaxException
appName - the application name
VersioningSyntaxException - if the given application name had some
critical patterns.
public static final String getExpression(String appName)
throws VersioningSyntaxException
appName - the application name
VersioningSyntaxException - if the given application name had some
critical patterns.
public static final void checkIdentifier(String appName)
throws VersioningException
appName - the application name
VersioningSyntaxException - 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<Application> allApplications)
untaggedName - the application name as an untagged version : an
application name without version identifierallApplications - the set of applications
public 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 expression
VersioningException - 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 name
public static final Boolean isUntagged(String appName)
throws VersioningSyntaxException
appName - the application name
true is the given application name is not versioned
VersioningSyntaxException - if getUntaggedName
throws exception
public static final Boolean isVersionExpression(String appName)
throws VersioningSyntaxException
appName - the application name
true if the appName is a version expression
VersioningSyntaxException - if isUntaggedName
throws exception
public static final Boolean isVersionExpressionWithWildCard(String appName)
throws VersioningSyntaxException
appName - the application name
true if the appName is a version expression matching
more than one version.
VersioningSyntaxException - if isVersionExpression
throws exception
public static final Boolean isVersionIdentifier(String appName)
throws VersioningSyntaxException
appName - the application name
true if the appName is a version identifier
VersioningSyntaxException - if isVersionExpression
throws exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||