Examples of PropertyHandler


Examples of com.alibaba.citrus.springext.ResourceResolver.PropertyHandler

            SpringSchemasSourceInfoImpl() {
            }
        }

        // spring.tooling
        resourceResolver.loadAllProperties(TOOLING_PARAMS_LOCATION, new PropertyHandler() {
            public void handle(String key, String value, Resource source, int lineNumber) {
                String namespaceAndParamName = trimToNull(key);

                if (namespaceAndParamName != null) {
                    int index = namespaceAndParamName.indexOf("@");
                    String namespace = null;
                    String paramName = null;

                    if (index >= 0) {
                        namespace = trimToNull(namespaceAndParamName.substring(0, index));
                        paramName = trimToNull(namespaceAndParamName.substring(index + 1));
                    }

                    if (namespace != null && paramName != null) {
                        Map<String, String> params = toolingParameters.get(namespace);

                        if (params == null) {
                            params = createHashMap();
                            toolingParameters.put(namespace, params);
                        }

                        params.put(paramName, trimToNull(value));
                    }
                }
            }
        });

        // spring.schemas
        resourceResolver.loadAllProperties(SCHEMA_MAPPINGS_LOCATION, new PropertyHandler() {
            public void handle(String key, String value, Resource source, int lineNumber) {
                String uri = trimToNull(key);
                String classpathLocation = trimToNull(value);

                if (uri == null || classpathLocation == null) {
                    return; // invalid and ignored
                }

                String schemaName = getSchemaName(uri);
                Matcher matcher = SCHEMA_VERSION_PATTERN.matcher(schemaName);
                String version = null;

                if (matcher.find()) {
                    version = matcher.group(1);
                }

                SpringSchemasSourceInfoImpl pluginSourceInfo = new SpringSchemasSourceInfoImpl();
                pluginSourceInfo.setSource(source, lineNumber);

                Resource schemaSource = getResource(classpathLocation, uri);

                if (schemaSource != null) {
                    Schema schema = SchemaImpl.createSpringPluggableSchema(
                            schemaName, version, true, desc, schemaSource,
                            new SourceInfoSupport<SpringSchemasSourceInfo>(pluginSourceInfo).setSource(schemaSource), toolingParameters);

                    nameToSchemaMappings.put(schemaName, schema);
                    uriToNameMappings.put(uri, schemaName);

                    String namespace = schema.getTargetNamespace();

                    if (namespace != null) {
                        namespaces.add(namespace);
                    }
                }
            }
        });

        // 在spring.handlers中,有一些namespace是没有schema的(例如:http://www.springframework.org/schema/p),所以在spring.schemas中找不到。
        // 但我们需要在这里把它引进来,以方便IDE plugins读取。
        resourceResolver.loadAllProperties(HANDLER_MAPPINGS_LOCATION, new PropertyHandler() {
            public void handle(String key, String value, Resource source, int lineNumber) {
                String namespace = trimToNull(key);

                if (namespace != null) {
                    namespaces.add(namespace);
View Full Code Here

Examples of com.bbn.openmap.PropertyHandler

     * MapHandler, and a PropertyHandler with no properties. The
     * constructor to use to create a blank map framework to add
     * components to.
     */
    public BasicMapPanel() {
        this(new PropertyHandler(new Properties()), false);
    }
View Full Code Here

Examples of com.bbn.openmap.PropertyHandler

     * MapHandler in this MapPanel.
     */
    protected void createComponents() {
        // Make this call first to load the properties into
        // Environment, before the MapBean gets created.
        PropertyHandler ph = getPropertyHandler();
        // Make sure the MapBean is created and added to the
        // MapHandler.
        MapBean mb = getMapBean();
        MapHandler mh = getMapHandler();
        mh.add(this);
        ph.createComponents(getMapHandler());

        // At this point, check the MapHandler to see if a
        // ProjectionFactory has been added. If it hasn't, create one
        // with the default ProjectionLoaders. We might want to
        // remove this at some point, but not having it here will
View Full Code Here

Examples of com.bbn.openmap.PropertyHandler

     * Get the PropertyHandler containing properties used to configure
     * the panel, creating it if it doesn't exist.
     */
    public PropertyHandler getPropertyHandler() {
        if (propertyHandler == null) {
            setPropertyHandler(new PropertyHandler());
        }
        return propertyHandler;
    }
View Full Code Here

Examples of com.bbn.openmap.PropertyHandler

        }
    }

    /** Test cases. */
    public static void main(String[] args) {
        LayerAddPanel lap = new LayerAddPanel(new PropertyHandler(), null);
        Layer[] layers = new Layer[1];
        layers[0] = new com.bbn.openmap.layer.shape.ShapeLayer();

        lap.createPanel(layers);
    }
View Full Code Here

Examples of com.bbn.openmap.PropertyHandler

            servletPathInfo = "";
        }

        Debug.message("wms", "Using map definition:" + mapDefinition);
        try {
            PropertyHandler propHandler = new PropertyHandler(mapDefinition);
            Properties props = propHandler.getProperties();
            WmsRequestHandler wmsRequestHandler = new WmsRequestHandler(schema, hostName,
                    serverPort, contextPath + servletPath + servletPathInfo, props);
            return wmsRequestHandler;
        } catch (java.net.MalformedURLException me) {
            Debug.message("wms", "MS: caught MalformedURLException - \n" + me.getMessage());
View Full Code Here

Examples of com.bbn.openmap.PropertyHandler

        Environment.init(this);
        Debug.init(this, new String[] { "debug.basic", "debug.cspec",
                "debug.layer", "debug.mapbean", "debug.plugin" });

        String propValue = getParameter(PropertiesProperty);
        PropertyHandler propHandler = null;

        try {
            if (propValue != null) {
                propHandler = new PropertyHandler(propValue);
                if (Debug.debugging("app")) {
                    Debug.output("OpenMapApplet: Using properties from "
                            + propValue);
                }
            }
        } catch (MalformedURLException murle) {
            Debug.error("OpenMap: property file specified: "
                    + propValue
                    + " doesn't exist, searching for default openmap.properties file...");
        } catch (IOException ioe) {
            Debug.error("OpenMap: There is a problem using the property file specified: "
                    + propValue
                    + ", searching for default openmap.properties file...");
        }

        if (propHandler == null) {
            propHandler = new PropertyHandler();
        }

        MapPanel mapPanel = new BasicMapPanel(propHandler);
        mapPanel.getMapHandler().add(this);
        Debug.message("app", "OpenMapApplet.init()");
View Full Code Here

Examples of com.bbn.openmap.PropertyHandler

     * @see #getMapHandler
     */
    public static OpenMap create(String propertiesFile) {
        Debug.init();

        PropertyHandler propertyHandler = null;

        if (propertiesFile != null) {
            try {
                propertyHandler = new PropertyHandler(propertiesFile);
            } catch (MalformedURLException murle) {
                Debug.error(murle.getMessage());
                murle.printStackTrace();
                propertyHandler = null;
            } catch (IOException ioe) {
View Full Code Here

Examples of com.bradmcevoy.property.PropertyHandler

    public void setPropertyPermissionService(PropertyAuthoriser propertyPermissionService) {
        log.trace("setPropertyPermissionService: " + propertyPermissionService.getClass().getCanonicalName());
        this.propertyPermissionService = propertyPermissionService;
        for (Handler h : methodHandlers.values()) {
            if (h instanceof PropertyHandler) {
                PropertyHandler ph = (PropertyHandler) h;
                log.trace("set propertyPermissionService on: " + ph.getClass().getCanonicalName());
                ph.setPermissionService(propertyPermissionService);
            }
        }
    }
View Full Code Here

Examples of com.lazerycode.jmeter.properties.PropertyHandler

    libJUnitDir = new File(libDir, "junit");
    libJUnitDir.mkdirs();
  }

  protected void propertyConfiguration() throws MojoExecutionException {
    pluginProperties = new PropertyHandler(testFilesDirectory, binDir, getArtifactNamed(jmeterConfigArtifact), propertiesReplacedByCustomFiles);
    pluginProperties.setJMeterProperties(propertiesJMeter);
    pluginProperties.setJMeterGlobalProperties(propertiesGlobal);
    pluginProperties.setJMeterSaveServiceProperties(propertiesSaveService);
    pluginProperties.setJMeterUpgradeProperties(propertiesUpgrade);
    pluginProperties.setJmeterUserProperties(propertiesUser);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.