Package org.apache.directory.server.config.beans

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_CHANGE_PASSWORD_SERVER_OC.getValue() );

        assertNotNull( configBean );
        ChangePasswordServerBean changePasswordServerBean = ( ChangePasswordServerBean ) configBean
            .getDirectoryServiceBeans().get( 0 );
        assertNotNull( changePasswordServerBean );

        configPartition.destroy();
    }
View Full Code Here


        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_LDAP_SERVER_OC
            .getValue() );

        assertNotNull( configBean );
        LdapServerBean ldapServerBean = ( LdapServerBean ) configBean.getDirectoryServiceBeans().get( 0 );
        assertNotNull( ldapServerBean );

        configPartition.destroy();
    }
View Full Code Here

        configPartition.setSchemaManager( schemaManager );
        configPartition.initialize();

        // Reading the config partition
        ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );
        ConfigBean configBean = cpReader.readConfig();
        assertNotNull( configBean );

        // Creating the config writer
        ConfigWriter configWriter = new ConfigWriter( schemaManager, configBean );
View Full Code Here

        configPartition.initialize();

        ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );

        ConfigBean configBean = cpReader.readConfig( "ou=config" );

        assertNotNull( configBean );
        DirectoryServiceBean directoryServiceBean = ( DirectoryServiceBean ) configBean.getDirectoryServiceBeans().get(
            0 );
        assertNotNull( directoryServiceBean );

        configPartition.destroy();
    }
View Full Code Here

        configPartition.initialize();

        ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );

        ConfigBean configBean = cpReader.readConfig( new Dn( schemaManager,
            "ou=servers,ads-directoryServiceId=default,ou=config" ), ConfigSchemaConstants.ADS_HTTP_SERVER_OC
            .getValue() );

        assertNotNull( configBean );
        HttpServerBean httpServerBean = ( HttpServerBean ) configBean.getDirectoryServiceBeans().get( 0 );
        assertNotNull( httpServerBean );

        configPartition.destroy();
    }
View Full Code Here

        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

     * @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, true );

        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

     * @throws Exception
     * @throws ServerXmlIOException
     */
    private int getTestingPort( LdapServer server ) throws Exception
    {
        ConfigBean configuration = getServerConfiguration( server );

        // LDAP
        if ( isEnableLdap( configuration ) )
        {
            return getLdapPort( configuration );
View Full Code Here

     */
    public String[] checkPortsBeforeServerStart( LdapServer server ) throws Exception
    {
        List<String> alreadyInUseProtocolPortsList = new ArrayList<String>();

        ConfigBean configuration = getServerConfiguration( server );

        // LDAP
        if ( isEnableLdap( configuration ) )
        {
            if ( !AvailablePortFinder.available( getLdapPort( configuration ) ) )
View Full Code Here

        initConfigPartition( instanceLayout, dnFactory, 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,
            dnFactory );
View Full Code Here

TOP

Related Classes of org.apache.directory.server.config.beans.ConfigBean

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.