| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** The configuration which this plugin is registered with as a change listener. */ |
| | | private PasswordPolicyImportPluginCfg currentConfig; |
| | | /** The attribute type used to specify the password policy for an entry. */ |
| | | private AttributeType customPolicyAttribute; |
| | | /** The set of attribute types defined in the schema with the auth password syntax. */ |
| | |
| | | throws ConfigException |
| | | { |
| | | configuration.addPasswordPolicyImportChangeListener(this); |
| | | currentConfig = configuration; |
| | | |
| | | Schema schema = DirectoryServer.getInstance().getServerContext().getSchema(); |
| | | customPolicyAttribute = schema.getAttributeType(OP_ATTR_PWPOLICY_POLICY_DN); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public final void finalizePlugin() |
| | | { |
| | | currentConfig.removePasswordPolicyImportChangeListener(this); |
| | | } |
| | | |
| | | @Override |
| | | public void processImportBegin(LocalBackend<?> backend, LDIFImportConfig config) |
| | | { |
| | | // Find the set of attribute types with the auth password and user password |