| | |
| | | */ |
| | | public GroupManager() |
| | | { |
| | | |
| | | configHandler = DirectoryServer.getConfigHandler(); |
| | | groupImplementations = new ConcurrentHashMap<DN,Group>(); |
| | | groupInstances = new ConcurrentHashMap<DN,Group>(); |
| | |
| | | public void initializeGroupImplementations() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | |
| | | |
| | | // First, get the configuration base entry. |
| | | ConfigEntry baseEntry; |
| | | try |
| | |
| | | */ |
| | | public void finalizeGroupManager() |
| | | { |
| | | |
| | | deregisterAllGroups(); |
| | | |
| | | for (Group groupImplementation : groupImplementations.values()) |
| | |
| | | */ |
| | | public Iterable<Group> getGroupImplementations() |
| | | { |
| | | |
| | | return groupImplementations.values(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public Iterable<Group> getGroupInstances() |
| | | { |
| | | |
| | | return groupInstances.values(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public Group getGroupInstance(DN entryDN) |
| | | { |
| | | |
| | | Group group = groupInstances.get(entryDN); |
| | | if (group == null) |
| | | { |
| | |
| | | public boolean configChangeIsAcceptable(ConfigEntry configEntry, |
| | | StringBuilder unacceptableReason) |
| | | { |
| | | |
| | | |
| | | // Make sure that the entry has an appropriate objectclass for an extended |
| | | // operation handler. |
| | | if (! configEntry.hasObjectClass(OC_GROUP_IMPLEMENTATION)) |
| | |
| | | */ |
| | | public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry) |
| | | { |
| | | |
| | | |
| | | DN configEntryDN = configEntry.getDN(); |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |
| | |
| | | public boolean configAddIsAcceptable(ConfigEntry configEntry, |
| | | StringBuilder unacceptableReason) |
| | | { |
| | | |
| | | |
| | | // Make sure that no entry already exists with the specified DN. |
| | | DN configEntryDN = configEntry.getDN(); |
| | | if (groupImplementations.containsKey(configEntryDN)) |
| | |
| | | */ |
| | | public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry) |
| | | { |
| | | |
| | | |
| | | DN configEntryDN = configEntry.getDN(); |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |
| | |
| | | public boolean configDeleteIsAcceptable(ConfigEntry configEntry, |
| | | StringBuilder unacceptableReason) |
| | | { |
| | | |
| | | |
| | | // A delete should always be acceptable, so just return true. |
| | | return true; |
| | | } |
| | |
| | | */ |
| | | public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry) |
| | | { |
| | | |
| | | |
| | | DN configEntryDN = configEntry.getDN(); |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |
| | |
| | | */ |
| | | public void performBackendInitializationProcessing(Backend backend) |
| | | { |
| | | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | |
| | | */ |
| | | public void performBackendFinalizationProcessing(Backend backend) |
| | | { |
| | | |
| | | Iterator<Map.Entry<DN,Group>> iterator = |
| | | groupInstances.entrySet().iterator(); |
| | | while (iterator.hasNext()) |
| | |
| | | public void handleAddOperation(PostResponseAddOperation addOperation, |
| | | Entry entry) |
| | | { |
| | | |
| | | List<Control> requestControls = addOperation.getRequestControls(); |
| | | if (requestControls != null) |
| | | { |
| | |
| | | public void handleDeleteOperation(PostResponseDeleteOperation deleteOperation, |
| | | Entry entry) |
| | | { |
| | | |
| | | List<Control> requestControls = deleteOperation.getRequestControls(); |
| | | if (requestControls != null) |
| | | { |
| | |
| | | public void handleModifyOperation(PostResponseModifyOperation modifyOperation, |
| | | Entry oldEntry, Entry newEntry) |
| | | { |
| | | |
| | | List<Control> requestControls = modifyOperation.getRequestControls(); |
| | | if (requestControls != null) |
| | | { |
| | |
| | | PostResponseModifyDNOperation modifyDNOperation, |
| | | Entry oldEntry, Entry newEntry) |
| | | { |
| | | |
| | | List<Control> requestControls = modifyDNOperation.getRequestControls(); |
| | | if (requestControls != null) |
| | | { |
| | |
| | | */ |
| | | private void createAndRegisterGroup(Entry entry) |
| | | { |
| | | |
| | | for (Group groupImplementation : groupImplementations.values()) |
| | | { |
| | | try |