Package org.jvnet.hk2.config.types

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


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


         */
        if (!env.isDas())
            return;

        // FIXME : Use ServerTags, when this is finalized.
        Property initProp = adminService.getProperty("adminConsoleStartup");
        String initPropVal = null;
        if (initProp != null) {
            initPropVal = initProp.getValue();
        }
        if (initPropVal == null) {
            initPropVal = "DEFAULT";
        }

View Full Code Here

        return getDomainName() + SEPARATOR + getClusterName() + SEPARATOR + descriptor_.getUniqueId() ;
    }

    private String getPhysicalDestinationFromConfiguration(String logicalDest, String appName, String moduleName)
            throws ConnectorRuntimeException {
        Property ep = null;
        try {
            //ServerContext sc = ApplicationServer.getServerContext();
            //ConfigContext ctx = sc.getConfigContext();
            //Resources rbeans =                           ServerBeansFactory.getDomainBean(ctx).getResources();
            AdminObjectResource res = null;
            res = (AdminObjectResource)
                    ResourcesUtil.createInstance().getResource(logicalDest, appName, moduleName, AdminObjectResource.class);
            //AdminObjectResource res = (AdminObjectResource)   allResources.getAdminObjectResourceByJndiName(logicalDest);
        if (res == null) {
            String msg = sm.getString("ajra.err_getting_dest", logicalDest);
            throw new ConnectorRuntimeException(msg);
        }

        ep = res.getProperty(PHYSICAL_DESTINATION); //getElementPropertyByName(PHYSICAL_DESTINATION);
        } catch(Exception ce) {
        String msg = sm.getString("ajra.err_getting_dest", logicalDest);
        ConnectorRuntimeException cre = new ConnectorRuntimeException( msg );
        cre.initCause( ce );
            throw cre;
        }

        if (ep == null) {
            String msg = sm.getString("ajra.cannot_find_phy_dest", null);
            throw new ConnectorRuntimeException(msg);
        }

        return ep.getValue();
    }
View Full Code Here

        String msg = sm.getString("ajra.cannot_find_phy_dest");
            throw new ConnectorRuntimeException( msg );
        }

    for (int i=0; i < ep.size(); i++) {
        Property prop = ep.get(i);
        String name = prop.getName();
        if (name.equals(MCFADDRESSLIST)) {
            name = ADDRESSLIST;
        }
        String val = prop.getValue();
        if (val == null || val.equals("")) {
        continue;
        }
            descriptor_.putRuntimeActivationConfigProperty(
                new EnvironmentProperty(name, val, null));
View Full Code Here

    else
      dbProps.setProperty(propertyPrefix + "url", dbJdbcUrl);
  }

        for (Object obj : dbprops){
      Property prop = (Property) obj; 
            String key = prop.getName();
            String value = prop.getValue();
            //don't set a prefix if the property name is already prefixed with "imq."
            if(key.startsWith("imq."))
                dbProps.setProperty(key, value);
            else
                dbProps.setProperty(propertyPrefix + key, value);
View Full Code Here

            String username = null;
            String password = null;
            if (jmsHostProps != null) {
            for (int i =0;i <jmsHostProps.size(); i++) {
                Property jmsProp =(Property)jmsHostProps.get(i);
                String propName = jmsProp.getName();
                String propValue = jmsProp.getValue();
                if ("user-name".equals(propName)) {
                    username = propValue;
                } else if ("password".equals(propName)) {
                    password = propValue;
                }
View Full Code Here

        String instanceName = null;
        String suffix = null;

        if (jmsProperties != null) {
            for (int ii=0; ii < jmsProperties.size(); ii++) {
                Property p = (Property)jmsProperties.get(ii);
                String name = p.getName();

                if (name.equals("instance-name"))
                    instanceName = p.getValue();
                if (name.equals("instance-name-suffix"))
                    suffix = p.getValue();
                if (name.equals("append-version") &&
                    Boolean.valueOf(p.getValue()).booleanValue()) {
                    suffix = Version.getMajorVersion() + "_" +
                        Version.getMinorVersion();
                }
            }
        }
View Full Code Here

        AuthRealm ar = ss.createChild(AuthRealm.class);
        ar.setClassname(LDAPRealm.class.getName());
        ar.setName(FIXED_ADMIN_REALM_NAME);
        List<Property> props = ar.getProperty();

        Property p = ar.createChild(Property.class);
        p.setName(DIR_P);
        p.setValue(url);
        props.add(p);

        p = ar.createChild(Property.class);
        p.setName(BASEDN_P);
        p.setValue(basedn);
        props.add(p);

        p = ar.createChild(Property.class);
        p.setName(JAAS_P);
        p.setValue(JAAS_V);
        props.add(p);

        if (ldapGroupName!= null) {
            p = ar.createChild(Property.class);
            p.setName(Realm.PARAM_GROUP_MAPPING);
            p.setValue(ldapGroupName +"->asadmin"); //appears as gfdomain1->asadmin in domain.xml
            props.add(p);
        }
       
        return ar;
    }
View Full Code Here

        @Override
        public Object run(LoadBalancer loadBalancer) throws
                PropertyVetoException, TransactionFailure {
            List<Property> propertyList = loadBalancer.getProperty();
            Property deviceHostProperty = loadBalancer.getProperty(
                    DEVICE_HOST_PROPERTY);
            if (deviceHostProperty != null) {
                propertyList.remove(deviceHostProperty);
                loadBalancer.setDeviceHost(deviceHostProperty.getValue());
            } else {
                String msg = LbLogUtil.getStringManager().getString(
                        "DeviceHostNotFound", loadBalancer.getName());
                Logger.getAnonymousLogger().log(Level.SEVERE, msg);
                loadBalancer.setDeviceHost("localhost");
            }

            Property devicePortProperty = loadBalancer.getProperty(
                    DEVICE_ADMIN_PORT_PROPERTY);
            if (devicePortProperty != null) {
                propertyList.remove(devicePortProperty);
                loadBalancer.setDevicePort(devicePortProperty.getValue());
            } else {
                String msg = LbLogUtil.getStringManager().getString(
                        "DevicePortNotFound", loadBalancer.getName());
                Logger.getAnonymousLogger().log(Level.SEVERE, msg);
                loadBalancer.setDevicePort("443");
View Full Code Here

        LoadBalancer lb = LbConfigHelper.getLoadBalancer(domain, lbName);
        String lbHost = lb.getDeviceHost();
        String lbPort = lb.getDevicePort();
        String lbProxyHost = null;
        String lbProxyPort = null;
        Property lbProxyHostProperty = lb.getProperty(SSL_PROXY_HOST_PROPERTY);
        if (lbProxyHostProperty != null) {
            lbProxyHost = lbProxyHostProperty.getValue();
            Property lbProxyPortProperty = lb.getProperty(SSL_PROXY_PORT_PROPERTY);
            if (lbProxyPortProperty != null) {
                lbProxyPort = lbProxyPortProperty.getValue();
            }
        }

        boolean isSec = true;
        Property isSecProperty = lb.getProperty(IS_SECURE_PROPERTY);
        if (isSecProperty != null) {
            isSec = Boolean.getBoolean(isSecProperty.getValue());
        }

        _connectionManager = new ConnectionManager(lbHost, lbPort, lbProxyHost, lbProxyPort, lbName, isSec);
        if (ping != null && Boolean.valueOf(ping).booleanValue()) {
            ping(_connectionManager);
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.