| | |
| | | */ |
| | | package org.opends.server.plugins; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | |
| | | import org.opends.server.admin.std.meta.PluginCfgDefn; |
| | | import org.opends.server.admin.std.server.SevenBitCleanPluginCfg; |
| | | import org.opends.server.admin.std.server.PluginCfg; |
| | | import org.opends.server.api.plugin.*; |
| | | import org.opends.server.api.plugin.DirectoryServerPlugin; |
| | | import org.opends.server.api.plugin.PluginResult; |
| | | import org.opends.server.api.plugin.PluginType; |
| | | import org.forgerock.opendj.config.server.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.*; |
| | |
| | | |
| | | import static org.opends.messages.PluginMessages.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class implements a Directory Server plugin that can be used to ensure |
| | | * that the values for a specified set of attributes (optionally, below a |
| | |
| | | { |
| | | for (Attribute a : attrList) |
| | | { |
| | | for (AttributeValue v : a) |
| | | for (ByteString v : a) |
| | | { |
| | | if (! is7BitClean(v.getValue())) |
| | | if (!is7BitClean(v)) |
| | | { |
| | | LocalizableMessage rejectMessage = |
| | | ERR_PLUGIN_7BIT_IMPORT_ATTR_NOT_CLEAN.get( |
| | |
| | | continue; |
| | | } |
| | | |
| | | for (AttributeValue v : a) |
| | | for (ByteString v : a) |
| | | { |
| | | if (! is7BitClean(v.getValue())) |
| | | if (!is7BitClean(v)) |
| | | { |
| | | return PluginResult.PreParse.stopProcessing( |
| | | ResultCode.CONSTRAINT_VIOLATION, |
| | |
| | | continue; |
| | | } |
| | | |
| | | for (AttributeValue v : a) |
| | | for (ByteString v : a) |
| | | { |
| | | if (! is7BitClean(v.getValue())) |
| | | if (!is7BitClean(v)) |
| | | { |
| | | return PluginResult.PreParse.stopProcessing( |
| | | ResultCode.CONSTRAINT_VIOLATION, |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (! is7BitClean(newRDN.getAttributeValue(i).getValue())) |
| | | if (!is7BitClean(newRDN.getAttributeValue(i))) |
| | | { |
| | | return PluginResult.PreParse.stopProcessing( |
| | | ResultCode.CONSTRAINT_VIOLATION, |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean isConfigurationChangeAcceptable( |
| | | SevenBitCleanPluginCfg configuration, |
| | | List<LocalizableMessage> unacceptableReasons) |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | SevenBitCleanPluginCfg configuration) |
| | | { |