Package org.jvnet.hk2.config.types

Examples of org.jvnet.hk2.config.types.Property


        managedExecutorService.setThreadLifetimeSeconds(threadLifetimeSeconds);
        managedExecutorService.setTaskQueueCapacity(taskQueueCapacity);
        managedExecutorService.setEnabled(enabled);
        if (properties != null) {
            for ( Map.Entry e : properties.entrySet()) {
                Property prop = managedExecutorService.createChild(Property.class);
                prop.setName((String)e.getKey());
                prop.setValue((String)e.getValue());
                managedExecutorService.getProperty().add(prop);
            }
        }
        return managedExecutorService;
    }
View Full Code Here


        contextService.setContextInfoEnabled(contextInfoEnabled);
        contextService.setContextInfo(contextInfo);
        contextService.setEnabled(enabled);
        if (properties != null) {
            for ( Map.Entry e : properties.entrySet()) {
                Property prop = contextService.createChild(Property.class);
                prop.setName((String)e.getKey());
                prop.setValue((String)e.getValue());
                contextService.getProperty().add(prop);
            }
        }
        return contextService;
    }
View Full Code Here

                !propName.equals(ServerTags.DIRECTORY_DEPLOYED) &&
                !propName.startsWith(
                    DeploymentProperties.APP_CONFIG))
                    {
                if (appProps.getProperty(propName) != null) {
                    Property prop = app.createChild(Property.class);
                    app.getProperty().add(prop);
                    prop.setName(propName);
                    prop.setValue(appProps.getProperty(propName));
                }
            }
        }
    }
View Full Code Here

            List<String> vsList = StringUtils.parseStringList(vsIDs, " ,");
            if (httpService != null && vsList != null && !vsList.isEmpty()) {
                for (VirtualServer vsBean : httpService.getVirtualServer()) {
                    if (vsList.contains(vsBean.getId())) {
                        Boolean csr = null;
                        Property prop = vsBean.getProperty("contextXmlDefault");
                        if (prop != null) {
                            File contextXml = new File(serverEnvironment.getInstanceRoot(),
                                    prop.getValue());
                            if (contextXml.exists()) {  // vs context.xml
                                ContextXmlParser parser = new ContextXmlParser(contextXml);
                                csr = parser.getClearReferencesStatic();
                            }
                        }
View Full Code Here

            ServerTags.IS_COMPOSITE))) {
            moduleProps.remove(ServerTags.IS_COMPOSITE);
            for (Iterator itr = moduleProps.keySet().iterator();
                itr.hasNext();) {
                String propName = (String) itr.next();
                Property prop = module.createChild(Property.class);
                module.getProperty().add(prop);
                prop.setName(propName);
                prop.setValue(moduleProps.getProperty(propName));
            }
        }

        for (EngineRef ref : _getEngineRefs()) {
            Engine engine = module.createChild(Engine.class);
View Full Code Here

            List<String> vsList = StringUtils.parseStringList(vsIDs, " ,");
            if (httpService != null && vsList != null && !vsList.isEmpty()) {
                for (VirtualServer vsBean : httpService.getVirtualServer()) {
                    if (vsList.contains(vsBean.getId())) {
                        Boolean csr = null;
                        Property prop = vsBean.getProperty("contextXmlDefault");
                        if (prop != null) {
                            File contextXml = new File(serverEnvironment.getInstanceRoot(),
                                    prop.getValue());
                            if (contextXml.exists()) {  // vs context.xml
                                ContextXmlParser parser = new ContextXmlParser(contextXml);
                                csr = parser.getClearReferencesStatic();
                            }
                        }
View Full Code Here

     */
    private <T extends PropertyBag & ConfigBeanProxy> Property addProperty(
            final String propName,
            final String propValue,
            final T owner_w) throws TransactionFailure, PropertyVetoException {
        final Property p = owner_w.createChild(Property.class);
        p.setName(propName);
        p.setValue(propValue);
        owner_w.getProperty().add(p);
        return p;
    }
View Full Code Here

        final Transaction t = new Transaction();
        try {
            for (Application app : domain.getApplications().getApplications()) {
                System.out.println("Checking app " + app.getName());
                Application app_w = null;
                Property oldSetting = app.getProperty(V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME);
                if (oldSetting != null) {
                    logger.log(Level.INFO, "For application {0} converting property {1} to {2}",
                    new Object[] {
                        app.getName(),
                        V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME,
                        GF3_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME});
                    app_w = t.enroll(app);
                    addProperty(GF3_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME,
                            oldSetting.getValue(), app_w);
                    app_w.getProperty().remove(oldSetting);
                }
                for (Module mod : app.getModule()) {
                    if (mod.getEngine(APPCLIENT_SNIFFER_NAME) != null) {
                        /*
                         * This is an app client.  See if the client has
                         * a property setting using the old name.
                         */
                        oldSetting = mod.getProperty(V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME);
                        if (oldSetting != null) {
                            logger.log(Level.INFO, "For application {0}/module {1} converting property {2} to {3}",
                                new Object[] {
                                    app.getName(),
                                    mod.getName(),
                                    V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME,
                                    GF3_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME});
                            final Module mod_w = t.enroll(mod);
                            addProperty(GF3_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME,
                                    oldSetting.getValue(),
                                    mod_w);
                            mod_w.getProperty().remove(oldSetting);
                        }
                    }
                }
View Full Code Here

        return deployed;
    }

    private static boolean isUpgrade(String resource, EjbTimerService _ejbt, File root) {
        boolean upgrade = false;
        Property prop = null;
        if (_ejbt != null) {
            List<Property> properties = _ejbt.getProperty();
            if (properties != null) {
                for (Property p : properties) {
                    if (p.getName().equals(EjbContainerUtil.TIMER_SERVICE_UPGRADED)) {
View Full Code Here

        managedThreadFactory.setContextInfo(contextInfo);
        managedThreadFactory.setThreadPriority(threadPriority);
        managedThreadFactory.setEnabled(enabled);
        if (properties != null) {
            for ( Map.Entry e : properties.entrySet()) {
                Property prop = managedThreadFactory.createChild(Property.class);
                prop.setName((String)e.getKey());
                prop.setValue((String)e.getValue());
                managedThreadFactory.getProperty().add(prop);
            }
        }
        return managedThreadFactory;
    }
View Full Code Here

TOP

Related Classes of org.jvnet.hk2.config.types.Property

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.