mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
java: HideUtilityClassConstructor formatting
This commit is contained in:
@ -21,9 +21,11 @@ package helpers;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
public class ConfigManager {
|
||||
public final class ConfigManager {
|
||||
private static Properties properties;
|
||||
|
||||
private ConfigManager() { }
|
||||
|
||||
static {
|
||||
init();
|
||||
}
|
||||
|
||||
@ -43,9 +43,11 @@ import org.primeframework.jwt.Verifier;
|
||||
import static utils.Constants.KILOBYTE_SIZE;
|
||||
import static utils.Constants.MAX_FILE_SIZE;
|
||||
|
||||
public class DocumentManager {
|
||||
public final class DocumentManager {
|
||||
private static HttpServletRequest request;
|
||||
|
||||
private DocumentManager() { }
|
||||
|
||||
public static void init(final HttpServletRequest req, final HttpServletResponse resp) {
|
||||
request = req;
|
||||
}
|
||||
|
||||
@ -25,7 +25,9 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class FileUtility {
|
||||
public final class FileUtility {
|
||||
|
||||
private FileUtility() { }
|
||||
|
||||
// get file type
|
||||
public static FileType getFileType(final String fileName) {
|
||||
|
||||
@ -42,11 +42,13 @@ import static utils.Constants.FULL_LOADING_IN_PERCENT;
|
||||
import static utils.Constants.MAX_KEY_LENGTH;
|
||||
|
||||
|
||||
public class ServiceConverter {
|
||||
public final class ServiceConverter {
|
||||
private static int convertTimeout;
|
||||
private static final String DOCUMENT_CONVERTER_URL = ConfigManager.getProperty("files.docservice.url.site") + ConfigManager.getProperty("files.docservice.url.converter");
|
||||
private static final String DOCUMENT_JWT_HEADER = ConfigManager.getProperty("files.docservice.header");
|
||||
|
||||
private ServiceConverter() { }
|
||||
|
||||
public static class ConvertBody {
|
||||
private String region;
|
||||
private String url;
|
||||
|
||||
@ -37,9 +37,11 @@ import java.util.Scanner;
|
||||
import static utils.Constants.FILE_SAVE_TIMEOUT;
|
||||
import static utils.Constants.KILOBYTE_SIZE;
|
||||
|
||||
public class TrackManager {
|
||||
public final class TrackManager {
|
||||
private static final String DOCUMENT_JWT_HEADER = ConfigManager.getProperty("files.docservice.header");
|
||||
|
||||
private TrackManager() { }
|
||||
|
||||
// read request body
|
||||
public static JSONObject readBody(final HttpServletRequest request, final PrintWriter writer) throws Exception {
|
||||
String bodyString = "";
|
||||
|
||||
@ -22,7 +22,7 @@ import entities.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class Users {
|
||||
public final class Users {
|
||||
|
||||
private static List<String> descriptionUserFirst = new ArrayList<String>() {{
|
||||
add("File author by default");
|
||||
@ -84,6 +84,8 @@ public class Users {
|
||||
null, new ArrayList<String>(), descriptionUserZero, false));
|
||||
}};
|
||||
|
||||
private Users() { }
|
||||
|
||||
// get a user by id specified
|
||||
public static User getUser(final String id) {
|
||||
for (User user : users) {
|
||||
|
||||
Reference in New Issue
Block a user