Update RecordingController.groovy indentation to two spaces instead of four.

This commit is contained in:
Ghazi Triki 2019-05-07 18:28:47 +01:00
parent 7505975bf8
commit f1a83c4022

View File

@ -2,11 +2,11 @@ package org.bigbluebutton.web.controllers
import grails.web.context.ServletContextHolder
import groovy.json.JsonBuilder
import org.bigbluebutton.api.MeetingService;
import org.bigbluebutton.api.ParamsProcessorUtil;
import org.bigbluebutton.api.MeetingService
import org.bigbluebutton.api.ParamsProcessorUtil
import org.bigbluebutton.api.util.ResponseBuilder
import org.apache.commons.lang.StringUtils;
import org.bigbluebutton.api.ApiErrors;
import org.apache.commons.lang.StringUtils
import org.bigbluebutton.api.ApiErrors
import org.bigbluebutton.api.ApiParams
import org.apache.commons.lang3.StringUtils
import org.json.JSONArray
@ -18,12 +18,12 @@ class RecordingController {
protected static final String RESP_CODE_FAILED = 'FAILED'
protected static Boolean REDIRECT_RESPONSE = true
MeetingService meetingService;
MeetingService meetingService
ParamsProcessorUtil paramsProcessorUtil
ResponseBuilder responseBuilder = initResponseBuilder()
def initResponseBuilder = {
String protocol = this.getClass().getResource("").getProtocol();
String protocol = this.getClass().getResource("").getProtocol()
if (Objects.equals(protocol, "jar")) {
// Application running inside a JAR file
responseBuilder = new ResponseBuilder(getClass().getClassLoader(), "/WEB-INF/freemarker")
@ -49,7 +49,7 @@ class RecordingController {
}
if (StringUtils.isEmpty(params.recordID)) {
invalid("missingParamRecordID", "You must specify a recordID.");
invalid("missingParamRecordID", "You must specify a recordID.")
return
}
@ -63,13 +63,13 @@ class RecordingController {
// Do we have a checksum? If none, complain.
if (StringUtils.isEmpty(params.checksum)) {
errors.missingParamError("checksum");
errors.missingParamError("checksum")
}
// Do we have a recording id? If none, complain.
String recordId = params.recordID
if (StringUtils.isEmpty(recordId)) {
errors.missingParamError(ApiParams.RECORD_ID);
errors.missingParamError(ApiParams.RECORD_ID)
}
if (errors.hasErrors()) {
@ -129,21 +129,21 @@ class RecordingController {
}
if (StringUtils.isEmpty(params.recordID)) {
respondWithError("paramError", "Missing param recordID.");
respondWithError("paramError", "Missing param recordID.")
return
}
String recordId = StringUtils.strip(params.recordID)
if (StringUtils.isEmpty(params.kind)) {
respondWithError("paramError", "Missing param kind.");
respondWithError("paramError", "Missing param kind.")
return
}
String captionsKind = StringUtils.strip(params.kind)
if (StringUtils.isEmpty(params.lang)) {
respondWithError("paramError", "Missing param lang.");
respondWithError("paramError", "Missing param lang.")
return
}
@ -195,7 +195,7 @@ class RecordingController {
// Note: This xml scheme will be DEPRECATED.
log.debug CONTROLLER_NAME + "#invalid " + msg
if (redirectResponse) {
ArrayList<Object> errors = new ArrayList<Object>();
ArrayList<Object> errors = new ArrayList<Object>()
Map<String, String> errorMap = new LinkedHashMap<String, String>()
errorMap.put("key", key)
errorMap.put("message", msg)
@ -237,7 +237,7 @@ class RecordingController {
}
}
String newQuery = oldUri.getQuery();
String newQuery = oldUri.getQuery()
if (newQuery == null) {
newQuery = "errors="