| | |
| | | import org.opends.server.admin.client.ManagementContext; |
| | | import org.opends.server.admin.client.MissingMandatoryPropertiesException; |
| | | import org.opends.server.admin.client.OperationRejectedException; |
| | | import org.opends.server.admin.client.OperationRejectedException.OperationType; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | if (!exceptions.isEmpty()) { |
| | | throw new MissingMandatoryPropertiesException(exceptions); |
| | | throw new MissingMandatoryPropertiesException(definition |
| | | .getUserFriendlyName(), exceptions, !existsOnServer); |
| | | } |
| | | |
| | | // Now enforce any constraints. |
| | |
| | | } |
| | | |
| | | if (!isAcceptable) { |
| | | throw new OperationRejectedException(messages); |
| | | if (existsOnServer) { |
| | | throw new OperationRejectedException(OperationType.MODIFY, definition |
| | | .getUserFriendlyName(), messages); |
| | | } else { |
| | | throw new OperationRejectedException(OperationType.CREATE, definition |
| | | .getUserFriendlyName(), messages); |
| | | } |
| | | } |
| | | |
| | | // Commit the managed object. |