@Override()
public final PluginResult.PreParse
doPreParse(PreParseModifyOperation modifyOperation)
{
// Get the current configuration for this plugin.
SevenBitCleanPluginCfg config = currentConfig;
// If the target entry is within the scope of this plugin, then make sure
// all values that will be added during the modification will be acceptable.
DN entryDN;
try
{
entryDN = DN.decode(modifyOperation.getRawEntryDN());
}
catch (DirectoryException de)
{
return PluginResult.PreParse.stopProcessing(de.getResultCode(),
ERR_PLUGIN_7BIT_CANNOT_DECODE_DN.get(de.getMessageObject()));
}
if (isInScope(config, entryDN))
{
for (RawModification m : modifyOperation.getRawModifications())
{
switch (m.getModificationType())
{
case ADD:
case REPLACE:
// These are modification types that we will process.
break;
default:
// This is not a modifiation type that we will process.
continue;
}
RawAttribute rawAttr = m.getAttribute();
Attribute a;
try
{
a = rawAttr.toAttribute();
}
catch (LDAPException le)
{
return PluginResult.PreParse.stopProcessing(
ResultCode.valueOf(le.getResultCode()),
ERR_PLUGIN_7BIT_CANNOT_DECODE_ATTR.get(
rawAttr.getAttributeType(), le.getErrorMessage()));
}
if (! config.getAttributeType().contains(a.getAttributeType()))
{
continue;
}
for (AttributeValue v : a)