| | |
| | | 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 the initialization. |
| | | if (configEntry == null) |
| | |
| | | */ |
| | | public void finalizeBackend() |
| | | { |
| | | |
| | | |
| | | DirectoryServer.deregisterConfigurableComponent(this); |
| | | |
| | | |
| | |
| | | */ |
| | | public DN[] getBaseDNs() |
| | | { |
| | | |
| | | return baseDNs; |
| | | } |
| | | |
| | |
| | | */ |
| | | public long getEntryCount() |
| | | { |
| | | |
| | | if (taskScheduler != null) |
| | | { |
| | | return taskScheduler.getEntryCount(); |
| | |
| | | */ |
| | | public boolean isLocal() |
| | | { |
| | | |
| | | // For the purposes of this method, this is a local backend. |
| | | return true; |
| | | } |
| | |
| | | public Entry getEntry(DN entryDN) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | if (entryDN == null) |
| | | { |
| | | return null; |
| | |
| | | public boolean entryExists(DN entryDN) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | if (entryDN == null) |
| | | { |
| | | return false; |
| | |
| | | public void addEntry(Entry entry, AddOperation addOperation) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // Get the DN for the entry and then get its parent. |
| | | DN entryDN = entry.getDN(); |
| | | DN parentDN = entryDN.getParentDNInSuffix(); |
| | |
| | | public void deleteEntry(DN entryDN, DeleteOperation deleteOperation) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // Get the parent for the provided entry DN. It must be either the |
| | | // scheduled or recurring task parent DN. |
| | | DN parentDN = entryDN.getParentDNInSuffix(); |
| | |
| | | public void replaceEntry(Entry entry, ModifyOperation modifyOperation) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | // FIXME -- We need to support this. |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | "Modify operations are not yet supported in " + |
| | |
| | | ModifyDNOperation modifyDNOperation) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | int msgID = MSGID_TASKBE_MODIFY_DN_NOT_SUPPORTED; |
| | | String message = getMessage(msgID); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message, |
| | |
| | | public void search(SearchOperation searchOperation) |
| | | throws DirectoryException, CancelledOperationException |
| | | { |
| | | |
| | | |
| | | // Look at the base DN and scope for the search operation to decide which |
| | | // entries we need to look at. |
| | | boolean searchRoot = false; |
| | |
| | | */ |
| | | public HashSet<String> getSupportedControls() |
| | | { |
| | | |
| | | return supportedControls; |
| | | } |
| | | |
| | |
| | | */ |
| | | public HashSet<String> getSupportedFeatures() |
| | | { |
| | | |
| | | return supportedFeatures; |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean supportsLDIFExport() |
| | | { |
| | | |
| | | // LDIF exports are supported. |
| | | return true; |
| | | } |
| | |
| | | LDIFExportConfig exportConfig) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // FIXME -- Implement support for exporting to LDIF. |
| | | } |
| | | |
| | |
| | | */ |
| | | 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_TASKBE_IMPORT_NOT_SUPPORTED; |
| | | String message = getMessage(msgID); |
| | |
| | | */ |
| | | public boolean supportsBackup() |
| | | { |
| | | |
| | | // This backend does provide a backup/restore mechanism. |
| | | return true; |
| | | } |
| | |
| | | public boolean supportsBackup(BackupConfig backupConfig, |
| | | StringBuilder unsupportedReason) |
| | | { |
| | | |
| | | |
| | | // This backend does provide a backup/restore mechanism. |
| | | return true; |
| | | } |
| | |
| | | public void createBackup(ConfigEntry configEntry, BackupConfig backupConfig) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // NYI -- Create the backup. |
| | | } |
| | | |
| | |
| | | String backupID) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // NYI -- Remove the backup. |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean supportsRestore() |
| | | { |
| | | |
| | | |
| | | // This backend does provide a backup/restore mechanism. |
| | | return true; |
| | | } |
| | |
| | | RestoreConfig restoreConfig) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // NYI -- Restore the backup. |
| | | } |
| | | |
| | |
| | | */ |
| | | public DN getConfigurableComponentEntryDN() |
| | | { |
| | | |
| | | return configEntryDN; |
| | | } |
| | | |
| | |
| | | */ |
| | | public List<ConfigAttribute> getConfigurationAttributes() |
| | | { |
| | | |
| | | LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>(); |
| | | |
| | | String description = getMessage(MSGID_TASKBE_DESCRIPTION_BACKING_FILE); |
| | |
| | | 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>(); |
| | |
| | | */ |
| | | public DN getConfigEntryDN() |
| | | { |
| | | |
| | | return configEntryDN; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getTaskBackingFile() |
| | | { |
| | | |
| | | File f = getFileForPath(taskBackingFile); |
| | | return f.getPath(); |
| | | } |
| | |
| | | */ |
| | | public long getRetentionTime() |
| | | { |
| | | |
| | | return retentionTime; |
| | | } |
| | | |
| | |
| | | */ |
| | | public DN getTaskRootDN() |
| | | { |
| | | |
| | | return taskRootDN; |
| | | } |
| | | |
| | |
| | | */ |
| | | public DN getRecurringTasksParentDN() |
| | | { |
| | | |
| | | return recurringTaskParentDN; |
| | | } |
| | | |
| | |
| | | */ |
| | | public DN getScheduledTasksParentDN() |
| | | { |
| | | |
| | | return scheduledTaskParentDN; |
| | | } |
| | | |
| | |
| | | */ |
| | | public Task getScheduledTask(DN taskEntryDN) |
| | | { |
| | | |
| | | return taskScheduler.getScheduledTask(taskEntryDN); |
| | | } |
| | | |
| | |
| | | */ |
| | | public RecurringTask getRecurringTask(DN taskEntryDN) |
| | | { |
| | | |
| | | return taskScheduler.getRecurringTask(taskEntryDN); |
| | | } |
| | | } |