• R/O
  • SSH
  • HTTPS

blancofw: 提交


Commit MetaInfo

修订版9961 (tree)
时间2014-03-23 17:01:56
作者iga

Log Message

save

更改概述

差异

--- blancoFileManagerWeb/trunk/src/blanco/filemanager/web/bean/file/AbstractBlancoFileManagerWebFileAnalyzeBean.java (revision 9960)
+++ blancoFileManagerWeb/trunk/src/blanco/filemanager/web/bean/file/AbstractBlancoFileManagerWebFileAnalyzeBean.java (revision 9961)
@@ -9,7 +9,6 @@
99 import blanco.filemanager.analyze.BlancoFileManagerAnalyzeUtil;
1010 import blanco.filemanager.web.message.BlancoFileManagerWebMessage;
1111 import blanco.fw.BlancoInject;
12-import blanco.gettersetter.BlancoGetterSetter;
1312 import blanco.jsf.BlancoJsfManagedBean;
1413
1514 @BlancoJsfManagedBean(scope = "view")
@@ -16,17 +15,11 @@
1615 public abstract class AbstractBlancoFileManagerWebFileAnalyzeBean {
1716 protected final BlancoFileManagerWebMessage msg = new BlancoFileManagerWebMessage();
1817
19- /**
20- * プロジェクト名 TODO ドロップダウン化
21- */
22- @BlancoGetterSetter
23- protected String project = "NONAME";
18+ protected String analyzeProject(@BlancoInject final BlancoFileManagerWebFileProjectBean projectBean,
19+ @BlancoInject final FacesContext ctx, @BlancoInject final Connection conn) throws IOException, SQLException {
2420
25- protected String analyzeProject(@BlancoInject final FacesContext ctx, @BlancoInject final Connection conn)
26- throws IOException, SQLException {
27-
2821 // さしあたりソースのみ解析します。
29- BlancoFileManagerAnalyzeUtil.analyzeSource(conn, project);
22+ BlancoFileManagerAnalyzeUtil.analyzeSource(conn, projectBean.getProject());
3023
3124 // TODO メッセージ出力が必要。
3225
--- blancoFileManagerWeb/trunk/src/blanco/filemanager/web/bean/file/AbstractBlancoFileManagerWebFileReportBean.java (revision 9960)
+++ blancoFileManagerWeb/trunk/src/blanco/filemanager/web/bean/file/AbstractBlancoFileManagerWebFileReportBean.java (revision 9961)
@@ -12,7 +12,6 @@
1212 import blanco.filemanager.report.BlancoFileManagerReportUtil;
1313 import blanco.filemanager.web.message.BlancoFileManagerWebMessage;
1414 import blanco.fw.BlancoInject;
15-import blanco.gettersetter.BlancoGetterSetter;
1615 import blanco.jsf.BlancoJsfManagedBean;
1716
1817 @BlancoJsfManagedBean(scope = "view")
@@ -19,15 +18,9 @@
1918 public abstract class AbstractBlancoFileManagerWebFileReportBean {
2019 protected final BlancoFileManagerWebMessage msg = new BlancoFileManagerWebMessage();
2120
22- /**
23- * プロジェクト名 TODO ドロップダウン化
24- */
25- @BlancoGetterSetter
26- protected String project = "NONAME";
21+ protected String reportProject(@BlancoInject final BlancoFileManagerWebFileProjectBean projectBean,
22+ @BlancoInject final FacesContext ctx, @BlancoInject final Connection conn) throws IOException, SQLException {
2723
28- protected String reportProject(@BlancoInject final FacesContext ctx, @BlancoInject final Connection conn)
29- throws IOException, SQLException {
30-
3124 final InputStream templatefileStream = this.getClass().getResourceAsStream("blancoFileManagerTemplate.xls");
3225 if (templatefileStream == null) {
3326 System.out.println("テンプレートファイルのロードに失敗。ビルドに失敗していませんか?");
@@ -53,7 +46,7 @@
5346 final OutputStream outStream = response.getOutputStream();
5447
5548 // ここでコピー
56- BlancoFileManagerReportUtil.reportWorkbook(conn, project, templatefileStream, outStream);
49+ BlancoFileManagerReportUtil.reportWorkbook(conn, projectBean.getProject(), templatefileStream, outStream);
5750
5851 if (response.isCommitted()) {
5952 try {
--- blancoFileManagerWeb/trunk/blanco/main/blanco/filemanager/web/bean/file/BlancoFileManagerWebFileAnalyzeBean.java (revision 9960)
+++ blancoFileManagerWeb/trunk/blanco/main/blanco/filemanager/web/bean/file/BlancoFileManagerWebFileAnalyzeBean.java (revision 9961)
@@ -8,6 +8,8 @@
88 import java.sql.Connection;
99 import java.sql.SQLException;
1010
11+import javax.el.ELContext;
12+import javax.el.ELResolver;
1113 import javax.faces.bean.ManagedBean;
1214 import javax.faces.bean.ViewScoped;
1315 import javax.faces.context.FacesContext;
@@ -26,27 +28,7 @@
2628 private static final long serialVersionUID = 1L;
2729
2830 /**
29- * プロジェクト名 TODO ドロップダウン化
30- * [@BlancoGetterSetter]
3131 *
32- * @return 取得したい値。
33- */
34- public String getProject() {
35- return project;
36- }
37-
38- /**
39- * プロジェクト名 TODO ドロップダウン化
40- * [@BlancoGetterSetter]
41- *
42- * @param project 設定したい値。
43- */
44- public void setProject(final String project) {
45- this.project = project;
46- }
47-
48- /**
49- *
5032 * @return
5133 * @throws IOException
5234 * @throws SQLException
@@ -54,10 +36,13 @@
5436 public String analyzeProject() throws IOException, SQLException {
5537 java.lang.String autoValMethodResult;
5638 final FacesContext ctx = FacesContext.getCurrentInstance();
39+ final ELContext autoValElc = ctx.getELContext();
40+ final ELResolver autoValRslvr = ctx.getApplication().getELResolver();
41+ final BlancoFileManagerWebFileProjectBean projectBean = (BlancoFileManagerWebFileProjectBean) autoValRslvr.getValue(autoValElc, null, "blancoFileManagerWebFileProjectBean");
5742 // [@BlancoInject] Begin database transaction.
5843 final Connection conn = blanco.db.BlancoDbConnectionUtil.getConnection();
5944 try {
60- autoValMethodResult = super.analyzeProject(ctx, conn);
45+ autoValMethodResult = super.analyzeProject(projectBean, ctx, conn);
6146 } finally {
6247 // [@BlancoInject] End database transaction.
6348 blanco.db.BlancoDbConnectionUtil.releaseConnection(conn);
--- blancoFileManagerWeb/trunk/blanco/main/blanco/filemanager/web/bean/file/BlancoFileManagerWebFileReportBean.java (revision 9960)
+++ blancoFileManagerWeb/trunk/blanco/main/blanco/filemanager/web/bean/file/BlancoFileManagerWebFileReportBean.java (revision 9961)
@@ -8,6 +8,8 @@
88 import java.sql.Connection;
99 import java.sql.SQLException;
1010
11+import javax.el.ELContext;
12+import javax.el.ELResolver;
1113 import javax.faces.bean.ManagedBean;
1214 import javax.faces.bean.ViewScoped;
1315 import javax.faces.context.FacesContext;
@@ -26,27 +28,7 @@
2628 private static final long serialVersionUID = 1L;
2729
2830 /**
29- * プロジェクト名 TODO ドロップダウン化
30- * [@BlancoGetterSetter]
3131 *
32- * @return 取得したい値。
33- */
34- public String getProject() {
35- return project;
36- }
37-
38- /**
39- * プロジェクト名 TODO ドロップダウン化
40- * [@BlancoGetterSetter]
41- *
42- * @param project 設定したい値。
43- */
44- public void setProject(final String project) {
45- this.project = project;
46- }
47-
48- /**
49- *
5032 * @return
5133 * @throws IOException
5234 * @throws SQLException
@@ -54,10 +36,13 @@
5436 public String reportProject() throws IOException, SQLException {
5537 java.lang.String autoValMethodResult;
5638 final FacesContext ctx = FacesContext.getCurrentInstance();
39+ final ELContext autoValElc = ctx.getELContext();
40+ final ELResolver autoValRslvr = ctx.getApplication().getELResolver();
41+ final BlancoFileManagerWebFileProjectBean projectBean = (BlancoFileManagerWebFileProjectBean) autoValRslvr.getValue(autoValElc, null, "blancoFileManagerWebFileProjectBean");
5742 // [@BlancoInject] Begin database transaction.
5843 final Connection conn = blanco.db.BlancoDbConnectionUtil.getConnection();
5944 try {
60- autoValMethodResult = super.reportProject(ctx, conn);
45+ autoValMethodResult = super.reportProject(projectBean, ctx, conn);
6146 } finally {
6247 // [@BlancoInject] End database transaction.
6348 blanco.db.BlancoDbConnectionUtil.releaseConnection(conn);
Show on old repository browser