public abstract class UIEnabledHandler extends Handler
Constructor and Description |
---|
UIEnabledHandler() |
Modifier and Type | Method and Description |
---|---|
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.
|
addAssociation, addComment, applyTag, copy, createLink, createVersion, delete, dump, dumpLite, editComment, equals, executeQuery, getAllAssociations, getAssociations, getAverageRating, getComments, getRating, getRegistryContext, getResourcePathsWithTag, getTags, getVersions, hashCode, importChild, importResource, invokeAspect, move, put, putChild, rateResource, removeAssociation, removeComment, removeLink, removeTag, rename, resourceExists, restore, restoreVersion, searchContent
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.Copyright © 2016 WSO2 Inc. All Rights Reserved.