public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
calculateEntityTag(Resource r)
Calculate the entity tag based on the resource, this is equivalent to the
RegistryAdapter::calculateEntityTag function which calculate entity tag based on the feed
|
static String |
encodeRegistryPath(String path)
Method to encode a registry path.
|
static EmbeddedRegistryService |
getEmbeddedRegistryService()
Method to obtain the embedded registry service instance.
|
static org.apache.abdera.model.Link |
getLinkWithRel(org.apache.abdera.model.Entry entry,
String rel) |
static UserRegistry |
getRegistry(javax.servlet.http.HttpServletRequest request)
Method to obtain the registry from the session.
|
static String |
getUUID(String uri)
Generates a UUID for the given URI.
|
static void |
setEmbeddedRegistry(EmbeddedRegistryService registryService)
Method to set the embedded registry service instance.
|
public static UserRegistry getRegistry(javax.servlet.http.HttpServletRequest request) throws RegistryException
request - the HTTP Servlet Request.RegistryException - if the operation failed.public static void setEmbeddedRegistry(EmbeddedRegistryService registryService)
registryService - the embedded registry service instance.public static EmbeddedRegistryService getEmbeddedRegistryService() throws RegistryException
RegistryException - if the embedded registry service is not available.public static String getUUID(String uri)
uri - the URI.public static String encodeRegistryPath(String path)
path - the registry path.public static String calculateEntityTag(Resource r)
r - Resourcepublic static org.apache.abdera.model.Link getLinkWithRel(org.apache.abdera.model.Entry entry,
String rel)
Copyright © 2016 WSO2 Inc. All Rights Reserved.