| | |
| | | import org.opends.server.types.operation.PostOperationDeleteOperation; |
| | | |
| | | import static org.opends.messages.PluginMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | /* This should never happen because the filter has already |
| | | * been verified. |
| | | */ |
| | | logError(de.getMessageObject()); |
| | | logger.error(de.getMessageObject()); |
| | | } |
| | | } |
| | | |
| | |
| | | break; |
| | | |
| | | case NO_SUCH_OBJECT: |
| | | logError(INFO_PLUGIN_REFERENT_SEARCH_NO_SUCH_OBJECT.get( |
| | | baseDN.toString())); |
| | | logger.debug(INFO_PLUGIN_REFERENT_SEARCH_NO_SUCH_OBJECT.get(baseDN.toString())); |
| | | return; |
| | | |
| | | default: |
| | | LocalizableMessage message1 = ERR_PLUGIN_REFERENT_SEARCH_FAILED. |
| | | get(String.valueOf(operation.getErrorMessage())); |
| | | logError(message1); |
| | | logger.error(message1); |
| | | return; |
| | | } |
| | | |
| | |
| | | conn.processModify(entryDN, mods); |
| | | if(modifyOperation.getResultCode() != ResultCode.SUCCESS) |
| | | { |
| | | logError(ERR_PLUGIN_REFERENT_MODIFY_FAILED.get(entryDN.toString(), |
| | | logger.error(ERR_PLUGIN_REFERENT_MODIFY_FAILED.get(entryDN.toString(), |
| | | String.valueOf(modifyOperation.getErrorMessage()))); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (IOException io) |
| | | { |
| | | logError(ERR_PLUGIN_REFERENT_CLOSE_LOGFILE.get(io.getMessage())); |
| | | logger.error(ERR_PLUGIN_REFERENT_CLOSE_LOGFILE.get(io.getMessage())); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (IOException io) |
| | | { |
| | | logError(ERR_PLUGIN_REFERENT_CLOSE_LOGFILE.get(io.getMessage())); |
| | | logger.error(ERR_PLUGIN_REFERENT_CLOSE_LOGFILE.get(io.getMessage())); |
| | | } |
| | | } |
| | | } |
| | |
| | | } catch (DirectoryException ex) { |
| | | //This exception should rarely happen since the plugin wrote the DN |
| | | //strings originally. |
| | | LocalizableMessage message= |
| | | ERR_PLUGIN_REFERENT_CANNOT_DECODE_STRING_AS_DN. |
| | | get(ex.getMessage()); |
| | | logError(message); |
| | | logger.error(ERR_PLUGIN_REFERENT_CANNOT_DECODE_STRING_AS_DN, ex.getMessage()); |
| | | } |
| | | } |
| | | reader.close(); |
| | | logFile.delete(); |
| | | logFile.createNewFile(); |
| | | } catch (IOException io) { |
| | | logError(ERR_PLUGIN_REFERENT_REPLACE_LOGFILE.get(io.getMessage())); |
| | | logger.error(ERR_PLUGIN_REFERENT_REPLACE_LOGFILE.get(io.getMessage())); |
| | | } |
| | | } |
| | | } |