Package org.apache.synapse.mediators.transform.url

Examples of org.apache.synapse.mediators.transform.url.URLRewriteMediator


        if (!(m instanceof URLRewriteMediator)) {
            handleException("Unsupported mediator passed in for serialization : " + m.getType());
            return null;
        }

        URLRewriteMediator mediator = (URLRewriteMediator) m;
        OMElement rewrite = fac.createOMElement("rewrite", synNS);       
       
        String inProperty = mediator.getInputProperty();
        String outProperty = mediator.getOutputProperty();
       
        if (inProperty != null) {
          rewrite.addAttribute(fac.createOMAttribute("inProperty", nullNS,
                                                        inProperty));
        }
        if (outProperty != null) {
          rewrite.addAttribute(fac.createOMAttribute("outProperty", nullNS,
                                                        outProperty));
        }

        saveTracingState(rewrite, mediator);
       
        List<RewriteRule> rules = mediator.getRules();
        try {
            for (RewriteRule r : rules) {
                OMElement rule = serializeRule(r);
                rewrite.addChild(rule);
            }
View Full Code Here


    protected Mediator createSpecificMediator(OMElement element, Properties properties) {
        Iterator rules = element.getChildrenWithName(RULE_Q);
        String inputProperty = element.getAttributeValue(ATT_IN_PROPERTY);
        String outputProperty = element.getAttributeValue(ATT_OUT_PROPERTY);

        URLRewriteMediator mediator = new URLRewriteMediator();
        if (inputProperty != null) {
            mediator.setInputProperty(inputProperty);
        }
        if (outputProperty != null) {
            mediator.setOutputProperty(outputProperty);
        }

        while (rules.hasNext()) {
            mediator.addRule(parseRule((OMElement) rules.next()));
        }
        processAuditStatus(mediator, element);
       
        return mediator;
    }
View Full Code Here

        if (!(m instanceof URLRewriteMediator)) {
            handleException("Unsupported mediator passed in for serialization : " + m.getType());
            return null;
        }

        URLRewriteMediator mediator = (URLRewriteMediator) m;
        OMElement rewrite = fac.createOMElement("rewrite", synNS);
        saveTracingState(rewrite, mediator);

        List<RewriteRule> rules = mediator.getRules();
        try {
            for (RewriteRule r : rules) {
                OMElement rule = serializeRule(r);
                rewrite.addChild(rule);
            }
View Full Code Here

    protected Mediator createSpecificMediator(OMElement element, Properties properties) {
        Iterator rules = element.getChildrenWithName(RULE_Q);
        String inputProperty = element.getAttributeValue(ATT_IN_PROPERTY);
        String outputProperty = element.getAttributeValue(ATT_OUT_PROPERTY);

        URLRewriteMediator mediator = new URLRewriteMediator();
        if (inputProperty != null) {
            mediator.setInputProperty(inputProperty);
        }
        if (outputProperty != null) {
            mediator.setOutputProperty(outputProperty);
        }

        while (rules.hasNext()) {
            mediator.addRule(parseRule((OMElement) rules.next()));
        }
        processAuditStatus(mediator, element);
        return mediator;
    }
View Full Code Here

    protected Mediator createSpecificMediator(OMElement element, Properties properties) {
        Iterator rules = element.getChildrenWithName(RULE_Q);
        String inputProperty = element.getAttributeValue(ATT_IN_PROPERTY);
        String outputProperty = element.getAttributeValue(ATT_OUT_PROPERTY);

        URLRewriteMediator mediator = new URLRewriteMediator();
        if (inputProperty != null) {
            mediator.setInputProperty(inputProperty);
        }
        if (outputProperty != null) {
            mediator.setOutputProperty(outputProperty);
        }

        while (rules.hasNext()) {
            mediator.addRule(parseRule((OMElement) rules.next()));
        }
        processAuditStatus(mediator, element);
       
        return mediator;
    }
View Full Code Here

        if (!(m instanceof URLRewriteMediator)) {
            handleException("Unsupported mediator passed in for serialization : " + m.getType());
            return null;
        }

        URLRewriteMediator mediator = (URLRewriteMediator) m;
        OMElement rewrite = fac.createOMElement("rewrite", synNS);       
       
        String inProperty = mediator.getInputProperty();
        String outProperty = mediator.getOutputProperty();
       
        if (inProperty != null) {
          rewrite.addAttribute(fac.createOMAttribute("inProperty", nullNS,
                                                        inProperty));
        }
        if (outProperty != null) {
          rewrite.addAttribute(fac.createOMAttribute("outProperty", nullNS,
                                                        outProperty));
        }

        saveTracingState(rewrite, mediator);
       
        List<RewriteRule> rules = mediator.getRules();
        try {
            for (RewriteRule r : rules) {
                OMElement rule = serializeRule(r);
                rewrite.addChild(rule);
            }
View Full Code Here

TOP

Related Classes of org.apache.synapse.mediators.transform.url.URLRewriteMediator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.