| | |
| | | { |
| | | ex.add(oe); |
| | | } |
| | | String[] connectionHandlers = root.listConnectionHandlers(); |
| | | for (int i=0; i<connectionHandlers.length; i++) |
| | | for (String connHandler : root.listConnectionHandlers()) |
| | | { |
| | | try |
| | | { |
| | | ConnectionHandlerCfgClient connectionHandler = |
| | | root.getConnectionHandler(connectionHandlers[i]); |
| | | ls.add(getConnectionHandler(connectionHandler, |
| | | connectionHandlers[i])); |
| | | root.getConnectionHandler(connHandler); |
| | | ls.add(getConnectionHandler(connectionHandler, connHandler)); |
| | | } |
| | | catch (OpenDsException oe) |
| | | { |
| | |
| | | } |
| | | isSchemaEnabled = root.getGlobalConfiguration().isCheckSchema(); |
| | | |
| | | String[] backendNames = root.listBackends(); |
| | | for (int i=0; i<backendNames.length; i++) |
| | | for (String backendName : root.listBackends()) |
| | | { |
| | | try |
| | | { |
| | | BackendCfgClient backend = root.getBackend(backendNames[i]); |
| | | BackendCfgClient backend = root.getBackend(backendName); |
| | | Set<BaseDNDescriptor> baseDNs = new HashSet<BaseDNDescriptor>(); |
| | | for (DN dn : backend.getBaseDN()) |
| | | { |
| | |
| | | { |
| | | type = BackendDescriptor.Type.LOCAL_DB; |
| | | LocalDBBackendCfgClient db = (LocalDBBackendCfgClient)backend; |
| | | String[] indexNames = db.listLocalDBIndexes(); |
| | | try |
| | | { |
| | | for (int j=0; j<indexNames.length; j++) |
| | | for (String indexName : db.listLocalDBIndexes()) |
| | | { |
| | | LocalDBIndexCfgClient index = db.getLocalDBIndex(indexNames[j]); |
| | | LocalDBIndexCfgClient index = db.getLocalDBIndex(indexName); |
| | | indexes.add(new IndexDescriptor( |
| | | index.getAttribute().getNameOrOID(), index.getAttribute(), |
| | | null, index.getIndexType(), index.getIndexEntryLimit())); |
| | |
| | | { |
| | | ex.add(oe); |
| | | } |
| | | indexes.add( |
| | | new IndexDescriptor("dn2id", null, null, |
| | | new TreeSet<IndexType>(), -1)); |
| | | indexes.add( |
| | | new IndexDescriptor("id2children", null, null, |
| | | new TreeSet<IndexType>(), -1)); |
| | | indexes.add( |
| | | new IndexDescriptor("id2subtree", null, null, |
| | | new TreeSet<IndexType>(), -1)); |
| | | indexes.add(new IndexDescriptor("dn2id", null, null, |
| | | new TreeSet<IndexType>(), -1)); |
| | | indexes.add(new IndexDescriptor("id2children", null, null, |
| | | new TreeSet<IndexType>(), -1)); |
| | | indexes.add(new IndexDescriptor("id2subtree", null, null, |
| | | new TreeSet<IndexType>(), -1)); |
| | | |
| | | String[] vlvIndexNames = db.listLocalDBVLVIndexes(); |
| | | try |
| | | { |
| | | for (int j=0; j<vlvIndexNames.length; j++) |
| | | for (String vlvIndexName : db.listLocalDBVLVIndexes()) |
| | | { |
| | | LocalDBVLVIndexCfgClient index = |
| | | db.getLocalDBVLVIndex(vlvIndexNames[j]); |
| | | db.getLocalDBVLVIndex(vlvIndexName); |
| | | String s = index.getSortOrder(); |
| | | List<VLVSortOrder> sortOrder = getVLVSortOrder(s); |
| | | vlvIndexes.add(new VLVIndexDescriptor(index.getName(), null, |
| | |
| | | String[] domains = sync.listReplicationDomains(); |
| | | if (domains != null) |
| | | { |
| | | for (int i=0; i<domains.length; i++) |
| | | for (String domain2 : domains) |
| | | { |
| | | ReplicationDomainCfgClient domain = |
| | | sync.getReplicationDomain(domains[i]); |
| | | sync.getReplicationDomain(domain2); |
| | | DN dn = domain.getBaseDN(); |
| | | for (BackendDescriptor backend : bs) |
| | | { |
| | |
| | | String[] rootUsers = rootDN.listRootDNUsers(); |
| | | if (rootUsers != null) |
| | | { |
| | | for (int i=0; i < rootUsers.length; i++) |
| | | for (String rootUser2 : rootUsers) |
| | | { |
| | | RootDNUserCfgClient rootUser = rootDN.getRootDNUser(rootUsers[i]); |
| | | RootDNUserCfgClient rootUser = rootDN.getRootDNUser(rootUser2); |
| | | as.addAll(rootUser.getAlternateBindDN()); |
| | | } |
| | | } |
| | |
| | | { |
| | | protocol = ConnectionHandlerDescriptor.Protocol.LDAP; |
| | | } |
| | | SortedSet<InetAddress> v = ldap.getListenAddress(); |
| | | if (v != null) |
| | | { |
| | | addresses.addAll(v); |
| | | } |
| | | addAll(addresses, ldap.getListenAddress()); |
| | | port = ldap.getListenPort(); |
| | | } |
| | | else if (connHandler instanceof HTTPConnectionHandlerCfgClient) |
| | | { |
| | | HTTPConnectionHandlerCfgClient http = |
| | | (HTTPConnectionHandlerCfgClient) connHandler; |
| | | if (http.isUseSSL()) |
| | | { |
| | | protocol = ConnectionHandlerDescriptor.Protocol.HTTPS; |
| | | } |
| | | else |
| | | { |
| | | protocol = ConnectionHandlerDescriptor.Protocol.HTTP; |
| | | } |
| | | addAll(addresses, http.getListenAddress()); |
| | | port = http.getListenPort(); |
| | | } |
| | | else if (connHandler instanceof JMXConnectionHandlerCfgClient) |
| | | { |
| | | JMXConnectionHandlerCfgClient jmx = |
| | |
| | | { |
| | | protocol = ConnectionHandlerDescriptor.Protocol.JMX; |
| | | } |
| | | SortedSet<InetAddress> v = jmx.getListenAddress(); |
| | | if (v != null) |
| | | { |
| | | addresses.addAll(v); |
| | | } |
| | | addAll(addresses, jmx.getListenAddress()); |
| | | port = jmx.getListenPort(); |
| | | } |
| | | else if (connHandler instanceof LDIFConnectionHandlerCfgClient) |
| | |
| | | protocol = ConnectionHandlerDescriptor.Protocol.SNMP; |
| | | SNMPConnectionHandlerCfgClient snmp = |
| | | (SNMPConnectionHandlerCfgClient)connHandler; |
| | | SortedSet<InetAddress> v = snmp.getListenAddress(); |
| | | if (v != null) |
| | | { |
| | | addresses.addAll(v); |
| | | } |
| | | addAll(addresses, snmp.getListenAddress()); |
| | | port = snmp.getListenPort(); |
| | | } |
| | | else |
| | |
| | | name, emptySet); |
| | | } |
| | | |
| | | private <T> void addAll(Collection<T> target, Collection<T> source) |
| | | { |
| | | if (source != null) |
| | | { |
| | | target.addAll(source); |
| | | } |
| | | } |
| | | |
| | | private ConnectionHandlerDescriptor getConnectionHandler( |
| | | AdministrationConnectorCfgClient adminConnector) throws OpenDsException |
| | | { |
| | |
| | | ConnectionHandlerDescriptor.State state = |
| | | ConnectionHandlerDescriptor.State.ENABLED; |
| | | |
| | | |
| | | SortedSet<InetAddress> v = adminConnector.getListenAddress(); |
| | | if (v != null) |
| | | { |
| | | addresses.addAll(v); |
| | | } |
| | | addAll(addresses, adminConnector.getListenAddress()); |
| | | int port = adminConnector.getListenPort(); |
| | | |
| | | Set<CustomSearchResult> emptySet = Collections.emptySet(); |