| | |
| | | public void initializeBackend(ConfigEntry configEntry, DN[] baseDNs) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | |
| | | |
| | | // Make sure that a configuration entry was provided. If not, then we will |
| | | // not be able to complete initialization. |
| | | if (configEntry == null) |
| | |
| | | */ |
| | | public void finalizeBackend() |
| | | { |
| | | |
| | | DirectoryServer.deregisterConfigurableComponent(this); |
| | | } |
| | | |
| | |
| | | */ |
| | | private boolean isDSEConfigAttribute(Attribute attribute) |
| | | { |
| | | |
| | | AttributeType attrType = attribute.getAttributeType(); |
| | | if (attrType.hasName(ATTR_ROOT_DSE_SUBORDINATE_BASE_DN.toLowerCase()) || |
| | | attrType.hasName(ATTR_ROOTDSE_SHOW_ALL_ATTRIBUTES.toLowerCase()) || |
| | |
| | | */ |
| | | public DN[] getBaseDNs() |
| | | { |
| | | |
| | | return baseDNs; |
| | | } |
| | | |
| | |
| | | */ |
| | | public synchronized long getEntryCount() |
| | | { |
| | | |
| | | // There is always just a single entry in this backend. |
| | | return 1; |
| | | } |
| | |
| | | */ |
| | | public boolean isLocal() |
| | | { |
| | | |
| | | // For the purposes of this method, this is a local backend. |
| | | return true; |
| | | } |
| | |
| | | public Entry getEntry(DN entryDN) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // If the requested entry was the root DSE, then create and return it. |
| | | if ((entryDN == null) || entryDN.isNullDN()) |
| | | { |
| | |
| | | */ |
| | | public Entry getRootDSE() |
| | | { |
| | | |
| | | HashMap<AttributeType,List<Attribute>> dseUserAttrs = |
| | | new HashMap<AttributeType,List<Attribute>>(); |
| | | |
| | |
| | | private Attribute createAttribute(String name, String lowerName, |
| | | String value) |
| | | { |
| | | |
| | | AttributeType type = DirectoryServer.getAttributeType(lowerName); |
| | | if (type == null) |
| | | { |
| | |
| | | private Attribute createDNAttribute(String name, String lowerName, |
| | | Collection<DN> values) |
| | | { |
| | | |
| | | AttributeType type = DirectoryServer.getAttributeType(lowerName); |
| | | if (type == null) |
| | | { |
| | |
| | | private Attribute createAttribute(String name, String lowerName, |
| | | Collection<String> values) |
| | | { |
| | | |
| | | AttributeType type = DirectoryServer.getAttributeType(lowerName); |
| | | if (type == null) |
| | | { |
| | |
| | | public boolean entryExists(DN entryDN) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // If the specified DN was the null DN, then it exists. |
| | | if (entryDN.isNullDN()) |
| | | { |
| | |
| | | public void addEntry(Entry entry, AddOperation addOperation) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | int msgID = MSGID_ROOTDSE_ADD_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(entry.getDN())); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message, |
| | |
| | | public void deleteEntry(DN entryDN, DeleteOperation deleteOperation) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | int msgID = MSGID_ROOTDSE_DELETE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(entryDN)); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message, |
| | |
| | | public void replaceEntry(Entry entry, ModifyOperation modifyOperation) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | int msgID = MSGID_ROOTDSE_MODIFY_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(entry.getDN()), |
| | | String.valueOf(configEntryDN)); |
| | |
| | | ModifyDNOperation modifyDNOperation) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | int msgID = MSGID_ROOTDSE_MODIFY_DN_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(currentDN)); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message, |
| | |
| | | public void search(SearchOperation searchOperation) |
| | | throws DirectoryException, CancelledOperationException |
| | | { |
| | | |
| | | DN baseDN = searchOperation.getBaseDN(); |
| | | if (! baseDN.isNullDN()) |
| | | { |
| | |
| | | */ |
| | | public HashSet<String> getSupportedControls() |
| | | { |
| | | |
| | | return supportedControls; |
| | | } |
| | | |
| | |
| | | */ |
| | | public HashSet<String> getSupportedFeatures() |
| | | { |
| | | |
| | | return supportedFeatures; |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean supportsLDIFExport() |
| | | { |
| | | |
| | | // We will only export the DSE entry itself. |
| | | return true; |
| | | } |
| | |
| | | LDIFExportConfig exportConfig) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // Create the LDIF writer. |
| | | LDIFWriter ldifWriter; |
| | | try |
| | |
| | | */ |
| | | public boolean supportsLDIFImport() |
| | | { |
| | | |
| | | // This backend does not support LDIF imports. |
| | | return false; |
| | | } |
| | |
| | | LDIFImportConfig importConfig) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // This backend does not support LDIF imports. |
| | | int msgID = MSGID_ROOTDSE_IMPORT_NOT_SUPPORTED; |
| | | String message = getMessage(msgID); |
| | |
| | | */ |
| | | public boolean supportsBackup() |
| | | { |
| | | |
| | | // This backend does not provide a backup/restore mechanism. |
| | | return false; |
| | | } |
| | |
| | | public boolean supportsBackup(BackupConfig backupConfig, |
| | | StringBuilder unsupportedReason) |
| | | { |
| | | |
| | | |
| | | // This backend does not provide a backup/restore mechanism. |
| | | return false; |
| | | } |
| | |
| | | public void createBackup(ConfigEntry configEntry, BackupConfig backupConfig) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // This backend does not provide a backup/restore mechanism. |
| | | int msgID = MSGID_ROOTDSE_BACKUP_AND_RESTORE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID); |
| | |
| | | String backupID) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // This backend does not provide a backup/restore mechanism. |
| | | int msgID = MSGID_ROOTDSE_BACKUP_AND_RESTORE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID); |
| | |
| | | */ |
| | | public boolean supportsRestore() |
| | | { |
| | | |
| | | |
| | | // This backend does not provide a backup/restore mechanism. |
| | | return false; |
| | | } |
| | |
| | | RestoreConfig restoreConfig) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // This backend does not provide a backup/restore mechanism. |
| | | int msgID = MSGID_ROOTDSE_BACKUP_AND_RESTORE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID); |
| | |
| | | */ |
| | | public DN getConfigurableComponentEntryDN() |
| | | { |
| | | |
| | | return configEntryDN; |
| | | } |
| | | |
| | |
| | | */ |
| | | public List<ConfigAttribute> getConfigurationAttributes() |
| | | { |
| | | |
| | | LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>(); |
| | | |
| | | String description = getMessage(MSGID_ROOTDSE_SUBORDINATE_BASE_DESCRIPTION); |
| | |
| | | public boolean hasAcceptableConfiguration(ConfigEntry configEntry, |
| | | List<String> unacceptableReasons) |
| | | { |
| | | |
| | | |
| | | boolean configIsAcceptable = true; |
| | | |
| | | |
| | |
| | | public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry, |
| | | boolean detailedResults) |
| | | { |
| | | |
| | | |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |
| | | ArrayList<String> messages = new ArrayList<String>(); |