| | |
| | | import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.BaseDNDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.ConnectionHandlerDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.CustomSearchResult; |
| | | import org.opends.guitools.controlpanel.datamodel.IndexDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.VLVIndexDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.VLVSortOrder; |
| | |
| | | */ |
| | | public class ConfigFromDirContext extends ConfigReader |
| | | { |
| | | private static final String DATABASE_ENVIRONMENT_SUFFIX = |
| | | "Database Environment"; |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ConfigFromDirContext.class.getName()); |
| | | |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error reading configuration: "+t, t); |
| | | OnlineUpdateException oupe = new OnlineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(t.toString()), t); |
| | | ex.add(oupe); |
| | |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // Check if it is the DB monitor entry |
| | | String cn = ConnectionUtils.getFirstValue(sr, "cn"); |
| | | if ((cn != null) && cn.endsWith(DATABASE_ENVIRONMENT_SUFFIX)) |
| | | { |
| | | String monitorBackendID = cn.substring(0, cn.length() - |
| | | DATABASE_ENVIRONMENT_SUFFIX.length()); |
| | | for (BackendDescriptor backend : backends) |
| | | { |
| | | if (backend.getBackendID().equalsIgnoreCase(monitorBackendID)) |
| | | { |
| | | CustomSearchResult csr = new CustomSearchResult(sr, searchBaseDN); |
| | | backend.setMonitoringEntry(csr); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |