org.wso2.registry.jdbc.handlers
Class XSLTBasedUIEnabledHandler

java.lang.Object
  extended by org.wso2.registry.jdbc.handlers.Handler
      extended by org.wso2.registry.jdbc.handlers.UIEnabledHandler
          extended by org.wso2.registry.jdbc.handlers.XSLTBasedUIEnabledHandler

public class XSLTBasedUIEnabledHandler
extends UIEnabledHandler


Field Summary
protected  javax.xml.transform.Transformer editTransformer
           
protected  java.lang.String editXSLT
           
protected  javax.xml.transform.Transformer viewTransformer
           
protected  java.lang.String viewXSLT
           
 
Fields inherited from class org.wso2.registry.jdbc.handlers.Handler
authorizationUtil, resourceDAO
 
Constructor Summary
XSLTBasedUIEnabledHandler()
           
 
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 org.wso2.registry.jdbc.handlers.UIEnabledHandler
get, getDefaultBrowseView, getDefaultEditView, getDefaultNewView, getRawResource
 
Methods inherited from class org.wso2.registry.jdbc.handlers.Handler
delete, importChild, importResource, put, putChild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

XSLTBasedUIEnabledHandler

public XSLTBasedUIEnabledHandler()
Method Detail

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.

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.

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.