|
||||||||||
| 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 java.lang.String |
EXPRESSION_SEPARATOR
|
static java.lang.String |
EXPRESSION_WILDCARD
|
static LocalStringManagerImpl |
LOCALSTRINGS
|
static java.lang.String |
REPOSITORY_DASH
|
| Constructor Summary | |
|---|---|
VersioningUtils()
|
|
| Method Summary | |
|---|---|
static void |
checkIdentifier(java.lang.String appName)
Check a versionned application name. |
static java.lang.String |
getExpression(java.lang.String appName)
Extract the version identifier / expression for a given application name that complies with versioning rules. |
static java.lang.String |
getRepositoryName(java.lang.String appName)
Replaces colons with dashs in the given application name. |
static java.lang.String |
getUntaggedName(java.lang.String appName)
Extract the untagged name for a given application name that complies with versioning rules (version identifier / expression) or not. |
static java.util.List<java.lang.String> |
getVersions(java.lang.String untaggedName,
java.util.List<Application> allApplications)
Extract the set of version(s) of the given application from a set of applications. |
static java.lang.Boolean |
isUntagged(java.lang.String appName)
Test if the given application name is an untagged name |
static java.lang.Boolean |
isVersionExpression(java.lang.String appName)
Test if the given application name is a version expression |
static java.lang.Boolean |
isVersionExpressionWithWildCard(java.lang.String appName)
Test if the given application name is a version expression containing any wildcard character. |
static java.lang.Boolean |
isVersionIdentifier(java.lang.String appName)
Test if the given application name is a version identifier. |
static java.util.List<java.lang.String> |
matchExpression(java.util.List<java.lang.String> listVersion,
java.lang.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 java.lang.String EXPRESSION_SEPARATOR
public static final java.lang.String EXPRESSION_WILDCARD
public static final java.lang.String REPOSITORY_DASH
| Constructor Detail |
|---|
public VersioningUtils()
| Method Detail |
|---|
public static final java.lang.String getUntaggedName(java.lang.String appName)
throws VersioningSyntaxException
appName - the application name
VersioningSyntaxException - if the given application name had some
critical patterns.
public static final java.lang.String getExpression(java.lang.String appName)
throws VersioningSyntaxException
appName - the application name
VersioningSyntaxException - if the given application name had some
critical patterns.
public static final void checkIdentifier(java.lang.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 java.util.List<java.lang.String> getVersions(java.lang.String untaggedName,
java.util.List<Application> allApplications)
untaggedName - the application name as an untagged version : an
application name without version identifierallApplications - the set of applications
public static final java.util.List<java.lang.String> matchExpression(java.util.List<java.lang.String> listVersion,
java.lang.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 java.lang.String getRepositoryName(java.lang.String appName)
appName - the application name
public static final java.lang.Boolean isUntagged(java.lang.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 java.lang.Boolean isVersionExpression(java.lang.String appName)
throws VersioningSyntaxException
appName - the application name
true if the appName is a version expression
VersioningSyntaxException - if isUntaggedName
throws exception
public static final java.lang.Boolean isVersionExpressionWithWildCard(java.lang.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 java.lang.Boolean isVersionIdentifier(java.lang.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 | |||||||||