org.wso2.registry.jdbc.handlers
Class XSLTBasedUIEnabledHandler
java.lang.Object
org.wso2.registry.jdbc.handlers.Handler
org.wso2.registry.jdbc.handlers.UIEnabledHandler
org.wso2.registry.jdbc.handlers.XSLTBasedUIEnabledHandler
public class XSLTBasedUIEnabledHandler
- extends UIEnabledHandler
Field Summary |
protected java.util.List<java.lang.String> |
browseViews
|
protected java.util.Map<java.lang.String,java.lang.String> |
browseXSLTs
|
protected java.util.List<java.lang.String> |
editViews
|
protected java.util.Map<java.lang.String,java.lang.String> |
editXSLTs
|
protected java.util.Map<java.lang.String,java.lang.String> |
newHTMLs
|
protected java.util.List<java.lang.String> |
newViews
|
Method Summary |
Resource |
getBrowseView(java.lang.String viewKey,
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. |
java.lang.String[] |
getBrowseViews()
Implementations have to implement this, if they provide more than one browse view. |
Resource |
getEditView(java.lang.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. |
java.lang.String[] |
getEditViews()
Implementations have to implement this, if they provide more than edit browse view. |
Resource |
getNewView(java.lang.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. |
java.lang.String[] |
getNewViews()
Implementations have to implement this, if they provide more than one new view. |
void |
setBrowseXSLT(org.apache.axiom.om.OMElement browseElement)
|
void |
setEditXSLT(org.apache.axiom.om.OMElement editElement)
|
void |
setNewHTML(org.apache.axiom.om.OMElement newElement)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
browseXSLTs
protected java.util.Map<java.lang.String,java.lang.String> browseXSLTs
editXSLTs
protected java.util.Map<java.lang.String,java.lang.String> editXSLTs
newHTMLs
protected java.util.Map<java.lang.String,java.lang.String> newHTMLs
browseViews
protected java.util.List<java.lang.String> browseViews
editViews
protected java.util.List<java.lang.String> editViews
newViews
protected java.util.List<java.lang.String> newViews
XSLTBasedUIEnabledHandler
public XSLTBasedUIEnabledHandler()
setBrowseXSLT
public void setBrowseXSLT(org.apache.axiom.om.OMElement browseElement)
throws RegistryException
- Throws:
RegistryException
setEditXSLT
public void setEditXSLT(org.apache.axiom.om.OMElement editElement)
throws RegistryException
- Throws:
RegistryException
setNewHTML
public void setNewHTML(org.apache.axiom.om.OMElement newElement)
throws RegistryException
- Throws:
RegistryException
getBrowseViews
public java.lang.String[] getBrowseViews()
- Description copied from class:
UIEnabledHandler
- Implementations have to implement this, if they provide more than one browse view.
Implementations can provide the identification key and a descriptive name for all browse
UIs they provide by implementing this method. These information has to be provided as a
string array, where each string contains information about one UI. Information of a UI
should be in the form of ":".
For example, an implementation of this method may look like:
public String[] getBrowseViews() {
return new String[] { "text:Text view", "summary:Summary", "details:Detailed view"};
}
Above example indicates that the handler provides three browse views with keys text, summary
and details.
- Specified by:
getBrowseViews
in class UIEnabledHandler
- Returns:
- String array containing the information about available UIs.
getEditViews
public java.lang.String[] getEditViews()
- Description copied from class:
UIEnabledHandler
- Implementations have to implement this, if they provide more than edit browse view.
Provides information about edit view UIs. Details are similar to getBrowseViews(...) method.
- Specified by:
getEditViews
in class UIEnabledHandler
- Returns:
- String array containing the information about available UIs.
getNewViews
public java.lang.String[] getNewViews()
- Description copied from class:
UIEnabledHandler
- Implementations have to implement this, if they provide more than one new view.
Provides information about new resource view UIs. Details are similar to
getBrowseViews(...) method.
- Overrides:
getNewViews
in class UIEnabledHandler
- Returns:
- String array containing the information about available UIs.
getBrowseView
public Resource getBrowseView(java.lang.String viewKey,
RequestContext requestContext)
throws RegistryException
- Description copied from class:
UIEnabledHandler
- Implementations of this method should generate a HTML UI for rendering the resource content
and set it as the content of the returned resource.
- Overrides:
getBrowseView
in class UIEnabledHandler
- Parameters:
viewKey
- UI key of the browse UI.requestContext
- Details of the request.
- Returns:
- Resource filled with HTML UI as the content.
- Throws:
RegistryException
getEditView
public Resource getEditView(java.lang.String editViewKey,
RequestContext requestContext)
throws RegistryException
- Description copied from class:
UIEnabledHandler
- Implementations of this method should generate a HTML UI for editing the resource content
and set it as the content of the returned resource.
Generated UI should pass following parameters as HTTP request parameters to the custom
edit/new processing servlet. A common method to pass these parameters is to write them
as hidden input values in the generated HTML form.
editProcessor: Name of the EditProcessor to process the request
viewType: This should be set to "edit".
viewKey: Key of the view. EditProcessor implementation may have to act differently according
to the view key.
resourcePath: Path of the resource to be updated
redirectURL: Request will be redirected to this URL after processing is complete. If this is
not given request will be redirected to resourcePath.
- Overrides:
getEditView
in class UIEnabledHandler
- Parameters:
editViewKey
- UI key of the edit UI.requestContext
- Details of the request.
- Returns:
- Resource filled with HTML UI as the content.
- Throws:
RegistryException
getNewView
public Resource getNewView(java.lang.String newViewKey,
RequestContext requestContext)
throws RegistryException
- Description copied from class:
UIEnabledHandler
- 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.
Generated UI should pass following parameters as HTTP request parameters to the custom
edit/new processing servlet. A common method to pass these parameters is to write them
as hidden input values in the generated HTML form.
editProcessor: Name of the EditProcessor to process the request
viewType: This should be set to "new".
viewKey: Key of the view. EditProcessor implementation may have to act differently according
to the view key.
parentPath: Path of the parent collection of the new resource
resourceName: Name of the new resource
redirectURL: Request will be redirected to this URL after processing is complete. If this is
not given request will be redirected to parentPath
- Overrides:
getNewView
in class UIEnabledHandler
- Parameters:
newViewKey
- UI key of the new resource UI.requestContext
- Details of the request.
- Returns:
- Resource filled with HTML UI as the content.
- Throws:
RegistryException
Copyright © 2007 Apache Web Services Project. All Rights Reserved.