com.softwareag.mdm.instance
Class HomeKey

java.lang.Object
  extended bycom.softwareag.mdm.instance.HomeKey
Direct Known Subclasses:
BranchKey, VersionKey

public abstract class HomeKey
extends Object

Abstract superclass for branch identifiers and version identifiers.

See Also:
Repository.lookupHome(HomeKey)

Field Summary
static String KEY_PATTERN
          Regular expression that controls the syntax of a home key.
static int MAX_KEY_LENGTH
          Maximum length of a home key: 32.
 
Method Summary
static BranchKey forBranchName(String aName)
          Returns the branch identifier with the name specified.
 String format()
          Returns a persistent identifier of a home.
static VersionKey forVersionName(String aName)
          Returns the version identifier with the name specified.
 String getName()
          Returns the string associated with this key.
abstract  boolean isBranch()
          Returns true if this key identifies a branch.
 boolean isVersion()
          Returns true if this key identifies a version.
static HomeKey parse(String aString)
          Parses the string specified so as to return either a branch or a version key.
 String toDisplayString(Locale aLocale)
          Returns a user-friendly string that specifies this key type (branch or version) and its name.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_KEY_LENGTH

public static final int MAX_KEY_LENGTH
Maximum length of a home key: 32.

See Also:
Constant Field Values

KEY_PATTERN

public static final String KEY_PATTERN
Regular expression that controls the syntax of a home key. The regular expression is:
"[a-zA-Z0-9_:.\\-\\|]*"

See Also:
Constant Field Values
Method Detail

forBranchName

public static final BranchKey forBranchName(String aName)
Returns the branch identifier with the name specified.


forVersionName

public static final VersionKey forVersionName(String aName)
Returns the version identifier with the name specified.


parse

public static final HomeKey parse(String aString)
Parses the string specified so as to return either a branch or a version key.

The string specified must have been generated by format().

See Also:
format(), forVersionName(String), forBranchName(String)

isBranch

public abstract boolean isBranch()
Returns true if this key identifies a branch.


isVersion

public boolean isVersion()
Returns true if this key identifies a version.


getName

public final String getName()
Returns the string associated with this key.

Sinc branches namespace and versions namespace are independant, the returned string is an identifier only in the context of one namespace. For a global home identifier (in branches and versions), the method format() must be used.

See Also:
format()

format

public final String format()
Returns a persistent identifier of a home.

Regarding method getName(), this identifier specifies additionnally if this key is about a version or a branch.

See Also:
parse(String)

toDisplayString

public String toDisplayString(Locale aLocale)
Returns a user-friendly string that specifies this key type (branch or version) and its name.


toString

public String toString()


(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.