Package java.util

Examples of java.util.Iterator


            address = address + "/" + firstElement.getLocalName();
        } else {
            firstElement = messageContext.getEnvelope().getBody();
        }

        Iterator iter = firstElement.getChildElements();

        String legalCharacters = WSDL2Constants
                .LEGAL_CHARACTERS_IN_QUERY.replaceAll(queryParameterSeparator, "");
        StringBuffer buff = new StringBuffer(params);

        // iterate through the child elements and find the request parameters
        while (iter.hasNext()) {
            OMElement element = (OMElement) iter.next();
            try {
                buff.append(URIEncoderDecoder.quoteIllegal(element.getLocalName(),
                        legalCharacters)).append("=").append(URIEncoderDecoder.quoteIllegal(element.getText(),
                        legalCharacters)).append(queryParameterSeparator);
            } catch (UnsupportedEncodingException e) {
View Full Code Here


    public static final String FRAGMENT_QUERY = "query";
    public static final String FRAGMENT_REF = "ref";
    public static final String FRAGMENT_FULL_URI = "full";

    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

       
        return mediator;
    }

    private RewriteRule parseRule(OMElement ruleElement) {
        Iterator actions = ruleElement.getChildrenWithName(ACTION_Q);
        if (actions == null) {
            handleException("At least one rewrite action is required per rule");
            return null;
        }

        RewriteRule rule = new RewriteRule();
        while (actions.hasNext()) {
            rule.addRewriteAction(parseAction((OMElement) actions.next()));
        }

        OMElement condition = ruleElement.getFirstChildWithName(CONDITION_Q);
        if (condition != null) {
            OMElement child = condition.getFirstElement();
View Full Code Here

        if (localEntriesDir.exists()) {
            if (log.isDebugEnabled()) {
                log.debug("Loading local entry definitions from : " + localEntriesDir.getPath());
            }

            Iterator entryDefinitions = FileUtils.iterateFiles(localEntriesDir, extensions, false);
            while (entryDefinitions.hasNext()) {
                File file = (File) entryDefinitions.next();
                OMElement document = getOMElement(file);
                Entry entry = SynapseXMLConfigurationFactory.defineEntry(synapseConfig, document,
                        properties);
                if (entry != null) {
                    entry.setFileName(file.getName());
View Full Code Here

        if (proxyServicesDir.exists()) {
            if (log.isDebugEnabled()) {
                log.debug("Loading proxy services from : " + proxyServicesDir.getPath());
            }

            Iterator proxyDefinitions = FileUtils.iterateFiles(proxyServicesDir, extensions, false);
            while (proxyDefinitions.hasNext()) {
                File file = (File) proxyDefinitions.next();
                OMElement document = getOMElement(file);
                ProxyService proxy = SynapseXMLConfigurationFactory.defineProxy(synapseConfig,
                        document, properties);
                if (proxy != null) {
                    proxy.setFileName(file.getName());
View Full Code Here

        if (tasksDir.exists()) {
            if (log.isDebugEnabled()) {
                log.debug("Loading tasks from : " + tasksDir.getPath());
            }

            Iterator taskDefinitions = FileUtils.iterateFiles(tasksDir, extensions, false);
            while (taskDefinitions.hasNext()) {
                File file = (File) taskDefinitions.next();
                OMElement document = getOMElement(file);
                Startup startup = SynapseXMLConfigurationFactory.defineStartup(synapseConfig,
                        document, properties);
                startup.setFileName(file.getName());
                synapseConfig.getArtifactDeploymentStore().addArtifact(
View Full Code Here

        if (sequencesDir.exists()) {
            if (log.isDebugEnabled()) {
                log.debug("Loading sequences from : " + sequencesDir.getPath());
            }

            Iterator sequences = FileUtils.iterateFiles(sequencesDir, extensions, false);
            while (sequences.hasNext()) {
                File file = (File) sequences.next();
                OMElement document = getOMElement(file);
                Mediator seq = SynapseXMLConfigurationFactory.defineSequence(synapseConfig,
                        document, properties);
                if (seq != null && seq instanceof SequenceMediator) {
                    SequenceMediator sequence = (SequenceMediator) seq;
View Full Code Here

        File templatesDir = new File(rootDirPath, TEMPLATES_DIR);
        if (templatesDir.exists()) {
            if (log.isDebugEnabled()) {
                log.debug("Loading template from : " + templatesDir.getPath());
            }
            Iterator templates = FileUtils.iterateFiles(templatesDir, extensions, false);
            while (templates.hasNext()) {
                File file = (File) templates.next();
                OMElement document = getOMElement(file);
                OMElement element = document.getFirstChildWithName(
                            new QName(SynapseConstants.SYNAPSE_NAMESPACE, "sequence"));
                if (element != null) {
                    TemplateMediator mediator =
View Full Code Here

        if (endpointsDir.exists()) {
            if (log.isDebugEnabled()) {
                log.debug("Loading endpoints from : " + endpointsDir.getPath());
            }

            Iterator endpoints = FileUtils.iterateFiles(endpointsDir, extensions, false);
            while (endpoints.hasNext()) {
                File file = (File) endpoints.next();
                OMElement document = getOMElement(file);
                Endpoint endpoint = SynapseXMLConfigurationFactory.defineEndpoint(
                        synapseConfig, document, properties);
                if (endpoint != null) {
                    endpoint.setFileName(file.getName());
View Full Code Here

        if (eventsDir.exists()) {
            if (log.isDebugEnabled()) {
                log.debug("Loading event sources from : " + eventsDir.getPath());
            }

            Iterator events = FileUtils.iterateFiles(eventsDir, extensions, false);
            while (events.hasNext()) {
                File file = (File) events.next();
                OMElement document = getOMElement(file);
                SynapseEventSource eventSource = SynapseXMLConfigurationFactory.
                        defineEventSource(synapseConfig, document, properties);
                if (eventSource != null) {
                    eventSource.setFileName(file.getName());
View Full Code Here

TOP

Related Classes of java.util.Iterator

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.