@Override public void execute() { if (ids == null && type == null && endDate == null) { throw new InvalidParameterValueException("either ids, type or enddate must be specified"); } else if (startDate != null && endDate == null) { throw new InvalidParameterValueException("enddate must be specified with startdate parameter"); } boolean result = _mgr.archiveEvents(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Unable to archive Events, one or more parameters has invalid values"); } } }
@Override public void execute() { if (ids == null && type == null && endDate == null) { throw new InvalidParameterValueException("either ids, type or enddate must be specified"); } else if (startDate != null && endDate == null) { throw new InvalidParameterValueException("enddate must be specified with startdate parameter"); } final boolean result = _mgr.archiveEvents(this); if (result) { final SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Unable to archive Events, one or more parameters has invalid values"); } }