ConfigFromFile.java revision 8196da2152209c8c628611aeeb4adae32079921e
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008-2011 Sun Microsystems, Inc.
* Portions Copyright 2013-2015 ForgeRock AS.
*/
/**
* A class that reads the configuration information from the files.
*/
public class ConfigFromFile extends ConfigReader
{
/**
* Creates a new instance of this config file handler. No initialization
* should be performed here, as all of that work should be done in the
* <CODE>initializeConfigHandler</CODE> method.
*/
public ConfigFromFile()
{
super();
}
/**
* Reads configuration information from the configuration files.
*/
public void readConfiguration()
{
try
{
}
catch (final OpenDsException oe)
{
}
catch (final Throwable t)
{
}
{
}
{
}
}
{
if (mustReadSchema())
{
try
{
readSchema();
{
// Update the schema: so that when we call the server code the
// latest schema read on the server we are managing is used.
}
}
catch (final OpenDsException oe)
{
}
}
}
{
// Get the Directory Server configuration handler and use it.
{
}
}
private void readAdminConnector(final RootCfg root, final List<OpenDsException> errors) throws OpenDsException
{
try
{
}
catch (final ConfigException ce)
{
}
}
private void readConnectionHandlers(final Set<ConnectionHandlerDescriptor> connectionHandlers, final RootCfg root,
{
{
try
{
}
catch (final OpenDsException oe)
{
}
}
}
private void readBackendConfiguration(final Set<BackendDescriptor> backendDescriptors, final RootCfg root,
{
{
try
{
{
final BaseDNDescriptor baseDN =
}
{
}
final BackendDescriptor desc =
new BackendDescriptor(backend.getBackendId(), baseDNs, indexes, vlvIndexes, -1, backend.isEnabled(), type);
{
}
{
}
}
catch (final ConfigException ce)
{
}
}
}
{
if (backend instanceof PluggableBackendCfg)
{
}
else if (backend instanceof LDIFBackendCfg)
{
}
else if (backend instanceof MemoryBackendCfg)
{
}
else if (backend instanceof BackupBackendCfg)
{
}
else if (backend instanceof MonitorBackendCfg)
{
}
else if (backend instanceof TaskBackendCfg)
{
}
else
{
}
}
final Set<VLVIndexDescriptor> vlvIndexes, final BackendCfg backend, final List<OpenDsException> errors)
{
}
private void readBackendIndexes(final Set<IndexDescriptor> indexes, final List<OpenDsException> errors,
final PluggableBackendCfg db)
{
try
{
{
null, IndexTypeDescriptor.fromBackendIndexTypes(index.getIndexType()), index.getIndexEntryLimit()));
}
}
catch (ConfigException ce)
{
}
}
{
try
{
{
}
}
catch (ConfigException ce)
{
}
}
{
try
{
}
catch (final ConfigException ce)
{
return false;
}
}
{
replicationPort = -1;
try
{
return (ReplicationSynchronizationProviderCfg) root.getSynchronizationProvider("Multimaster Synchronization");
}
catch (final ConfigException ce)
{
// Ignore this one
return null;
}
}
{
try
{
{
if (replicationServer != null)
{
}
}
{
{
{
{
{
}
}
}
}
}
}
catch (final ConfigException ce)
{
}
}
private void readAlternateBindDNs(final Set<DN> dns, final RootCfg root, final List<OpenDsException> errors)
{
try
{
{
{
}
}
}
catch (final ConfigException ce)
{
}
}
{
}
private ConnectionHandlerDescriptor getConnectionHandler(final ConnectionHandlerCfg connHandler, final String name)
throws OpenDsException
{
int port;
if (connHandler instanceof LDAPConnectionHandlerCfg)
{
{
}
else if (ldap.isAllowStartTLS())
{
}
else
{
}
}
else if (connHandler instanceof HTTPConnectionHandlerCfg)
{
{
}
else
{
}
}
else if (connHandler instanceof JMXConnectionHandlerCfg)
{
{
}
else
{
}
}
else if (connHandler instanceof LDIFConnectionHandlerCfg)
{
port = -1;
}
else if (connHandler instanceof SNMPConnectionHandlerCfg)
{
}
else
{
port = -1;
}
}
{
{
}
}
private ConnectionHandlerDescriptor getConnectionHandler(final AdministrationConnectorCfg adminConnector)
throws OpenDsException
{
final ConnectionHandlerDescriptor.Protocol protocol = ConnectionHandlerDescriptor.Protocol.ADMINISTRATION_CONNECTOR;
}
}