2929 */
3030@ WebServlet (name = "CustomizationFilesServlet" , urlPatterns = {"/CustomizationFilesServlet" })
3131public class CustomizationFilesServlet extends HttpServlet {
32-
32+
3333 @ EJB
3434 SettingsServiceBean settingsService ;
35-
36-
35+
36+
3737 /**
3838 * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
3939 * methods.
@@ -45,7 +45,7 @@ public class CustomizationFilesServlet extends HttpServlet {
4545 */
4646 protected void processRequest (HttpServletRequest request , HttpServletResponse response )
4747 throws ServletException , IOException {
48- response .setContentType ("text/html;charset=UTF-8" );
48+ response .setContentType ("text/html;charset=UTF-8" );
4949
5050 String customFileType = request .getParameter ("customFileType" );
5151 String filePath = getFilePath (customFileType );
@@ -63,7 +63,7 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
6363
6464 StringBuilder responseData = new StringBuilder ();
6565 try (PrintWriter out = response .getWriter ()) {
66-
66+
6767 while ((line = in .readLine ()) != null ) {
6868 responseData .append (line );
6969 out .println (line );
@@ -89,42 +89,42 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
8989 }
9090
9191 }
92-
92+
9393 private String getFilePath (String fileTypeParam ){
9494
9595 String nonNullDefaultIfKeyNotFound = "" ;
96-
96+
9797 if (fileTypeParam .equals (CustomizationConstants .fileTypeHomePage )) {
98-
98+
9999 // Homepage
100100 return settingsService .getValueForKey (SettingsServiceBean .Key .HomePageCustomizationFile , nonNullDefaultIfKeyNotFound );
101-
101+
102102 } else if (fileTypeParam .equals (CustomizationConstants .fileTypeHeader )) {
103-
103+
104104 // Header
105105 return settingsService .getValueForKey (SettingsServiceBean .Key .HeaderCustomizationFile , nonNullDefaultIfKeyNotFound );
106106
107107 } else if (fileTypeParam .equals (CustomizationConstants .fileTypeFooter )) {
108-
109- // Footer
108+
109+ // Footer
110110 return settingsService .getValueForKey (SettingsServiceBean .Key .FooterCustomizationFile , nonNullDefaultIfKeyNotFound );
111-
111+
112112 } else if (fileTypeParam .equals (CustomizationConstants .fileTypeStyle )) {
113-
114- // Style (css)
113+
114+ // Style (css)
115115 return settingsService .getValueForKey (SettingsServiceBean .Key .StyleCustomizationFile , nonNullDefaultIfKeyNotFound );
116-
116+
117117 } else if (fileTypeParam .equals (CustomizationConstants .fileTypeAnalytics )) {
118118
119- // Analytics - appears in head
119+ // Analytics - appears in head
120120 return settingsService .getValueForKey (SettingsServiceBean .Key .WebAnalyticsCode , nonNullDefaultIfKeyNotFound );
121-
121+
122122 } else if (fileTypeParam .equals (CustomizationConstants .fileTypeLogo )) {
123123
124- // Logo for installation - appears in header
124+ // Logo for installation - appears in header
125125 return settingsService .getValueForKey (SettingsServiceBean .Key .LogoCustomizationFile , nonNullDefaultIfKeyNotFound );
126126 }
127-
127+
128128
129129 return "" ;
130130 }
0 commit comments