| | |
| | | ConfigurationChangeListener<AttributeCleanupPluginCfg> |
| | | { |
| | | |
| | | /** |
| | | * Plugin configuration. |
| | | */ |
| | | /** Plugin configuration. */ |
| | | private AttributeCleanupPluginCfg config; |
| | | |
| | | /** |
| | | * Debug tracer. |
| | | */ |
| | | /** Debug tracer. */ |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * A table of attributes to be renamed. |
| | | */ |
| | | /** A table of attributes to be renamed. */ |
| | | private Map<String, String> attributesToRename; |
| | | |
| | | /** |
| | | * The set of attributes to be removed. |
| | | */ |
| | | /** The set of attributes to be removed. */ |
| | | private Set<String> attributesToRemove; |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Default constructor. |
| | | */ |
| | | /** Default constructor. */ |
| | | public AttributeCleanupPlugin() |
| | | { |
| | | super(); |
| | |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | final AttributeCleanupPluginCfg config) |
| | |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse doPreParse( |
| | | final PreParseAddOperation addOperation) |
| | |
| | | sharedLock.lock(); |
| | | try |
| | | { |
| | | /* |
| | | * First strip the listed attributes, then rename the ones that remain. |
| | | */ |
| | | /* First strip the listed attributes, then rename the ones that remain. */ |
| | | processInboundRemove(addOperation); |
| | | processInboundRename(addOperation); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse doPreParse( |
| | | final PreParseModifyOperation modifyOperation) |
| | |
| | | sharedLock.lock(); |
| | | try |
| | | { |
| | | /* |
| | | * First strip the listed attributes, then rename the ones that remain. |
| | | */ |
| | | /* First strip the listed attributes, then rename the ones that remain. */ |
| | | processInboundRemove(modifyOperation); |
| | | processInboundRename(modifyOperation); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void finalizePlugin() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializePlugin(final Set<PluginType> pluginTypes, |
| | | final AttributeCleanupPluginCfg configuration) throws ConfigException, |
| | | InitializationException |
| | | { |
| | | /* |
| | | * The plugin should be invoked only for pre-parse ADD and MODIFY |
| | | * operations. |
| | | */ |
| | | /* The plugin should be invoked only for pre-parse ADD and MODIFY operations. */ |
| | | for (final PluginType t : pluginTypes) |
| | | { |
| | | switch (t) |
| | |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationAcceptable(final PluginCfg configuration, |
| | | final List<LocalizableMessage> unacceptableReasons) |
| | |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationChangeAcceptable( |
| | | final AttributeCleanupPluginCfg config, final List<LocalizableMessage> messages) |
| | | { |
| | | /* |
| | | * The admin framework will ensure that there are no duplicate attributes to |
| | | * be removed. |
| | | */ |
| | | /* The admin framework will ensure that there are no duplicate attributes to be removed. */ |
| | | boolean isValid = true; |
| | | |
| | | /* |