|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.registry.core.jdbc.handlers.Handler
org.wso2.carbon.registry.core.jdbc.handlers.UIEnabledHandler
public abstract class UIEnabledHandler
Base class for handler implementations which generate custom UIs. There are three main categories of custom UIs. Those are:
Browse: Displays the resource contents in read-only mode. Edit: Provides controls for editing the contents of an existing resource. New: Provides controls for creating a new resource. Handler may provide any number of UIs under above three categories. For example handler may provide two UIs to browse the contents of an XML file. Handler implementations should provide the UI key and descriptive name for the UI for each of the UIs there are generating. Edit and New UIs should have an associated EditProcessor implementation to convert the UI inputs to resource content.
Field Summary |
---|
Fields inherited from class org.wso2.carbon.registry.core.jdbc.handlers.Handler |
---|
resourceDAO |
Constructor Summary | |
---|---|
UIEnabledHandler()
|
Method Summary | |
---|---|
Resource |
get(RequestContext requestContext)
Implementation of the Handler.get(org.wso2.carbon.registry.core.jdbc.handlers.RequestContext) method of the Handler class. |
Resource |
getBrowseView(String browseViewKey,
RequestContext requestContext)
Implementations of this method should generate a HTML UI for rendering the resource content and set it as the content of the returned resource. |
abstract String[] |
getBrowseViews()
Implementations have to implement this, if they provide more than one browse view. |
String |
getDefaultBrowseView()
Among the multiple views that a handler may generate, one view is identified as the default view, which is used to render the contents, if UI is not specified. |
String |
getDefaultEditView()
Among the multiple views that a handler may generate, one view is identified as the default view, which is used to edit the contents, if UI is not specified. |
String |
getDefaultNewView()
Among the multiple views that a handler may generate, one view is identified as the default view, which is used to render the new resource creation UI, if UI is not specified. |
Resource |
getEditView(String editViewKey,
RequestContext requestContext)
Implementations of this method should generate a HTML UI for editing the resource content and set it as the content of the returned resource. |
abstract String[] |
getEditViews()
Implementations have to implement this, if they provide more than edit browse view. |
Resource |
getNewView(String newViewKey,
RequestContext requestContext)
Implementations of this method should generate a HTML UI for creating a new resource content and set it as the content of the returned resource. |
String[] |
getNewViews()
Implementations have to implement this, if they provide more than one new view. |
Resource |
getRawResource(RequestContext requestContext)
Returns a Resource instance specified in the requestContext. |
protected void |
setDefaultBrowseView(String viewName)
Method to set the default browse view. |
protected void |
setDefaultEditView(String viewName)
Method to set the default edit view. |
protected void |
setDefaultNewView(String viewName)
Method to set the default new view. |
Methods inherited from class org.wso2.carbon.registry.core.jdbc.handlers.Handler |
---|
addAssociation, addComment, applyTag, copy, createLink, createVersion, delete, dump, editComment, equals, executeQuery, getAllAssociations, getAssociations, getAverageRating, getComments, getRating, getResourcePathsWithTag, getTags, getVersions, hashCode, importChild, importResource, invokeAspect, move, put, putChild, rateResource, removeAssociation, removeComment, removeLink, removeTag, rename, resourceExists, restore, restoreVersion, searchContent |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UIEnabledHandler()
Method Detail |
---|
public Resource get(RequestContext requestContext) throws RegistryException
Handler.get(org.wso2.carbon.registry.core.jdbc.handlers.RequestContext)
method of the Handler class. UIEnabledHandler
implementations should not implement (override) this method. Instead, they should implement
getBrowseView(java.lang.String, org.wso2.carbon.registry.core.jdbc.handlers.RequestContext)
, getEditView(java.lang.String, org.wso2.carbon.registry.core.jdbc.handlers.RequestContext)
and getNewView(java.lang.String, org.wso2.carbon.registry.core.jdbc.handlers.RequestContext)
methods to generate
corresponding UIs.
get
in class Handler
requestContext
- Details of the request.
RegistryException
public Resource getRawResource(RequestContext requestContext) throws RegistryException
requestContext
- Request details.
RegistryException
- if an error occurs while getting the raw resource.public abstract String[] getBrowseViews()
public abstract String[] getEditViews()
getBrowseViews()
method.
public String[] getNewViews()
getBrowseViews()
method.
public String getDefaultBrowseView()
protected void setDefaultBrowseView(String viewName)
viewName
- UI key of the default browse UIpublic String getDefaultEditView()
protected void setDefaultEditView(String viewName)
viewName
- UI key of the default edit UIpublic String getDefaultNewView()
protected void setDefaultNewView(String viewName)
viewName
- UI key of the default new UIpublic Resource getBrowseView(String browseViewKey, RequestContext requestContext) throws RegistryException
browseViewKey
- UI key of the browse UI.requestContext
- Details of the request.
RegistryException
- if an error occurs while getting the browse view.public Resource getEditView(String editViewKey, RequestContext requestContext) throws RegistryException
editViewKey
- UI key of the edit UI.requestContext
- Details of the request.
RegistryException
- if an error occurs while getting the edit view.public Resource getNewView(String newViewKey, RequestContext requestContext) throws RegistryException
newViewKey
- UI key of the new resource UI.requestContext
- Details of the request.
RegistryException
- if an error occurs while getting the new view.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |