[Registry-dev] svn commit r18910 - in trunk/registry/modules: core/src/main/java/org/wso2/registry core/src/main/java/org/wso2/registry/jdbc/handlers extensions/src/org/wso2/registry/servlet samples/custom-ui-sample1 samples/custom-ui-sample1/resources samples/custom-ui-sample1/src samples/custom-ui-sample1/src/org samples/custom-ui-sample1/src/org/wso2 samples/custom-ui-sample1/src/org/wso2/registry samples/custom-ui-sample1/src/org/wso2/registry/samples samples/custom-ui-sample1/src/org/wso2/registry/samples/handlers samples/custom-ui-sample1/src/org/wso2/registry/samples/handlers/axis2module samples/handler-sample/resources webapps/src/main/webapp/admin
chathura at wso2.com
chathura at wso2.com
Mon Jul 7 10:05:09 PDT 2008
Author: chathura
Date: Mon Jul 7 10:05:08 2008
New Revision: 18910
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=18910
Log:
Implemented the first handler to use the custom UIs.
It displays the custom UIs for Axis2 module configuration files.
This is done as a sample, but we may move it to extensions later.
All the steps for using this is documented in the readme.txt file.
Added:
trunk/registry/modules/samples/custom-ui-sample1/
trunk/registry/modules/samples/custom-ui-sample1/build.xml
trunk/registry/modules/samples/custom-ui-sample1/readme.txt
trunk/registry/modules/samples/custom-ui-sample1/resources/
trunk/registry/modules/samples/custom-ui-sample1/resources/module-edit.xslt
trunk/registry/modules/samples/custom-ui-sample1/resources/module-view.xslt
trunk/registry/modules/samples/custom-ui-sample1/resources/sample-module.xml
trunk/registry/modules/samples/custom-ui-sample1/src/
trunk/registry/modules/samples/custom-ui-sample1/src/org/
trunk/registry/modules/samples/custom-ui-sample1/src/org/wso2/
trunk/registry/modules/samples/custom-ui-sample1/src/org/wso2/registry/
trunk/registry/modules/samples/custom-ui-sample1/src/org/wso2/registry/samples/
trunk/registry/modules/samples/custom-ui-sample1/src/org/wso2/registry/samples/handlers/
trunk/registry/modules/samples/custom-ui-sample1/src/org/wso2/registry/samples/handlers/axis2module/
trunk/registry/modules/samples/custom-ui-sample1/src/org/wso2/registry/samples/handlers/axis2module/Axis2ModuleEditProcessor.java
Modified:
trunk/registry/modules/core/src/main/java/org/wso2/registry/LogEntry.java
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/handlers/XSLTBasedUIEnabledHandler.java
trunk/registry/modules/extensions/src/org/wso2/registry/servlet/registry.xml
trunk/registry/modules/samples/handler-sample/resources/registry.xml
trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
Modified: trunk/registry/modules/core/src/main/java/org/wso2/registry/LogEntry.java
URL: http://wso2.org/svn/browse/wso2/trunk/registry/modules/core/src/main/java/org/wso2/registry/LogEntry.java?rev=18910&r1=18909&r2=18910&view=diff
==============================================================================
--- trunk/registry/modules/core/src/main/java/org/wso2/registry/LogEntry.java (original)
+++ trunk/registry/modules/core/src/main/java/org/wso2/registry/LogEntry.java Mon Jul 7 10:05:08 2008
@@ -26,6 +26,7 @@
// Filters for log queries - these represent the possible actions that get logged.
public static final int ALL = -1;
+ public static final int ADD = 0;
public static final int UPDATE = 1;
public static final int COMMENT = 2;
public static final int TAG = 3;
Modified: trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/handlers/XSLTBasedUIEnabledHandler.java
URL: http://wso2.org/svn/browse/wso2/trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/handlers/XSLTBasedUIEnabledHandler.java?rev=18910&r1=18909&r2=18910&view=diff
==============================================================================
--- trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/handlers/XSLTBasedUIEnabledHandler.java (original)
+++ trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/handlers/XSLTBasedUIEnabledHandler.java Mon Jul 7 10:05:08 2008
@@ -29,6 +29,7 @@
import javax.xml.transform.stream.StreamResult;
import java.io.File;
import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
public class XSLTBasedUIEnabledHandler extends UIEnabledHandler {
@@ -48,10 +49,11 @@
public void setViewXSLT(String viewXSLT) throws RegistryException {
this.viewXSLT = viewXSLT;
- File viewXSLTFile = new File(viewXSLT);
+ InputStream xsltStream =
+ Thread.currentThread().getContextClassLoader().getResourceAsStream(viewXSLT);
try {
- viewTransformer = transformerFactory.newTransformer(new StreamSource(viewXSLTFile));
+ viewTransformer = transformerFactory.newTransformer(new StreamSource(xsltStream));
} catch (TransformerConfigurationException e) {
String msg = "Failed to create transformer for the view UI XSLT. " + e.getMessage();
@@ -62,10 +64,11 @@
public void setEditXSLT(String editXSLT) throws RegistryException {
this.editXSLT = editXSLT;
- File editXSLTFile = new File(editXSLT);
+ InputStream xsltStream =
+ Thread.currentThread().getContextClassLoader().getResourceAsStream(editXSLT);
try {
- editTransformer = transformerFactory.newTransformer(new StreamSource(editXSLTFile));
+ editTransformer = transformerFactory.newTransformer(new StreamSource(xsltStream));
} catch (TransformerConfigurationException e) {
String msg = "Failed to create transformer for the edit UI XSLT. " + e.getMessage();
Modified: trunk/registry/modules/extensions/src/org/wso2/registry/servlet/registry.xml
URL: http://wso2.org/svn/browse/wso2/trunk/registry/modules/extensions/src/org/wso2/registry/servlet/registry.xml?rev=18910&r1=18909&r2=18910&view=diff
==============================================================================
--- trunk/registry/modules/extensions/src/org/wso2/registry/servlet/registry.xml (original)
+++ trunk/registry/modules/extensions/src/org/wso2/registry/servlet/registry.xml Mon Jul 7 10:05:08 2008
@@ -88,17 +88,17 @@
</filter>
</handler>
- <!--<handler class="org.wso2.registry.jdbc.handlers.XSLTBasedUIEnabledHandler">-->
+ <!--handler class="org.wso2.registry.jdbc.handlers.XSLTBasedUIEnabledHandler">
- <!--<property name="viewXSLT">/home/chathura/projects/reg-work/samples/affview.xslt</property>-->
- <!--<property name="editXSLT">/home/chathura/projects/reg-work/samples/affedit.xslt</property>-->
+ <property name="viewXSLT">module-view.xslt</property>
+ <property name="editXSLT">module-edit.xslt</property>
- <!--<filter class="org.wso2.registry.jdbc.handlers.filters.MediaTypeMatcher">-->
- <!--<property name="mediaType">application/aff+xml</property>-->
- <!--</filter>-->
+ <filter class="org.wso2.registry.jdbc.handlers.filters.MediaTypeMatcher">
+ <property name="mediaType">application/am+xml</property>
+ </filter>
- <!--<edit processor="application/aff+xml">org.wso2.registry.jdbc.handlers.samples.custom.AFEditProcessor</edit>-->
- <!--</handler>-->
+ <edit processor="application/am+xml">org.wso2.registry.jdbc.handlers.samples.custom.Axis2ModuleEditProcessor</edit>
+ </handler-->
<!--<handler class="org.wso2.registry.jdbc.handlers.samples.custom.AFHandler">-->
<!--<filter class="org.wso2.registry.jdbc.handlers.filters.MediaTypeMatcher">-->
Added: trunk/registry/modules/samples/custom-ui-sample1/build.xml
URL: http://wso2.org/svn/browse/wso2/trunk/registry/modules/samples/custom-ui-sample1/build.xml?pathrev=18910
==============================================================================
--- (empty file)
+++ trunk/registry/modules/samples/custom-ui-sample1/build.xml Mon Jul 7 10:05:08 2008
@@ -0,0 +1,48 @@
+<project name="custom-ui-sample" basedir="." default="run">
+
+ <property name="dest.dir" value="build" />
+ <property name="dest.dir.classes" value="${dest.dir}/classes" />
+ <property name="dest.dir.lib" value="${dest.dir}/lib" />
+ <property name="registry.home" value="../.." />
+
+ <path id="build.class.path">
+ <fileset dir="${registry.home}/lib">
+ <include name="*.jar" />
+ </fileset>
+ </path>
+
+ <path id="client.class.path">
+ <fileset dir="${registry.home}/lib">
+ <include name="*.jar" />
+ </fileset>
+ <fileset dir="${dest.dir.lib}">
+ <include name="*.jar" />
+ </fileset>
+ </path>
+
+ <target name="clean">
+ <delete dir="${dest.dir}" />
+ </target>
+
+ <target name="prepare">
+ <mkdir dir="${dest.dir}" />
+ <mkdir dir="${dest.dir.classes}" />
+ </target>
+
+ <target name="compile" depends="clean,prepare">
+ <javac srcdir="src" destdir="${dest.dir.classes}">
+ <classpath refid="build.class.path" />
+ </javac>
+ </target>
+
+ <target name="copyresources">
+ <copy file="resources/module-view.xslt" tofile="${dest.dir.classes}/module-view.xslt"/>
+ <copy file="resources/module-edit.xslt" tofile="${dest.dir.classes}/module-edit.xslt"/>
+ </target>
+
+ <target name="run" depends="compile,copyresources,jar"/>
+ <target name="jar">
+ <jar basedir="${dest.dir.classes}" destfile="${dest.dir}/axis2module.jar" />
+ </target>
+</project>
+
Added: trunk/registry/modules/samples/custom-ui-sample1/readme.txt
URL: http://wso2.org/svn/browse/wso2/trunk/registry/modules/samples/custom-ui-sample1/readme.txt?pathrev=18910
==============================================================================
--- (empty file)
+++ trunk/registry/modules/samples/custom-ui-sample1/readme.txt Mon Jul 7 10:05:08 2008
@@ -0,0 +1,48 @@
+Custom UI sample 1
+===================
+
+Introduction
+=============
+
+This sample demonstrates the use of XSLT based custom UIs to render XML content of resources. It provides custom UIs for viewing and editing
+contents of module configuration files of Apache Axis2.
+
+Running the sample
+===================
+
+Follow the following steps to see how custom UIs work. This assumes that you have already deployed the WSO2 Registry in a servlet container.
+
+1) WSO2 Registry does not include the servlet-api.jar required for this sample. So the first step is to put servlet-api.jar in the lib directory
+of the extracted bin distribution.
+
+2) Go to samples/custom-ui-sample1 directory and run ant. This will build the jar file with all the resources required for the Axis2 module
+configuration file's custom UIs.
+
+3) Copy the created axis2module.jar file into class path of the servlet container.
+
+4) Edit the registry.xml file to include the configuration of the new module.
+
+<handler class="org.wso2.registry.jdbc.handlers.XSLTBasedUIEnabledHandler">
+
+ <property name="viewXSLT">module-view.xslt</property>
+ <property name="editXSLT">module-edit.xslt</property>
+
+ <filter class="org.wso2.registry.jdbc.handlers.filters.MediaTypeMatcher">
+ <property name="mediaType">application/am+xml</property>
+ </filter>
+
+ <edit processor="application/am+xml">org.wso2.registry.jdbc.handlers.samples.custom.Axis2ModuleEditProcessor</edit>
+ </handler>
+
+5) Restart the WSO2 Registry web application.
+
+6) Log in to the registry and add (upload) the samples/custom-ui-sample1/resources/sample-module.xml file as a resource. Make sure
+to set the media type of the resource as "application/am+xml".
+
+7) Click on the newly added resource to browse it. You can see the nicely formatted HTML content displaying the module configuration.
+
+8) Click on the "Edit" link at the bottom of the content. You will see a HTML form with input fields for all editable sections
+of the module configuration. Change whatever values you like and click "Apply changes" button at the bottom. You can see that your
+changes are applied to the resource.
+
+
Added: trunk/registry/modules/samples/custom-ui-sample1/resources/module-edit.xslt
URL: http://wso2.org/svn/browse/wso2/trunk/registry/modules/samples/custom-ui-sample1/resources/module-edit.xslt?pathrev=18910
==============================================================================
--- (empty file)
+++ trunk/registry/modules/samples/custom-ui-sample1/resources/module-edit.xslt Mon Jul 7 10:05:08 2008
@@ -0,0 +1,57 @@
+<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+<xsl:param name="resourcePath">a path</xsl:param>
+
+<xsl:template match="module">
+ <form method="post" action="/wso2registry/custom{$resourcePath}">
+ <h3>
+ Axis2 module configuration<br/>
+ Module: <input type="text" name="moduleName" value="{@name}"/>
+ </h3>
+ <p>
+ Module class: <input type="text" name="moduleClass" value="{@class}"/>
+ </p>
+
+ <hr/>
+ <xsl:apply-templates/>
+ <input type="submit" value="Apply changes"/>
+ </form>
+
+</xsl:template>
+
+<xsl:template match="inflow">
+ <h3>In flow</h3>
+ <p>This handler is applied for all incoming messages. Order of engaging handlers are determined by the phase of the handler.</p>
+ <b>Handler: <input type="text" name="inflowHN" value="{handler/@name}"/></b><br/>
+ Handler class: <input type="text" name="inflowHC" value="{handler/@class}"/><br/>
+ Phase: <input type="text" name="inflowPhase" value="{handler/order/@phase}"/><br/>
+ <hr/><br/>
+</xsl:template>
+
+<xsl:template match="outflow">
+ <h3>Out flow</h3>
+ <p>This handler is applied for all outgoing messages. Order of engaging handlers are determined by the phase of the handler.</p>
+ <b>Handler: <input type="text" name="outflowHN" value="{handler/@name}"/></b><br/>
+ Handler class: <input type="text" name="outflowHC" value="{handler/@class}"/><br/>
+ Phase: <input type="text" name="outflowPhase" value="{handler/order/@phase}"/><br/>
+ <hr/><br/>
+</xsl:template>
+
+<xsl:template match="INfaultflow">
+ <h3>In fault flow</h3>
+ <p>This handler is applied for all incoming faulty messages. Order of engaging handlers are determined by the phase of the handler.</p>
+ <b>Handler: <input type="text" name="infflowHN" value="{handler/@name}"/></b><br/>
+ Handler class: <input type="text" name="infflowHC" value="{handler/@class}"/><br/>
+ Phase: <input type="text" name="infflowPhase" value="{handler/order/@phase}"/><br/>
+ <hr/><br/>
+</xsl:template>
+
+<xsl:template match="Outfaultflow">
+ <h3>Out fault flow</h3>
+ <p>This handler is applied for all outgoing faulty messages. Order of engaging handlers are determined by the phase of the handler.</p>
+ <b>Handler: <input type="text" name="outfflowHN" value="{handler/@name}"/></b><br/>
+ Handler class: <input type="text" name="outfflowHC" value="{handler/@class}"/><br/>
+ Phase: <input type="text" name="outfflowPhase" value="{handler/order/@phase}"/><br/>
+ <hr/><br/>
+</xsl:template>
+
+</xsl:stylesheet>
Added: trunk/registry/modules/samples/custom-ui-sample1/resources/module-view.xslt
URL: http://wso2.org/svn/browse/wso2/trunk/registry/modules/samples/custom-ui-sample1/resources/module-view.xslt?pathrev=18910
==============================================================================
--- (empty file)
+++ trunk/registry/modules/samples/custom-ui-sample1/resources/module-view.xslt Mon Jul 7 10:05:08 2008
@@ -0,0 +1,53 @@
+<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+<xsl:template match="module">
+ <h3>
+ Axis2 module configuration<br/>
+ Module: <xsl:value-of select="@name"/>
+ </h3>
+ <p>
+ Module class: <xsl:value-of select="@class"/>
+ </p>
+
+ <hr/>
+ <xsl:apply-templates/>
+
+</xsl:template>
+
+<xsl:template match="inflow">
+ <h3>In flow</h3>
+ <p>This handler is applied for all incoming messages. Order of engaging handlers are determined by the phase of the handler.</p>
+ <b>Handler: <xsl:value-of select="handler/@name"/></b><br/>
+ Handler class: <xsl:value-of select="handler/@class"/><br/>
+ Phase: <xsl:value-of select="handler/order/@phase"/><br/>
+ <hr/><br/>
+</xsl:template>
+
+<xsl:template match="outflow">
+ <h3>Out flow</h3>
+ <p>This handler is applied for all outgoing messages. Order of engaging handlers are determined by the phase of the handler.</p>
+ <b>Handler: <xsl:value-of select="handler/@name"/></b><br/>
+ Handler class: <xsl:value-of select="handler/@class"/><br/>
+ Phase: <xsl:value-of select="handler/order/@phase"/><br/>
+ <hr/><br/>
+</xsl:template>
+
+<xsl:template match="INfaultflow">
+ <h3>In fault flow</h3>
+ <p>This handler is applied for all incoming faulty messages. Order of engaging handlers are determined by the phase of the handler.</p>
+ <b>Handler: <xsl:value-of select="handler/@name"/></b><br/>
+ Handler class: <xsl:value-of select="handler/@class"/><br/>
+ Phase: <xsl:value-of select="handler/order/@phase"/><br/>
+ <hr/><br/>
+</xsl:template>
+
+<xsl:template match="Outfaultflow">
+ <h3>Out fault flow</h3>
+ <p>This handler is applied for all outgoing faulty messages. Order of engaging handlers are determined by the phase of the handler.</p>
+ <b>Handler: <xsl:value-of select="handler/@name"/></b><br/>
+ Handler class: <xsl:value-of select="handler/@class"/><br/>
+ Phase: <xsl:value-of select="handler/order/@phase"/><br/>
+ <hr/><br/>
+</xsl:template>
+
+</xsl:stylesheet>
Added: trunk/registry/modules/samples/custom-ui-sample1/resources/sample-module.xml
URL: http://wso2.org/svn/browse/wso2/trunk/registry/modules/samples/custom-ui-sample1/resources/sample-module.xml?pathrev=18910
==============================================================================
--- (empty file)
+++ trunk/registry/modules/samples/custom-ui-sample1/resources/sample-module.xml Mon Jul 7 10:05:08 2008
@@ -0,0 +1,25 @@
+<module name="logging" class="userguide.loggingmodule.LoggingModule ">
+ <inflow>
+ <handler name="InFlowLogHandler" class="userguide.loggingmodule.LogHandler">
+ <order phase="loggingPhase" />
+ </handler>
+ </inflow>
+
+ <outflow>
+ <handler name="OutFlowLogHandler" class="userguide.loggingmodule.LogHandler">
+ <order phase="loggingPhase"/>
+ </handler>
+ </outflow>
+
+ <Outfaultflow>
+ <handler name="FaultOutFlowLogHandler" class="userguide.loggingmodule.LogHandler">
+ <order phase="loggingPhase"/>
+ </handler>
+ </Outfaultflow>
+
+ <INfaultflow>
+ <handler name="FaultInFlowLogHandler" class="userguide.loggingmodule.LogHandler">
+ <order phase="loggingPhase"/>
+ </handler>
+ </INfaultflow>
+</module>
Added: trunk/registry/modules/samples/custom-ui-sample1/src/org/wso2/registry/samples/handlers/axis2module/Axis2ModuleEditProcessor.java
URL: http://wso2.org/svn/browse/wso2/trunk/registry/modules/samples/custom-ui-sample1/src/org/wso2/registry/samples/handlers/axis2module/Axis2ModuleEditProcessor.java?pathrev=18910
==============================================================================
--- (empty file)
+++ trunk/registry/modules/samples/custom-ui-sample1/src/org/wso2/registry/samples/handlers/axis2module/Axis2ModuleEditProcessor.java Mon Jul 7 10:05:08 2008
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2006, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.registry.jdbc.handlers.samples.custom;
+
+import org.wso2.registry.jdbc.handlers.EditProcessor;
+import org.wso2.registry.exceptions.RegistryException;
+import org.wso2.registry.Registry;
+import org.wso2.registry.Resource;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.stream.XMLStreamException;
+import java.io.StringWriter;
+
+public class Axis2ModuleEditProcessor extends EditProcessor {
+
+ private OMFactory fac;
+
+ public void processEdit(String path, HttpServletRequest request, HttpServletResponse response)
+ throws RegistryException {
+
+ String moduleName = request.getParameter("moduleName");
+ String moduleClass = request.getParameter("moduleClass");
+
+ fac = OMAbstractFactory.getOMFactory();
+ OMElement moduleElement = fac.createOMElement("module", null);
+ moduleElement.addAttribute("name", moduleName, null);
+ moduleElement.addAttribute("class", moduleClass, null);
+
+ moduleElement.addChild(getInflowElement(request));
+ moduleElement.addChild(getOutflowElement(request));
+ moduleElement.addChild(getInfaultflowElement(request));
+ moduleElement.addChild(getOutfaultflowElement(request));
+
+ StringWriter stringWriter = new StringWriter();
+
+ try {
+ moduleElement.serialize(stringWriter);
+ stringWriter.flush();
+ } catch (XMLStreamException e) {
+ String msg = "Failed to serialize edited xml to a string. " + e.getMessage();
+ throw new RegistryException(msg, e);
+ }
+
+ String contentString = stringWriter.getBuffer().toString();
+
+ Registry registry = getRegistry(request);
+ Resource resource = registry.get(path);
+ resource.setContent(contentString);
+
+ registry.put(path, resource);
+ }
+
+ private OMElement getInflowElement(HttpServletRequest request) {
+
+ String handlerName = request.getParameter("inflowHN");
+ String handlerClass = request.getParameter("inflowHC");
+ String phase = request.getParameter("inflowPhase");
+
+ OMElement flowElement = fac.createOMElement("inflow", null);
+
+ OMElement handlerElement = fac.createOMElement("handler", null);
+ handlerElement.addAttribute("name", handlerName, null);
+ handlerElement.addAttribute("class", handlerClass, null);
+ flowElement.addChild(handlerElement);
+
+ OMElement phaseElement = fac.createOMElement("order", null);
+ phaseElement.addAttribute("phase", phase, null);
+ handlerElement.addChild(phaseElement);
+
+ return flowElement;
+ }
+
+ private OMElement getOutflowElement(HttpServletRequest request) {
+
+ String handlerName = request.getParameter("outflowHN");
+ String handlerClass = request.getParameter("outflowHC");
+ String phase = request.getParameter("outflowPhase");
+
+ OMElement flowElement = fac.createOMElement("outflow", null);
+
+ OMElement handlerElement = fac.createOMElement("handler", null);
+ handlerElement.addAttribute("name", handlerName, null);
+ handlerElement.addAttribute("class", handlerClass, null);
+ flowElement.addChild(handlerElement);
+
+ OMElement phaseElement = fac.createOMElement("order", null);
+ phaseElement.addAttribute("phase", phase, null);
+ handlerElement.addChild(phaseElement);
+
+ return flowElement;
+ }
+
+ private OMElement getInfaultflowElement(HttpServletRequest request) {
+
+ String handlerName = request.getParameter("infflowHN");
+ String handlerClass = request.getParameter("infflowHC");
+ String phase = request.getParameter("infflowPhase");
+
+ OMElement flowElement = fac.createOMElement("INfaultflow", null);
+
+ OMElement handlerElement = fac.createOMElement("handler", null);
+ handlerElement.addAttribute("name", handlerName, null);
+ handlerElement.addAttribute("class", handlerClass, null);
+ flowElement.addChild(handlerElement);
+
+ OMElement phaseElement = fac.createOMElement("order", null);
+ phaseElement.addAttribute("phase", phase, null);
+ handlerElement.addChild(phaseElement);
+
+ return flowElement;
+ }
+
+ private OMElement getOutfaultflowElement(HttpServletRequest request) {
+
+ String handlerName = request.getParameter("outfflowHN");
+ String handlerClass = request.getParameter("outfflowHC");
+ String phase = request.getParameter("outfflowPhase");
+
+ OMElement flowElement = fac.createOMElement("Outfaultflow", null);
+
+ OMElement handlerElement = fac.createOMElement("handler", null);
+ handlerElement.addAttribute("name", handlerName, null);
+ handlerElement.addAttribute("class", handlerClass, null);
+ flowElement.addChild(handlerElement);
+
+ OMElement phaseElement = fac.createOMElement("order", null);
+ phaseElement.addAttribute("phase", phase, null);
+ handlerElement.addChild(phaseElement);
+
+ return flowElement;
+ }
+}
Modified: trunk/registry/modules/samples/handler-sample/resources/registry.xml
URL: http://wso2.org/svn/browse/wso2/trunk/registry/modules/samples/handler-sample/resources/registry.xml?rev=18910&r1=18909&r2=18910&view=diff
==============================================================================
--- trunk/registry/modules/samples/handler-sample/resources/registry.xml (original)
+++ trunk/registry/modules/samples/handler-sample/resources/registry.xml Mon Jul 7 10:05:08 2008
@@ -68,8 +68,20 @@
</filter>
</handler>
- <!--<handler class="org.wso2.registry.jdbc.handlers.XSLTBasedUIEnabledHandler">-->
+ <handler class="org.wso2.registry.jdbc.handlers.XSLTBasedUIEnabledHandler">
+
+ <property name="viewXSLT">module-view.xslt</property>
+ <property name="editXSLT">module-edit.xslt</property>
+ <filter class="org.wso2.registry.jdbc.handlers.filters.MediaTypeMatcher">
+ <property name="mediaType">application/am+xml</property>
+ </filter>
+
+ <!--<edit processor="application/aff+xml">org.wso2.registry.jdbc.handlers.samples.custom.AFEditProcessor</edit>-->
+ </handler>
+
+ <!--<handler class="org.wso2.registry.jdbc.handlers.XSLTBasedUIEnabledHandler">-->
+
<!--<property name="viewXSLT">/home/chathura/projects/reg-work/samples/affview.xslt</property>-->
<!--<property name="editXSLT">/home/chathura/projects/reg-work/samples/affedit.xslt</property>-->
Modified: trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
URL: http://wso2.org/svn/browse/wso2/trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp?rev=18910&r1=18909&r2=18910&view=diff
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp (original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp Mon Jul 7 10:05:08 2008
@@ -985,7 +985,7 @@
<% if (RegistryConstants.UI_HTML.equals(details.getUIContent())) { %>
-This should go inside a nice border.
+<hr /><br/>
<%=details.getContentString()%>
<br/>
More information about the Registry-dev
mailing list