org.wso2.registry.utils
Class RegistryUtils
java.lang.Object
org.wso2.registry.utils.RegistryUtils
public class RegistryUtils
- extends java.lang.Object
Field Summary |
static org.apache.commons.logging.Log |
log
|
Method Summary |
static boolean |
containsAsSubstring(java.lang.String value,
java.lang.String[] array)
|
static boolean |
containsString(java.lang.String value,
java.lang.String[] array)
|
static java.lang.String |
getParentPath(java.lang.String resourcePath)
|
static java.lang.String |
getPureResourcePath(java.lang.String resourcePath)
All "valid" paths pure resources should be in the form /c1/c2/r1. |
static java.lang.String |
getResourceName(java.lang.String resourcePath)
|
static VersionedPath |
getVersionedPath(ResourcePath resourcePath)
Paths refering to a version of a resource are in the form /c1/c2/r1?v=2. |
static java.lang.String |
prepareGeneralPath(java.lang.String rawPath)
Prepare the given path as a general resource path to be used in the registry. |
static void |
redirect(javax.servlet.http.HttpServletResponse response,
java.lang.String url)
|
static java.lang.String |
removeUISuffixes(java.lang.String path)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static final org.apache.commons.logging.Log log
RegistryUtils
public RegistryUtils()
getVersionedPath
public static VersionedPath getVersionedPath(ResourcePath resourcePath)
- Paths refering to a version of a resource are in the form /c1/c2/r1?v=2. Give a such
version path, this method extracts the valid pure path and the version number of the
resource. Note that this method should only be used for pure resource paths.
- Parameters:
resourcePath
- versioned resource path.
- Returns:
- VersionPath object containing the valid resource path and the version number.
getPureResourcePath
public static java.lang.String getPureResourcePath(java.lang.String resourcePath)
- All "valid" paths pure resources should be in the form /c1/c2/r1. That is they should start
with "/" and should not end with "/". Given a path of a pure resource, this method prepares
the valid path for that path.
- Parameters:
resourcePath
- Path of a pure resource.
- Returns:
- Valid path of the pure resource.
getParentPath
public static java.lang.String getParentPath(java.lang.String resourcePath)
getResourceName
public static java.lang.String getResourceName(java.lang.String resourcePath)
redirect
public static void redirect(javax.servlet.http.HttpServletResponse response,
java.lang.String url)
prepareGeneralPath
public static java.lang.String prepareGeneralPath(java.lang.String rawPath)
- Prepare the given path as a general resource path to be used in the registry. General
resource paths may refer to pure resources or virtual resources.
- Parameters:
rawPath
- Raw path to be prepared
- Returns:
- Prepared general resource path
removeUISuffixes
public static java.lang.String removeUISuffixes(java.lang.String path)
containsString
public static boolean containsString(java.lang.String value,
java.lang.String[] array)
containsAsSubstring
public static boolean containsAsSubstring(java.lang.String value,
java.lang.String[] array)
Copyright © 2007 Apache Web Services Project. All Rights Reserved.