Package org.apache.rampart.policy.model

Examples of org.apache.rampart.policy.model.OptimizePartsConfig


        }
       
    childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.OPTIMISE_PARTS));
        if (childElement != null) {
          OptimizePartsConfig config = (OptimizePartsConfig)new OptimizePartsBuilder().
            build(childElement, factory);
          rampartConfig.setOptimizeParts(config);
        }

        return rampartConfig;
View Full Code Here


       /*
        * Checking whether MTOMSerializable is there. If so set optimizeElement.
        * */
        if(rpd.isMTOMSerialize()){
          msgCtx.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
          OptimizePartsConfig config= rpd.getOptimizePartsConfig();
          if(config != null){
            MessageOptimizer.optimize(msgCtx.getEnvelope(), config.getExpressions(), config.getNamespaces());
          }
        }
       
    }
View Full Code Here

        }
       
    childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.OPTIMISE_PARTS));
        if (childElement != null) {
          OptimizePartsConfig config = (OptimizePartsConfig)new OptimizePartsBuilder().
            build(childElement, factory);
          rampartConfig.setOptimizeParts(config);
        }

        return rampartConfig;
View Full Code Here

        }
       
    childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.OPTIMISE_PARTS));
        if (childElement != null) {
          OptimizePartsConfig config = (OptimizePartsConfig)new OptimizePartsBuilder().
            build(childElement, factory);
          rampartConfig.setOptimizeParts(config);
        }

        return rampartConfig;
View Full Code Here

        }
       
    childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.OPTIMISE_PARTS));
        if (childElement != null) {
          OptimizePartsConfig config = (OptimizePartsConfig)new OptimizePartsBuilder().
            build(childElement, factory);
          rampartConfig.setOptimizeParts(config);
        }

        return rampartConfig;
View Full Code Here

        }
       
    childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.OPTIMISE_PARTS));
        if (childElement != null) {
          OptimizePartsConfig config = (OptimizePartsConfig)new OptimizePartsBuilder().
            build(childElement, factory);
          rampartConfig.setOptimizeParts(config);
        }

        return rampartConfig;
View Full Code Here

* @see OptimizePartsConfig
*/
public class OptimizePartsBuilder implements AssertionBuilder<OMElement> {

  public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
    OptimizePartsConfig assertion = new OptimizePartsConfig();
    OMElement expressionsElem = element.getFirstChildWithName(new QName(RampartConfig.NS, OptimizePartsConfig.EXPRESSIONS_LN));
   
    if(expressionsElem != null){
      Iterator iterator = expressionsElem.getChildElements();
      while(iterator.hasNext()){
        OMElement elem = (OMElement)iterator.next();
        String expression = elem.getText();
        assertion.addExpression(expression);
      }
     
    }
   
    OMElement nsElem = element.getFirstChildWithName(new QName(RampartConfig.NS, OptimizePartsConfig.NAMESPACES_LN));
    if(nsElem != null){
      Iterator iterator = nsElem.getChildElements();
      while(iterator.hasNext()){
        OMElement elem = (OMElement)iterator.next();
        String namespace = elem.getText();
        String prefix = elem.getAttributeValue(new QName("", OptimizePartsConfig.PREFIX_ATTR));
        String uri = elem.getAttributeValue(new QName("", OptimizePartsConfig.URI_ATTR));
        assertion.addNamespaces(prefix, uri);
      }
     
    }
    return assertion;
  }
View Full Code Here

       /*
        * Checking whether MTOMSerializable is there. If so set optimizeElement.
        * */
        if(rpd.isMTOMSerialize()){
          msgCtx.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
          OptimizePartsConfig config= rpd.getOptimizePartsConfig();
          if(config != null){
            MessageOptimizer.optimize(msgCtx.getEnvelope(), config.getExpressions(), config.getNamespaces());
          }
        }
       
    }
View Full Code Here

* @see OptimizePartsConfig
*/
public class OptimizePartsBuilder implements AssertionBuilder{

  public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
    OptimizePartsConfig assertion = new OptimizePartsConfig();
    OMElement expressionsElem = element.getFirstChildWithName(new QName(RampartConfig.NS, OptimizePartsConfig.EXPRESSIONS_LN));
   
    if(expressionsElem != null){
      Iterator iterator = expressionsElem.getChildElements();
      while(iterator.hasNext()){
        OMElement elem = (OMElement)iterator.next();
        String expression = elem.getText();
        assertion.addExpression(expression);
      }
     
    }
   
    OMElement nsElem = element.getFirstChildWithName(new QName(RampartConfig.NS, OptimizePartsConfig.NAMESPACES_LN));
    if(nsElem != null){
      Iterator iterator = nsElem.getChildElements();
      while(iterator.hasNext()){
        OMElement elem = (OMElement)iterator.next();
        String namespace = elem.getText();
        String prefix = elem.getAttributeValue(new QName("", OptimizePartsConfig.PREFIX_ATTR));
        String uri = elem.getAttributeValue(new QName("", OptimizePartsConfig.URI_ATTR));
        assertion.addNamespaces(prefix, uri);
      }
     
    }
    return assertion;
  }
View Full Code Here

        }
       
    childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.OPTIMISE_PARTS));
        if (childElement != null) {
          OptimizePartsConfig config = (OptimizePartsConfig)new OptimizePartsBuilder().
            build(childElement, factory);
          rampartConfig.setOptimizeParts(config);
        }

        return rampartConfig;
View Full Code Here

TOP

Related Classes of org.apache.rampart.policy.model.OptimizePartsConfig

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.