Examples of ConfigBean


Examples of org.apache.directory.server.config.beans.ConfigBean

     * @throws ConfigurationException
     */
    public ConfigBean readConfig( Dn baseDn, String objectClass ) throws ConfigurationException
    {
        LOG.debug( "Reading configuration for the {} element, from {} ", objectClass, baseDn );
        ConfigBean configBean = new ConfigBean();

        if ( baseDn == null )
        {
            baseDn = configPartition.getSuffixDn();
        }

        List<AdsBaseBean> beans = read( baseDn, objectClass, SearchScope.ONELEVEL, MANDATORY );

        if ( LOG.isDebugEnabled() )
        {
            if ( ( beans == null ) || ( beans.size() == 0 ) )
            {
                LOG.debug( "No {} element to read", objectClass );
            }
            else
            {
                LOG.debug( beans.get( 0 ).toString() );
            }
        }

        configBean.setDirectoryServiceBeans( beans );

        return configBean;
    }
View Full Code Here

Examples of org.apache.directory.server.config.beans.ConfigBean

        configPartition.setSchemaManager( schemaManager );
       
        configPartition.initialize();
        ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );
       
        ConfigBean configBean = cpReader.readConfig( new Dn( schemaManager, "ou=servers,ads-directoryServiceId=default,ou=config" ), ConfigSchemaConstants.ADS_DNS_SERVER_OC.getValue() );

        assertNotNull( configBean );
        DnsServerBean dnsServerBean = (DnsServerBean)configBean.getDirectoryServiceBeans().get( 0 );
        assertNotNull( dnsServerBean );

        configPartition.destroy();
    }
View Full Code Here

Examples of org.apache.directory.server.config.beans.ConfigBean

        configPartition.setSchemaManager( schemaManager );
       
        configPartition.initialize();
        ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );
       
        ConfigBean configBean = cpReader.readConfig( new Dn( schemaManager, "ou=servers,ads-directoryServiceId=default,ou=config" ), ConfigSchemaConstants.ADS_KERBEROS_SERVER_OC.getValue() );

        assertNotNull( configBean );
        KdcServerBean kdcServerBean = (KdcServerBean)configBean.getDirectoryServiceBeans().get( 0 );
        assertNotNull( kdcServerBean );

        configPartition.destroy();
    }
View Full Code Here

Examples of org.apache.directory.server.config.beans.ConfigBean

        initConfigPartition( instanceLayout, cacheService );

        // Read the configuration
        cpReader = new ConfigPartitionReader( configPartition );

        ConfigBean configBean = cpReader.readConfig();

        DirectoryServiceBean directoryServiceBean = configBean.getDirectoryServiceBean();

        // Initialize the DirectoryService now
        DirectoryService directoryService = initDirectoryService( instanceLayout, directoryServiceBean, cacheService );

        // start the LDAP server
View Full Code Here

Examples of org.apache.directory.server.config.beans.ConfigBean

        initConfigPartition( instanceLayout, cacheService );

        // Read the configuration
        cpReader = new ConfigPartitionReader( configPartition );

        ConfigBean configBean = cpReader.readConfig();

        DirectoryServiceBean directoryServiceBean = configBean.getDirectoryServiceBean();

        // Initialize the DirectoryService now
        DirectoryService directoryService = initDirectoryService( instanceLayout, directoryServiceBean, cacheService );

        // start the LDAP server
View Full Code Here

Examples of org.apache.shale.clay.config.beans.ConfigBean

            throw new IllegalArgumentException(messages.getMessage(
                    "missing.attribute", new Object[] { "var", "clayForEach" }));
        }

        // lookup the ConfigBean that handles the bodyJsfid
        ConfigBean config = ConfigBeanFactory.findConfig(bodyJsfid);
        if (config == null) {
            throw new NullPointerException(messages
                    .getMessage("clay.config.notloaded"));
        }

        // make sure it's parsed and cached
        ComponentBean b = config.getElement(bodyJsfid);
        if (b == null) {
            throw new NullPointerException(messages.getMessage(
                    "clay.jsfid.notfound", new Object[] { bodyJsfid }));
        }

        ValueBinding vb = context.getApplication().createValueBinding(value);
        final Object valueList = vb.getValue(context);

        Map beans = new TreeMap();
        int i = 0;
        Iterator vi = null;
        if (valueList == null) {
            vi = Collections.EMPTY_LIST.iterator();
        } else if (valueList instanceof List) {
            vi = ((List) valueList).iterator();
        } else if (valueList instanceof Map) {
            vi = ((Map) valueList).entrySet().iterator();
        } else {
            Object[] anArray = new Object[0];
            if (anArray.getClass().isAssignableFrom(valueList.getClass())) {
                vi = new Iterator() {
                    private int index = 0;

                    private final Object[] list = (Object[]) valueList;

                    public boolean hasNext() {
                        return (index < list.length);
                    }

                    public Object next() {
                        return list[index++];
                    }

                    public void remove() {
                    };

                };
            } else {
                throw new IllegalArgumentException(messages.getMessage(
                        "invalid.collectiontype", new Object[] { value }));
            }
        }

        if (vi != null) {
            while (vi.hasNext()) {
                // create a key for the beans map
                StringBuffer id = new StringBuffer("bean" + ++i);
                // add the subscripted bean to the beans map with the generated
                // key
                beans.put(id.toString(), vi.next());

                // create a naming container to hold the row
                ElementBean namingContainer = new ElementBean();
                namingContainer.setRenderId(i);
                namingContainer.setJsfid("namingContainer");
                namingContainer.setComponentType("javax.faces.NamingContainer");

                // create a new nested bean
                ElementBean target = new ElementBean();
                target.setJsfid(bodyJsfid);
                target.setExtends(bodyJsfid);
                target.setRenderId(i);
                config.assignParent(target);
                config.realizingInheritance(target);

                // prepend the var to the generated key
                id.insert(0, var + ".");
                SymbolBean symbol = new SymbolBean();
                symbol.setName(Globals.MANAGED_BEAN_MNEMONIC);
View Full Code Here

Examples of org.eweb4j.config.bean.ConfigBean

  public synchronized static void writeProp(String propId, String key,
      Object value) throws IOException {
    if (propId == null)
      return;

    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class);
    List<Prop> files = cb.getProperties().getFile();
    for (Prop f : files) {
      if (propId.equals(f.getId())) {

        Hashtable<String, String> map = props.get(propId);
        if (map == null) {
View Full Code Here

Examples of org.jvnet.hk2.config.ConfigBean

            throwError(Status.FORBIDDEN, message);
        }

        if (getDeleteCommand().equals("GENERIC-DELETE")) {
            try {
                ConfigBean p = (ConfigBean) parent;
                if (parent == null) {
                    p = (ConfigBean) entity.parent();
                }
                ConfigSupport.deleteChild(p, (ConfigBean) entity);
                return ExitCode.SUCCESS;
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.