• R/O
  • SSH
  • HTTPS

clearfybusiness: Commit


Commit MetaInfo

Révision223 (tree)
l'heure2019-07-23 15:51:27
Auteurdaianji

Message de Log

KeyValueStrage move into standard implementation on database using.

Change Summary

Modification

--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/ClearfyApplication.java (revision 222)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/ClearfyApplication.java (revision 223)
@@ -194,6 +194,7 @@
194194 */
195195 @Override
196196 public void init() {
197+
197198 super.init();
198199
199200 this.getApplicationSettings().setUploadProgressUpdatesEnabled(true);
@@ -252,6 +253,10 @@
252253 return this.language;
253254 }
254255
256+ /**
257+ * ロケールを登録する。
258+ * @return
259+ */
255260 public Locale getLocale() {
256261 String lng = this.getLanguage();
257262 String langcode = lng.substring(0, lng.indexOf("_"));
@@ -493,6 +498,7 @@
493498 *
494499 * @param MenuId
495500 * @param MenuCaptionKey
501+ * @param ordinal
496502 * @param contentHolderId
497503 * @param pageClass
498504 * @param AuthLevel
@@ -501,6 +507,7 @@
501507 * @param sectionClass
502508 * @param hasMenuImage
503509 */
510+ @Override
504511 public void registMenu(String MenuId, String MenuCaptionKey, int ordinal,
505512 String contentHolderId, Class pageClass,
506513 int AuthLevel, int allowUpperLevel,
@@ -520,6 +527,7 @@
520527 hasMenuImage);
521528 }
522529
530+ @Override
523531 public void registMenu(String MenuId, String MenuCaptionKey, int ordinal,
524532 String contentHolderId, Class pageClass,
525533 int AuthLevel, int allowUpperLevel,
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/plugin/PluginInstallUtil.java (revision 222)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/plugin/PluginInstallUtil.java (revision 223)
@@ -98,7 +98,7 @@
9898
9999 return rvalue;
100100 }
101-
101+
102102 /**
103103 * プラグインのインストール.
104104 *
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/mail/Initializer.java (revision 222)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/mail/Initializer.java (revision 223)
@@ -23,6 +23,7 @@
2323 */
2424 package org.clearfy.plugin.mail;
2525
26+import org.clearfy.datawrapper.data.KeyValueStrage;
2627 import org.clearfy.ClearfyRoles;
2728 import org.clearfy.InitializerBase;
2829 import org.clearfy.admin.Admin;
@@ -42,7 +43,7 @@
4243 @Override
4344 public void initDb() {
4445 //テーブルの作成
45- MailSetting msetting = new MailSetting();
46+ KeyValueStrage msetting = new KeyValueStrage();
4647 msetting.alterOrCreateTable(this);
4748
4849 }
@@ -49,44 +50,44 @@
4950
5051 @Override
5152 public void mergeInitialData() {
52- MailSetting msetting = new MailSetting();
53- msetting.setJdbcSupplier(this);
53+ KeyValueStrage keyValue = new KeyValueStrage();
54+ keyValue.setJdbcSupplier(this);
5455
5556 //メールサーバー
56- msetting.merge(
57- msetting.Key.setValue(Constants.SMTP_SERVER),
58- msetting.Value.setValue("mail.server.url")
57+ keyValue.merge(
58+ keyValue.Key.setValue(Constants.SMTP_SERVER),
59+ keyValue.Value.setValue("mail.server.url")
5960 );
6061
6162 //ポート
62- msetting.merge(
63- msetting.Key.setValue(Constants.PORT),
64- msetting.Value.setValue("587")
63+ keyValue.merge(
64+ keyValue.Key.setValue(Constants.PORT),
65+ keyValue.Value.setValue("587")
6566 );
6667
67- msetting.merge(
68- msetting.Key.setValue(Constants.DEFAULT_TIMEOUT),
69- msetting.Value.setValue("60000")
68+ keyValue.merge(
69+ keyValue.Key.setValue(Constants.DEFAULT_TIMEOUT),
70+ keyValue.Value.setValue("60000")
7071 );
7172
72- msetting.merge(
73- msetting.Key.setValue(Constants.USE_STARTTLS),
74- msetting.Value.setValue("true")
73+ keyValue.merge(
74+ keyValue.Key.setValue(Constants.USE_STARTTLS),
75+ keyValue.Value.setValue("true")
7576 );
7677
77- msetting.merge(
78- msetting.Key.setValue(Constants.SYSTEM_MAIL_SENDER),
79- msetting.Value.setValue("clearfy@mail.server.host")
78+ keyValue.merge(
79+ keyValue.Key.setValue(Constants.SYSTEM_MAIL_SENDER),
80+ keyValue.Value.setValue("clearfy@mail.server.host")
8081 );
8182
82- msetting.merge(
83- msetting.Key.setValue(Constants.DOMAIN),
84- msetting.Value.setValue("my.domain")
83+ keyValue.merge(
84+ keyValue.Key.setValue(Constants.DOMAIN),
85+ keyValue.Value.setValue("my.domain")
8586 );
8687
87- msetting.merge(
88- msetting.Key.setValue(Constants.PASSWORD),
89- msetting.Value.setValue("mypassword"));
88+ keyValue.merge(
89+ keyValue.Key.setValue(Constants.PASSWORD),
90+ keyValue.Value.setValue("mypassword"));
9091 }
9192
9293 @Override
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/mail/MailSender.java (revision 222)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/mail/MailSender.java (revision 223)
@@ -5,6 +5,7 @@
55 */
66 package org.clearfy.plugin.mail;
77
8+import org.clearfy.datawrapper.data.KeyValueStrage;
89 import java.io.IOException;
910 import java.io.UnsupportedEncodingException;
1011 import java.util.Properties;
@@ -310,7 +311,7 @@
310311 * @param supplier
311312 */
312313 public void loadSmtpSetting(IJdbcSupplier supplier) {
313- MailSetting setting = new MailSetting();
314+ KeyValueStrage setting = new KeyValueStrage();
314315 setting.setJdbcSupplier(supplier);
315316 }
316317
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/mail/MailSettingEditor.java (revision 222)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/mail/MailSettingEditor.java (revision 223)
@@ -23,6 +23,7 @@
2323 */
2424 package org.clearfy.plugin.mail;
2525
26+import org.clearfy.datawrapper.data.KeyValueStrage;
2627 import org.apache.wicket.ajax.AjaxRequestTarget;
2728 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
2829 import org.apache.wicket.markup.html.basic.Label;
@@ -41,7 +42,7 @@
4142 */
4243 public class MailSettingEditor extends ClearfySection {
4344
44- private MailSetting mailSetting;
45+ private KeyValueStrage mailSetting;
4546
4647 private Form mailSettingForm;
4748
@@ -76,7 +77,7 @@
7677 @Override
7778 public void drawContent() {
7879
79- this.mailSetting = new MailSetting();
80+ this.mailSetting = new KeyValueStrage();
8081 this.mailSetting.setJdbcSupplier(this.page);
8182
8283 this.mailSettingForm = new Form("mailSettingForm");
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/scheduler/Job.java (revision 222)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/scheduler/Job.java (revision 223)
@@ -62,6 +62,14 @@
6262 public Job(IJdbcSupplier supplier) {
6363 this.supplier = supplier;
6464 }
65+
66+ /**
67+ * JDBC提供クラスの登録
68+ * @param supplier
69+ */
70+ protected void setJDbcSupplier(IJdbcSupplier supplier){
71+ this.supplier = supplier;
72+ }
6573
6674 //public Job(Jdbc controller) {
6775 // this.controller = controller;
Afficher sur ancien navigateur de dépôt.