Package org.apache.shale.remoting

Examples of org.apache.shale.remoting.Mapping


        }

        // Match this view identifier against our configured patterns
        Iterator mappings = helper.getMappings(context).getMappings().iterator();
        while (mappings.hasNext()) {
            Mapping mapping = (Mapping) mappings.next();
            String resourceId = mapping.mapViewId(context);
            if (resourceId != null) {
                if (log().isTraceEnabled()) {
                    log().trace("View identifier '" + context.getViewRoot().getViewId()
                                + "' matched pattern '" + mapping.getPattern()
                                + "' with resource id '" + resourceId + "'");
                }
                try {
                    Processor processor = mapping.getProcessor();
                    processor.process(context, resourceId);
                } catch (IOException e) {
                    throw new FacesException(e);
                }
                break;
View Full Code Here


                processorClazz = loadClass(processorClass);
            } catch (Exception e) {
                throw new FacesException(e);
            }
            try {
                Mapping mapping = (Mapping) clazz.newInstance();
                mapping.setMappings(mappings);
                mapping.setMechanism(mechanism);
                mapping.setPattern(pattern);
                Processor processor = (Processor) processorClazz.newInstance();
                if (processor instanceof FilteringProcessor) {
                    String excludesPatterns =
                      context.getExternalContext().getInitParameter(excludesName);
                    if (excludesPatterns == null) {
                        excludesPatterns = excludesDefault;
                    }
                    ((FilteringProcessor) processor).setExcludes(excludesPatterns);
                    String includesPatterns =
                      context.getExternalContext().getInitParameter(includesName);
                    if (includesPatterns == null) {
                        includesPatterns = includesDefault;
                    }
                    ((FilteringProcessor) processor).setIncludes(includesPatterns);
                }
                mapping.setProcessor(processor);
                mappings.addMapping(mapping);
            } catch (RuntimeException e) {
                throw e;
            } catch (Exception e) {
                throw new FacesException(e);
View Full Code Here

            throw new NullPointerException();
        }
        synchronized (mappings) {
            Iterator items = mappings.iterator();
            while (items.hasNext()) {
                Mapping item = (Mapping) items.next();
                if (pattern.equals(item.getPattern())) {
                    return item;
                }
            }
            return null;
        }
View Full Code Here

TOP

Related Classes of org.apache.shale.remoting.Mapping

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.