diff --git a/src/main/java/org/codelibs/fess/es/exentity/FileAuthentication.java b/src/main/java/org/codelibs/fess/es/exentity/FileAuthentication.java index c339197dc..7729deab0 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/FileAuthentication.java +++ b/src/main/java/org/codelibs/fess/es/exentity/FileAuthentication.java @@ -1,6 +1,8 @@ package org.codelibs.fess.es.exentity; import org.codelibs.fess.es.bsentity.BsFileAuthentication; +import org.codelibs.fess.service.FileConfigService; +import org.codelibs.fess.util.ComponentUtil; /** * @author FreeGen @@ -8,6 +10,7 @@ import org.codelibs.fess.es.bsentity.BsFileAuthentication; public class FileAuthentication extends BsFileAuthentication { private static final long serialVersionUID = 1L; + private FileConfig fileConfig; @Override public String getId() { @@ -26,4 +29,12 @@ public class FileAuthentication extends BsFileAuthentication { public void setVersionNo(Long version) { asDocMeta().version(version); } + + public FileConfig getFileConfig() { + if (fileConfig == null) { + final FileConfigService fileConfigService = ComponentUtil.getComponent(FileConfigService.class); + fileConfig = fileConfigService.getFileConfig(getFileConfigId()); + } + return fileConfig; + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/RequestHeader.java b/src/main/java/org/codelibs/fess/es/exentity/RequestHeader.java index 00c33bd5b..d6dd50492 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/RequestHeader.java +++ b/src/main/java/org/codelibs/fess/es/exentity/RequestHeader.java @@ -1,6 +1,8 @@ package org.codelibs.fess.es.exentity; import org.codelibs.fess.es.bsentity.BsRequestHeader; +import org.codelibs.fess.service.WebConfigService; +import org.codelibs.fess.util.ComponentUtil; /** * @author FreeGen @@ -8,6 +10,7 @@ import org.codelibs.fess.es.bsentity.BsRequestHeader; public class RequestHeader extends BsRequestHeader { private static final long serialVersionUID = 1L; + private WebConfig webConfig; @Override public String getId() { @@ -30,4 +33,12 @@ public class RequestHeader extends BsRequestHeader { public org.codelibs.robot.client.http.RequestHeader getS2RobotRequestHeader() { return new org.codelibs.robot.client.http.RequestHeader(getName(), getValue()); } + + public WebConfig getWebConfig() { + if (webConfig == null) { + final WebConfigService webConfigService = ComponentUtil.getComponent(WebConfigService.class); + webConfig = webConfigService.getWebConfig(getWebConfigId()); + } + return webConfig; + } } diff --git a/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationForm.java b/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationForm.java index f2730d4e2..99b46fe43 100644 --- a/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationForm.java @@ -67,7 +67,7 @@ public class FileAuthenticationForm implements Serializable { public String parameters; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String fileConfigId; @Required(target = "confirmfromupdate,update,delete") diff --git a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/confirm.jsp index 10eee1f0a..b99b269a3 100644 --- a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/confirm.jsp +++ b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/confirm.jsp @@ -1,134 +1,172 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.file_authentication_configuration" /> + + + +
+ + + + + -

- -

+
- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - -
-
    + <%-- Content Header --%> +
    +

    + +

    +
-
+ + - <%-- Confirm Form: BEGIN --%> - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
${f:h(hostname)}
${f:h(port)}
- ${f:h(item.label)} -
${f:h(username)}
******
${f:br(f:h(parameters))}
- ${f:h(item.label)} -
- " /> - " /> - - " /> - " /> - - " /> - " /> - - " /> - " /> - " /> -
-
-
- <%-- Confirm Form: BEGIN --%> +
+ <%-- Form --%> + + + + + + + + +
+
+
+ <%-- Box Header --%> +
+

+ + + + + + + + + + + + +

+
+ + + +
+
+ <%-- Box Body --%> +
+ <%-- Message --%> +
+ +
+ +
+
+ +
- - + <%-- Form Fields --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
${f:h(hostname)}
${f:h(port)}
+ ${f:h(item.label)} +
${f:h(username)}
****** +
${f:br(f:h(parameters))}
+ ${f:h(item.label)} +
+ +
+ <%-- Box Footer --%> + +
+
+
+
+ +
+
+ + +
+ + + diff --git a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/edit.jsp b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/edit.jsp index 93f1fcf56..dc1dd5d00 100644 --- a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/edit.jsp +++ b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/edit.jsp @@ -1,125 +1,151 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.file_authentication_configuration" /> + + + +
+ + + + + -

- -

+
- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - -
-
    + <%-- Content Header --%> +
    +

    + +

    +
-
+ + - <%-- Edit Form: BEGIN --%> - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ${f:h(item.label)} - -
- - ${f:h(item.label)} - -
- " /> - " /> - - " /> - " /> -
-
-
- <%-- Edit Form: BEGIN --%> +
+ <%-- Form --%> + + + + + + + + - - +
+
+
+ <%-- Box Header --%> +
+

+ + + + + + +

+
+ + + +
+
+ <%-- Box Body --%> +
+ <%-- Message --%> +
+ +
+ +
+
+ +
+ + <%-- Form Fields --%> +
+ + +
+
+ + +
+
+ + + + ${f:h(item.label)} + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + + ${f:h(item.label)} + + +
+
+ + <%-- Box Footer --%> + +
+
+
+
+ +
+
+ + +
+ + + diff --git a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/error.jsp b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/error.jsp index 33d182373..58cf19f69 100644 --- a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/error.jsp +++ b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/error.jsp @@ -1,17 +1,50 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.file_authentication_configuration" /> + + + +
+ + + + + -
- -
- -
+
+
+

+ +

+ +
- - +
+ +
+

Error

+

+ +

+

+ + + +

+
+ +
+
+ + + +
+ + + diff --git a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/index.jsp b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/index.jsp index 1397f04b7..bb03f3b14 100644 --- a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/index.jsp +++ b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/index.jsp @@ -1,130 +1,143 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.file_authentication_configuration" /> + + + +
+ + + + + -

- -

+
- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - - <%-- List: BEGIN --%> -
-
- -
    -
  • -
  • - + <%-- Content Header --%> +
    +

    + +

    +
-
- - - - - -
- -

- -

-
- - - - - - - - - - - - - - - - - - -
 
- - ${f:h(data.hostname)}: - - ${f:h(data.port)}${f:h(data.fileConfig.name)} - - - - - -
- <%-- Page Navigation: BEGIN --%> -
- + + -
- +
+ +
+
+ + + + + + +
+ <%-- Box Header --%> +
+

+ +

+
+ + + +
+
+ <%-- Box Body --%> +
+ <%-- Message --%> +
+ +
+ +
+
+ +
+ + <%-- List --%> + +

+ +

+
+ + + + + + + + + + + + + + + + +
+ + + ${f:h(data.hostname)}: + + + + ${f:h(data.port)} + + ${f:h(data.fileConfig.name)}
+
+ +
+ <%-- Box Footer --%> + +
+
- <%-- Page Navigation: END --%> - + +
- <%-- List: END --%> - - - + +
+ + + diff --git a/src/main/webapp/WEB-INF/view/admin/requestHeader/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/requestHeader/confirm.jsp index 23c97f59d..d11b3c6d4 100644 --- a/src/main/webapp/WEB-INF/view/admin/requestHeader/confirm.jsp +++ b/src/main/webapp/WEB-INF/view/admin/requestHeader/confirm.jsp @@ -1,112 +1,153 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.request_header_configuration" /> + + + +
+ + + + + -

- -

+
- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - -
-
    + <%-- Content Header --%> +
    +

    + +

    +
-
+ + - <%-- Confirm Form: BEGIN --%> - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
${f:h(name)}
${f:h(value)}
- ${f:h(item.label)} -
- " /> - " /> - - " /> - " /> - - " /> - " /> - - " /> - " /> - " /> -
-
-
- <%-- Confirm Form: BEGIN --%> +
- - + <%-- Form --%> + + + + + + + + +
+
+
+ <%-- Box Header --%> +
+

+ + + + + + + + + + + + +

+
+ + + +
+
+ <%-- Box Body --%> +
+ <%-- Message --%> +
+ +
+ +
+
+ +
+ + <%-- Form Fields --%> + + + + + + + + + + + + + + + +
${f:h(name)}
${f:h(value)}
+ ${f:h(item.label)} +
+ +
+ <%-- Box Footer --%> + +
+
+
+
+ +
+
+ + +
+ + + diff --git a/src/main/webapp/WEB-INF/view/admin/requestHeader/edit.jsp b/src/main/webapp/WEB-INF/view/admin/requestHeader/edit.jsp index be7d96eff..b09e90174 100644 --- a/src/main/webapp/WEB-INF/view/admin/requestHeader/edit.jsp +++ b/src/main/webapp/WEB-INF/view/admin/requestHeader/edit.jsp @@ -1,102 +1,131 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.request_header_configuration" /> + + + +
+ + + + + -

- -

+
- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - -
-
    + <%-- Content Header --%> +
    +

    + +

    +
-
+ + - <%-- Edit Form: BEGIN --%> - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ${f:h(item.label)} - -
- " /> - " /> - - " /> - " /> -
-
-
- <%-- Edit Form: BEGIN --%> +
- - + <%-- Form --%> + + + + + + + + + +
+
+
+ <%-- Box Header --%> +
+

+ + + + + + +

+
+ + + +
+
+ <%-- Box Body --%> +
+ <%-- Message --%> +
+ +
+ +
+
+ +
+ + <%-- Form Fields --%> +
+ + +
+
+ + +
+
+ + + + ${f:h(item.label)} + + +
+
+ + <%-- Box Footer --%> + +
+
+
+
+ +
+
+ + +
+ + + diff --git a/src/main/webapp/WEB-INF/view/admin/requestHeader/error.jsp b/src/main/webapp/WEB-INF/view/admin/requestHeader/error.jsp index 6ef26ff8a..26d64f7bb 100644 --- a/src/main/webapp/WEB-INF/view/admin/requestHeader/error.jsp +++ b/src/main/webapp/WEB-INF/view/admin/requestHeader/error.jsp @@ -1,17 +1,50 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.request_header_configuration" /> + + + +
+ + + + + -
- -
- -
+
+
+

+ +

+ +
- - +
+ +
+

Error

+

+ +

+

+ + + +

+
+ +
+
+ + + +
+ + + diff --git a/src/main/webapp/WEB-INF/view/admin/requestHeader/index.jsp b/src/main/webapp/WEB-INF/view/admin/requestHeader/index.jsp index 1f3523840..03a1d2838 100644 --- a/src/main/webapp/WEB-INF/view/admin/requestHeader/index.jsp +++ b/src/main/webapp/WEB-INF/view/admin/requestHeader/index.jsp @@ -1,124 +1,134 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.request_header_configuration" /> + + + +
+ + + + + -

- -

+
- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - - <%-- List: BEGIN --%> -
-
- -
    -
  • -
  • - + <%-- Content Header --%> +
    +

    + +

    +
-
- - - - - -
- -

- -

-
- - - - - - - - - - - - - - - - - - -
 
${f:h(data.name)}${f:h(data.webConfig.name)} - - - - - -
- <%-- Page Navigation: BEGIN --%> -
- + + -
- +
+ +
+
+ + + + + + +
+ <%-- Box Header --%> +
+

+ +

+
+ + + +
+
+ <%-- Box Body --%> +
+ <%-- Message --%> +
+ +
+ +
+
+ +
+ + <%-- List --%> + +

+ +

+
+ + + + + + + + + + + + + + + + +
${f:h(data.name)}${f:h(data.webConfig.name)}
+
+ +
+ <%-- Box Footer --%> + +
+
- <%-- Page Navigation: END --%> - -
- <%-- List: END --%> - - + +
+ + +
+ + + diff --git a/src/main/webapp/WEB-INF/view/admin/webAuthentication/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/webAuthentication/confirm.jsp index 11e5823dc..f31401fb6 100644 --- a/src/main/webapp/WEB-INF/view/admin/webAuthentication/confirm.jsp +++ b/src/main/webapp/WEB-INF/view/admin/webAuthentication/confirm.jsp @@ -1,136 +1,176 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.web_authentication_configuration" /> + + + +
+ + + + + -

- -

+
- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - -
-
    + <%-- Content Header --%> +
    +

    + +

    +
-
+ + - <%-- Confirm Form: BEGIN --%> - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
${f:h(hostname)}
${f:h(port)}
${f:h(authRealm)}
- ${f:h(item.label)} -
${f:h(username)}
******
${f:br(f:h(parameters))}
- ${f:h(item.label)} -
- " /> - " /> - - " /> - " /> - - " /> - " /> - - " /> - " /> - " /> -
-
-
- <%-- Confirm Form: BEGIN --%> +
- - + <%-- Form --%> + + + + + + + + +
+
+
+ <%-- Box Header --%> +
+

+ + + + + + + + + + + + +

+
+ + + +
+
+ <%-- Box Body --%> +
+ <%-- Message --%> +
+ +
+ +
+
+ +
+ + <%-- Form Fields --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
${f:h(hostname)}
${f:h(port)}
${f:h(authRealm)}
+ ${f:h(item.label)} +
${f:h(username)}
****** +
${f:br(f:h(parameters))}
+ ${f:h(item.label)} +
+ +
+ <%-- Box Footer --%> + +
+
+
+
+ +
+
+ + +
+ + + diff --git a/src/main/webapp/WEB-INF/view/admin/webAuthentication/edit.jsp b/src/main/webapp/WEB-INF/view/admin/webAuthentication/edit.jsp index b7aa6aeb2..23722f25b 100644 --- a/src/main/webapp/WEB-INF/view/admin/webAuthentication/edit.jsp +++ b/src/main/webapp/WEB-INF/view/admin/webAuthentication/edit.jsp @@ -1,127 +1,155 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.web_authentication_configuration" /> + + + +
+ + + + + -

- -

+
- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - -
-
    + <%-- Content Header --%> +
    +

    + +

    +
-
+ + - <%-- Edit Form: BEGIN --%> - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ${f:h(item.label)} - -
- - ${f:h(item.label)} - -
- " /> - " /> - - " /> - " /> -
-
-
- <%-- Edit Form: BEGIN --%> +
- - + <%-- Form --%> + + + + + + + + + +
+
+
+ <%-- Box Header --%> +
+

+ + + + + + +

+
+ + + +
+
+ <%-- Box Body --%> +
+ <%-- Message --%> +
+ +
+ +
+
+ +
+ + <%-- Form Fields --%> +
+ + +
+
+ + +
+
+ + +
+
+ + + + ${f:h(item.label)} + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + + ${f:h(item.label)} + + +
+
+ + <%-- Box Footer --%> + +
+
+
+
+ +
+
+ + +
+ + + diff --git a/src/main/webapp/WEB-INF/view/admin/webAuthentication/error.jsp b/src/main/webapp/WEB-INF/view/admin/webAuthentication/error.jsp index e08600966..8a7857317 100644 --- a/src/main/webapp/WEB-INF/view/admin/webAuthentication/error.jsp +++ b/src/main/webapp/WEB-INF/view/admin/webAuthentication/error.jsp @@ -1,17 +1,50 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.web_authentication_configuration" /> + + + +
+ + + + + -
- -
- -
+
+
+

+ +

+ +
- - +
+ +
+

Error

+

+ +

+

+ + + +

+
+ +
+
+ + + +
+ + + diff --git a/src/main/webapp/WEB-INF/view/admin/webAuthentication/index.jsp b/src/main/webapp/WEB-INF/view/admin/webAuthentication/index.jsp index 7328cba2f..68cf7aa7d 100644 --- a/src/main/webapp/WEB-INF/view/admin/webAuthentication/index.jsp +++ b/src/main/webapp/WEB-INF/view/admin/webAuthentication/index.jsp @@ -1,129 +1,143 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +Fess | <bean:message key="labels.web_authentication_configuration" /> + + + +
+ + + + + -

- -

- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> +
- <%-- List: BEGIN --%> -
-
- -
    -
  • -
  • - + <%-- Content Header --%> +
    +

    + +

    +
-
- - - - - -
- -

- -

-
- - - - - - - - - - - - - - - - - - -
 
- - ${f:h(data.hostname)}: - - ${f:h(data.port)}${f:h(data.webConfig.name)} - - - - - -
- <%-- Page Navigation: BEGIN --%> -
- + + -
- +
+ +
+
+ + + + + + +
+ <%-- Box Header --%> +
+

+ +

+
+ + + +
+
+ <%-- Box Body --%> +
+ <%-- Message --%> +
+ +
+ +
+
+ +
+ + <%-- List --%> + +

+ +

+
+ + + + + + + + + + + + + + + + +
+ + + ${f:h(data.hostname)}: + + + + ${f:h(data.port)} + + ${f:h(data.webConfig.name)}
+
+ +
+ <%-- Box Footer --%> + +
+
- <%-- Page Navigation: END --%> - + +
- <%-- List: END --%> - - - + +
+ + +