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
Method Summary |
Resource |
getBrowseView(java.lang.String viewName,
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 should provide the identification key and a descriptive name for all browse
UIs they provide by implementing this method. |
Resource |
getEditView(java.lang.String editName,
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()
Provides information about edit view UIs. |
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()
Provides information about new resource view UIs. |
void |
setEditXSLT(java.lang.String editXSLT)
|
void |
setViewXSLT(java.lang.String viewXSLT)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
viewXSLT
protected java.lang.String viewXSLT
viewTransformer
protected javax.xml.transform.Transformer viewTransformer
editXSLT
protected java.lang.String editXSLT
editTransformer
protected javax.xml.transform.Transformer editTransformer
XSLTBasedUIEnabledHandler
public XSLTBasedUIEnabledHandler()
setViewXSLT
public void setViewXSLT(java.lang.String viewXSLT)
throws RegistryException
- Throws:
RegistryException
setEditXSLT
public void setEditXSLT(java.lang.String editXSLT)
throws RegistryException
- Throws:
RegistryException
getBrowseViews
public java.lang.String[] getBrowseViews()
- Description copied from class:
UIEnabledHandler
- Implementations should 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
- 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
- Provides information about new resource view UIs. Details are similar to
getBrowseViews(...) method.
- Specified by:
getNewViews
in class UIEnabledHandler
- Returns:
- String array containing the information about available UIs.
getBrowseView
public Resource getBrowseView(java.lang.String viewName,
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.
- Specified by:
getBrowseView
in class UIEnabledHandler
- Parameters:
viewName
- 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 editName,
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.
- Specified by:
getEditView
in class UIEnabledHandler
- Parameters:
editName
- 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
- Specified by:
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.