Package com.polarion.alm.ws.client
Class Utils
java.lang.Object
com.polarion.alm.ws.client.Utils
Utility classes for Polarion Web Services.
Encoded location is triplet (REPOSITORY_NAME:)LOCATION_PATH(#REVISION),
e.g. a/b#123 or default:/a/b. Each component is encoded so that all
\ is prepended before every one of \:#.
For more information on locations see
com.polarion.subterra.base.location.ILocation from Polarion Java API.
- Since:
- 3.4.1
- Author:
- Stepan Roh
-
Method Summary
Modifier and TypeMethodDescriptionstatic String[]decodeLocation(String encodedLocation) Decodes location encoded byencodeLocation(String, String, String)or returned via web service call.static StringencodeAbsoluteLocationWithDefaultRepository(String locationPath, String revision) Encode absolute location pointing to default repository.static StringencodeLocation(String repositoryName, String locationPath, String revision) Encode location.static StringencodeRelativeLocation(String locationPath, String revision) Encode relative location.
-
Method Details
-
encodeLocation
Encode location.Usage of
encodeAbsoluteLocationWithDefaultRepository(String, String)andencodeRelativeLocation(String, String)is preferable.- Parameters:
repositoryName- repository name ornulllocationPath- location path (notnull)revision- revision ornull- Returns:
- encoded location (never
null) - See Also:
-
encodeAbsoluteLocationWithDefaultRepository
public static String encodeAbsoluteLocationWithDefaultRepository(String locationPath, String revision) Encode absolute location pointing to default repository.- Parameters:
locationPath- location path, should start with/(notnull)revision- revision ornull- Returns:
- encoded location (never
null) - See Also:
-
encodeRelativeLocation
Encode relative location.- Parameters:
locationPath- location path, should not start with/(notnull)revision- revision ornull- Returns:
- encoded location (never
null) - See Also:
-
decodeLocation
Decodes location encoded byencodeLocation(String, String, String)or returned via web service call.- Parameters:
encodedLocation- encoded location- Returns:
- triplet [repository name (can be
null), location path, revision (can benull)] ornullifencodedLocationis alsonull
-