|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.registry.jdbc.urlhandlers.URLHandler
public abstract class URLHandler
Base class for URL handlers. URL handlers are used support virtual resources. JDBC registry allows users to access some none-resource entities in the same way they access normal resources (e.g. comments, tags, ratings). These entities can be accessed by providing a special URL to identify the virtual resource.
For example tags for the resource at path /projects/mybank/design can be accessed by the URL /projects/mybank/design?tags. URL handlers are used to support that behavior. That is, we can register URL handlers to handle each type of virtual resource. Then those URL handlers are responsible for interpreting the special URL and generating the virtual resource referred by that URL.
Field Summary | |
---|---|
protected javax.sql.DataSource |
dataSource
Datasource of the registry database. |
protected org.wso2.usermanager.Realm |
realm
Default realm of the user manager used in the registry. |
Constructor Summary | |
---|---|
protected |
URLHandler()
|
|
URLHandler(javax.sql.DataSource dataSource,
org.wso2.usermanager.Realm realm)
|
Method Summary | |
---|---|
boolean |
delete(java.lang.String path)
Determine if delete(...) on the given url can be handled. |
Resource |
get(java.lang.String url)
Determine if get(...) on the given url can be handled. |
java.lang.String |
put(java.lang.String suggestPath,
Resource resource)
Determine if put(...) on the given url can be handled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.sql.DataSource dataSource
protected org.wso2.usermanager.Realm realm
Constructor Detail |
---|
public URLHandler(javax.sql.DataSource dataSource, org.wso2.usermanager.Realm realm)
protected URLHandler()
Method Detail |
---|
public Resource get(java.lang.String url) throws RegistryException
url
- URL to identify the resource to be retrieved.
RegistryException
- URL handler implementations should handle all exceptions and
throw RegistryException if the exception has to propagated to the client.public java.lang.String put(java.lang.String suggestPath, Resource resource) throws RegistryException
suggestPath
- Suggested path to store the resource.resource
- Resource to be stored.
RegistryException
- URL handler implementations should handle all exceptions and
throw RegistryException if the exception has to propagated to the client.public boolean delete(java.lang.String path) throws RegistryException
path
- Path of the resource to be deleted.
RegistryException
- URL handler implementations should handle all exceptions and
throw RegistryException if the exception has to propagated to the client.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |