web.rawXSLT-mediator.edit-mediator.jsp Maven / Gradle / Ivy
<%@page import="org.apache.synapse.mediators.Value" %>
<%@page import="org.apache.synapse.util.xpath.SynapseXPath" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<%@ page import="org.wso2.carbon.mediator.service.ui.Mediator" %>
<%@ page import="org.wso2.carbon.mediator.service.util.MediatorProperty" %>
<%@ page import="org.wso2.carbon.sequences.ui.util.SequenceEditorHelper" %>
<%@ page import="org.wso2.carbon.sequences.ui.util.ns.NameSpacesRegistrar" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page import="org.wso2.carbon.mediator.fastXSLT.FastXSLTMediator" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
<%
Mediator mediator = SequenceEditorHelper.getEditingMediator(request, session);
if (!(mediator instanceof FastXSLTMediator)) {
// todo : proper error handling
throw new RuntimeException("Unable to edit the mediator");
}
FastXSLTMediator fastXSLTMediator = (FastXSLTMediator) mediator;
boolean isKeyDynamic = false;
String keyVal = "";
Value key = fastXSLTMediator.getXsltKey();
if (key != null) {
if (key.getKeyValue() != null) {
isKeyDynamic = false;
keyVal = key.getKeyValue();
} else if (key.getExpression() != null) {
isKeyDynamic = true;
keyVal = key.getExpression().toString();
NameSpacesRegistrar nameSpacesRegistrarKey = NameSpacesRegistrar.getInstance();
nameSpacesRegistrarKey.registerNameSpaces(key.getExpression(), "mediator.fastXSLT.key.dynamic_val", session);
}
}
SynapseXPath sourceXPath = fastXSLTMediator.getSource();
String source = "";
NameSpacesRegistrar nameSpacesRegistrar = NameSpacesRegistrar.getInstance();
if (sourceXPath != null) {
nameSpacesRegistrar.registerNameSpaces(sourceXPath, "mediator.fastXSLT.source", session);
source = sourceXPath.toString();
}
List mediatorPropertyList = fastXSLTMediator.getProperties();
nameSpacesRegistrar.registerNameSpaces(mediatorPropertyList, "propertyValue", session);
List featureList = fastXSLTMediator.getFeatures();
String propertyTableStyle = mediatorPropertyList.isEmpty() ? "display:none;" : "";
String featureTableStyle = featureList.isEmpty() ? "display:none;" : "";
Map resources = fastXSLTMediator.getResources();
%>
:
/>
/>
>
*
>
*
© 2015 - 2025 Weber Informatics LLC | Privacy Policy