|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.xtools.ras.profile.core.util.ProfileIDHelper
ProfileIDHelper
is a utility class containing a collection of
methods that parse and construct profile IDs.
Field Summary | |
static String |
PROFILE_DELIMITER
Represents the delimiter between segments of a profile ID |
Constructor Summary | |
ProfileIDHelper()
|
Method Summary | |
static String |
createID(String[] idSegments)
Creates a propely formated profile ID given a specified number of segments. |
static String[] |
getIDSegments(String profileID)
Retrieves the segments that make up the profile ID.The specified profile ID is first validated using isValid(String) . |
static String |
getParentProfileID(String profileID,
boolean validateId)
Retrieves the parent profile id for the specified profile. |
static String[] |
getProfileIDs(String profileID)
Retrieves the profile IDs from least to most derived profile. |
static boolean |
isValid(String profileID)
Validates that the profile ID is valid by insuring the following after trimming the profile ID of all whitespace: The ID length can not be 0 The ID does not begin with the delimiter The ID does not end with the delimiter The ID does not contain any consecutive delimiter sequence The ID does not contain any individual character that denotes the beginning of the delimiter that is not part of the delimiter The ID does not contain any segment that when trimmed of all whitespace the segment length is 0 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String PROFILE_DELIMITER
Constructor Detail |
public ProfileIDHelper()
Method Detail |
public static String createID(String[] idSegments)
isValid(String)
. If the profile ID is deemed invalid
null
is returned.
idSegments
- the segments to use to construct a profile ID.
null
if the
created ID is deemed invalidpublic static String[] getProfileIDs(String profileID)
isValid(String)
.
If the profile is deemed invalid an empty array is returned.
profileID
- to profile ID to retrieve the profile IDs from
public static String getParentProfileID(String profileID, boolean validateId)
isValid(String)
. Setting validateId
to
false
indicates that Id has been previously validated. The
result of passing an invalid id with validateId
set to
false
is undefined.
profileID
- the profile for which to retrieve the parent profile idvalidateId
- set to false if the id has already been validated and is known
to be welformed.
profileId
public static String[] getIDSegments(String profileID)
isValid(String)
. If the profile is
deemed invalid an empty array is returned.
profileID
- to retrieve the segments from
public static boolean isValid(String profileID)
profileID
- the profile ID to validate
true
if the profile ID is valid
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.