All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web.case-mediator.update-mediator.jsp Maven / Gradle / Ivy

There is a newer version: 4.7.219
Show newest version

<%@ 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.switchm.SwitchCaseMediator" %>
<%@ page import="org.wso2.carbon.sequences.ui.util.SequenceEditorHelper" %>
<%@ page import="java.util.regex.Pattern" %>
<%@ page import="org.apache.commons.lang.StringEscapeUtils" %>
<%
    Mediator mediator = SequenceEditorHelper.getEditingMediator(request, session);
    if (!(mediator instanceof SwitchCaseMediator)) {
        // todo : proper error handling
        throw new RuntimeException("Unable to update the mediator");
    }

    SwitchCaseMediator switchCaseMediator = (SwitchCaseMediator) mediator;

    String caseValue = request.getParameter("caseValue");
    caseValue = StringEscapeUtils.escapeXml(caseValue);
    switchCaseMediator.setRegex(Pattern.compile(caseValue));
%>





© 2015 - 2025 Weber Informatics LLC | Privacy Policy