/** {@inheritDoc} */ public ConfigChangeResult applyConfigurationChange(LogRotationPolicyCfg configuration) { // Default result code. ResultCode resultCode = ResultCode.SUCCESS; boolean adminActionRequired = false; ArrayList<Message> messages = new ArrayList<Message>(); RotationPolicy policy = DirectoryServer.getRotationPolicy(configuration.dn()); String className = configuration.getJavaClass(); if (!className.equals(policy.getClass().getName())) { adminActionRequired = true; } return new ConfigChangeResult(resultCode, adminActionRequired, messages); }
/** {@inheritDoc} */ public ConfigChangeResult applyConfigurationDelete(LogRotationPolicyCfg config) { // Default result code. ResultCode resultCode = ResultCode.SUCCESS; boolean adminActionRequired = false; ArrayList<Message> messages = new ArrayList<Message>(); RotationPolicy policy = DirectoryServer.getRotationPolicy(config.dn()); if (policy != null) { DirectoryServer.deregisterRotationPolicy(config.dn()); } else { // TODO: Add message and check for usage resultCode = DirectoryServer.getServerErrorResultCode(); } return new ConfigChangeResult(resultCode, adminActionRequired, messages); }