продолжение рефакторинга рассылки и исправление анимации
v++
This commit is contained in:
14
.idea/workspace.xml
generated
14
.idea/workspace.xml
generated
@@ -8,23 +8,17 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Visualizer_2.exe" beforeDir="false" afterPath="$PROJECT_DIR$/Visualizer_2.exe" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AppendBugReportField.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AppendBugReportField.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AppendBugReportField.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AppendBugReportField.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CheckedEmail.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CheckedEmail.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CheckedEmail.java" beforeDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/EditAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/EditAccount.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/Email.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/Email.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/Email.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/Email.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishBugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishBugReport.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishBugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishBugReport.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishComponent.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishComponent.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishComponent.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishComponent.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateBugReportField.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateBugReportField.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateBugReportField.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateBugReportField.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/BugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/BugReport.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/BugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/BugReport.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/EmailMessage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/EmailMessage.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/Subscribes/SubsribersDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/Subscribes/SubsribersDBTable.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/RepositoryServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/RepositoryServer.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/ComponentsServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/ComponentsServer.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/ServerCode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/ServerCode.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPlanner.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPlanner.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforTestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforTestingPlanner.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Utils.java" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
|||||||
BIN
Visualizer_2.exe
BIN
Visualizer_2.exe
Binary file not shown.
@@ -84,8 +84,9 @@ public class AppendBugReportField extends ComponentsRepositoryPass<BugReport> {
|
|||||||
message_header + " " + Utils_.Brackets(Global.mainModule.getAccount().name),
|
message_header + " " + Utils_.Brackets(Global.mainModule.getAccount().name),
|
||||||
message_text
|
message_text
|
||||||
);
|
);
|
||||||
for (String address: target.getRecipients()) {
|
Global.mainModule.getPass(PassCode.Email).Do(
|
||||||
Global.mainModule.getPass(PassCode.CheckedEmail).Do(message, address);
|
message,
|
||||||
}
|
server.db.subscribers.checkRecipients(target.getRecipients())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
package _VisualDVM.Passes.All;
|
|
||||||
import _VisualDVM.Repository.Subscribes.Subscriber;
|
|
||||||
//http://java-online.ru/javax-mail.xhtml
|
|
||||||
//https://javarush.ru/groups/posts/1226-kak-otpravitjh-pisjhmo-iz-java-prilozhenija-s-primerom
|
|
||||||
public class CheckedEmail extends Email {
|
|
||||||
//отправляет с учетом включения рассылки у подписчика.
|
|
||||||
@Override
|
|
||||||
protected boolean canStart(Object... args) throws Exception {
|
|
||||||
if (super.canStart(args)) {
|
|
||||||
if (server.db.subscribers.containsKey(address)) {
|
|
||||||
Subscriber subscriber = server.db.subscribers.get(address);
|
|
||||||
if (subscriber.mailOn != 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,20 +3,42 @@ import _VisualDVM.Passes.Server.ComponentsRepositoryPass;
|
|||||||
import _VisualDVM.Repository.EmailMessage;
|
import _VisualDVM.Repository.EmailMessage;
|
||||||
import _VisualDVM.Repository.Server.ServerCode;
|
import _VisualDVM.Repository.Server.ServerCode;
|
||||||
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
|
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
|
||||||
|
|
||||||
|
import java.util.Vector;
|
||||||
public class Email extends ComponentsRepositoryPass<EmailMessage> {
|
public class Email extends ComponentsRepositoryPass<EmailMessage> {
|
||||||
protected String address;
|
Vector<String> recipients;
|
||||||
@Override
|
@Override
|
||||||
protected boolean canStart(Object... args) throws Exception {
|
protected boolean canStart(Object... args) throws Exception {
|
||||||
|
recipients = null;
|
||||||
|
if (args.length<=1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
target = (EmailMessage) args[0];
|
target = (EmailMessage) args[0];
|
||||||
address = (String) args[1];
|
if (args[1]instanceof Vector) {
|
||||||
|
recipients = (Vector<String>) args[1];
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (args[1] instanceof String){
|
||||||
|
recipients= new Vector<>();
|
||||||
|
for (int i=1; i< args.length; ++i){
|
||||||
|
recipients.add((String) args[i]);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
protected int getTimeout() {
|
protected int getTimeout() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void ServerAction() throws Exception {
|
protected void ServerAction() throws Exception {
|
||||||
|
int i = 0;
|
||||||
|
for (String address : recipients) {
|
||||||
|
ShowProgress(recipients.size(), i, true);
|
||||||
Command(new ServerExchangeUnit_2021(ServerCode.Email, address, target));
|
Command(new ServerExchangeUnit_2021(ServerCode.Email, address, target));
|
||||||
|
++i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,9 +65,10 @@ public class PublishBugReport extends Pass<BugReport> {
|
|||||||
message.addAttachement(screen);
|
message.addAttachement(screen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (String address: target.getRecipients()) {
|
Global.mainModule.getPass(PassCode.Email).Do(
|
||||||
Global.mainModule.getPass(PassCode.CheckedEmail).Do(message, address);
|
message,
|
||||||
}
|
Global.componentsServer.db.subscribers.checkRecipients(target.getRecipients())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void showDone() throws Exception {
|
protected void showDone() throws Exception {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package _VisualDVM.Passes.All;
|
package _VisualDVM.Passes.All;
|
||||||
import Common.Utils.Utils_;
|
import Common.Utils.Utils_;
|
||||||
import _VisualDVM.Constants;
|
|
||||||
import _VisualDVM.Global;
|
import _VisualDVM.Global;
|
||||||
import _VisualDVM.GlobalData.Account.AccountRole;
|
import _VisualDVM.GlobalData.Account.AccountRole;
|
||||||
import _VisualDVM.Passes.PassCode;
|
import _VisualDVM.Passes.PassCode;
|
||||||
@@ -12,10 +11,8 @@ import _VisualDVM.Repository.EmailMessage;
|
|||||||
import _VisualDVM.Repository.RepositoryServer;
|
import _VisualDVM.Repository.RepositoryServer;
|
||||||
import _VisualDVM.Repository.Server.ServerCode;
|
import _VisualDVM.Repository.Server.ServerCode;
|
||||||
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
|
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
|
||||||
import _VisualDVM.Repository.Subscribes.Subscriber;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Vector;
|
|
||||||
public class PublishComponent extends ComponentsRepositoryPass<Component> {
|
public class PublishComponent extends ComponentsRepositoryPass<Component> {
|
||||||
String version_mail_header = "";
|
String version_mail_header = "";
|
||||||
String version_text = "";
|
String version_text = "";
|
||||||
@@ -111,20 +108,7 @@ public class PublishComponent extends ComponentsRepositoryPass<Component> {
|
|||||||
if (f.fields.cbForceMail.isSelected())
|
if (f.fields.cbForceMail.isSelected())
|
||||||
message.addAttachement(target.getFile());
|
message.addAttachement(target.getFile());
|
||||||
//--
|
//--
|
||||||
Vector<String> mails = new Vector<>();
|
Global.mainModule.getPass(PassCode.Email).Do(message, Global.componentsServer.db.subscribers.getActiveSubscribers());
|
||||||
//--
|
|
||||||
for (Subscriber subscriber : Global.componentsServer.db.subscribers.Data.values()) {
|
|
||||||
if ((subscriber.mailOn != 0) && !mails.contains(subscriber.address))
|
|
||||||
mails.add(subscriber.address);
|
|
||||||
}
|
|
||||||
for (String admin_mail : Constants.admins_mails) {
|
|
||||||
if (!mails.contains(admin_mail))
|
|
||||||
mails.add(admin_mail);
|
|
||||||
}
|
|
||||||
//--
|
|
||||||
for (String mail : mails) {
|
|
||||||
Global.mainModule.getPass(PassCode.Email).Do(message, mail);
|
|
||||||
}
|
|
||||||
//---
|
//---
|
||||||
if (target.getComponentType().equals(ComponentType.Sapfor_F) && f.fields.cbAssemblyOnServer.isSelected()) {
|
if (target.getComponentType().equals(ComponentType.Sapfor_F) && f.fields.cbAssemblyOnServer.isSelected()) {
|
||||||
Global.mainModule.getUI().getMainWindow().FocusTesting();
|
Global.mainModule.getUI().getMainWindow().FocusTesting();
|
||||||
|
|||||||
@@ -125,9 +125,10 @@ public class UpdateBugReportField extends ComponentsRepositoryPass<BugReport> {
|
|||||||
message_header + " " + Utils_.Brackets(Global.mainModule.getAccount().name),
|
message_header + " " + Utils_.Brackets(Global.mainModule.getAccount().name),
|
||||||
message_text
|
message_text
|
||||||
);
|
);
|
||||||
for (String address : target.getRecipients()) {
|
Global.mainModule.getPass(PassCode.Email).Do(
|
||||||
Global.mainModule.getPass(PassCode.CheckedEmail).Do(message, address);
|
message,
|
||||||
}
|
server.db.subscribers.checkRecipients(target.getRecipients())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,7 +124,6 @@ public enum PassCode implements PassCode_ {
|
|||||||
SendBugReport,
|
SendBugReport,
|
||||||
DeleteDownloadedBugReports,
|
DeleteDownloadedBugReports,
|
||||||
ExtractRecipients,
|
ExtractRecipients,
|
||||||
CheckedEmail,
|
|
||||||
Email,
|
Email,
|
||||||
//-
|
//-
|
||||||
GetComponentsActualVersions,
|
GetComponentsActualVersions,
|
||||||
@@ -358,7 +357,7 @@ public enum PassCode implements PassCode_ {
|
|||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case Email:
|
case Email:
|
||||||
return "Отправка по email";
|
return "Рассылка по email";
|
||||||
case SPF_RemoveDistArraysFromIO:
|
case SPF_RemoveDistArraysFromIO:
|
||||||
return "Устранение конфликтов ввода вывода";
|
return "Устранение конфликтов ввода вывода";
|
||||||
case StartSelectedSAPFORConfigurations:
|
case StartSelectedSAPFORConfigurations:
|
||||||
@@ -748,8 +747,6 @@ public enum PassCode implements PassCode_ {
|
|||||||
return "Отправка отчёта об ошибке на сервер";
|
return "Отправка отчёта об ошибке на сервер";
|
||||||
case ExtractRecipients:
|
case ExtractRecipients:
|
||||||
return "Извлечение адресатов";
|
return "Извлечение адресатов";
|
||||||
case CheckedEmail:
|
|
||||||
return "Отправка по email";
|
|
||||||
case GetComponentsActualVersions:
|
case GetComponentsActualVersions:
|
||||||
return "Получение актуальных версий компонент";
|
return "Получение актуальных версий компонент";
|
||||||
case PublishComponent:
|
case PublishComponent:
|
||||||
|
|||||||
@@ -90,14 +90,6 @@ public class BugReport extends rDBObject {
|
|||||||
for (String a : data)
|
for (String a : data)
|
||||||
if (a.length() > 0)
|
if (a.length() > 0)
|
||||||
res.add(a);
|
res.add(a);
|
||||||
//всегда добавляем себя и админов--
|
|
||||||
if (!res.contains(Global.mainModule.getAccount().email))
|
|
||||||
res.add(Global.mainModule.getAccount().email);
|
|
||||||
for (String address: Constants.admins_mails) {
|
|
||||||
if (!res.contains(address))
|
|
||||||
res.add(address);
|
|
||||||
}
|
|
||||||
//---------------------------------
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
public File getArchiveFile() {
|
public File getArchiveFile() {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class Visualiser extends Component {
|
|||||||
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
||||||
@Override
|
@Override
|
||||||
public void GetVersionInfo() {
|
public void GetVersionInfo() {
|
||||||
version = 1123;
|
version = 1124;
|
||||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||||
date_text = df.format(getClassBuildTime());
|
date_text = df.format(getClassBuildTime());
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import _VisualDVM.GlobalData.User.User;
|
|||||||
import _VisualDVM.Passes.All.ArchivesBackupPass;
|
import _VisualDVM.Passes.All.ArchivesBackupPass;
|
||||||
import _VisualDVM.Passes.All.UnzipFolderPass;
|
import _VisualDVM.Passes.All.UnzipFolderPass;
|
||||||
import _VisualDVM.Passes.All.ZipFolderPass;
|
import _VisualDVM.Passes.All.ZipFolderPass;
|
||||||
|
import _VisualDVM.Passes.Server.TestingSystemPass;
|
||||||
import _VisualDVM.ProjectData.LanguageName;
|
import _VisualDVM.ProjectData.LanguageName;
|
||||||
import _VisualDVM.Repository.BugReport.BugReport;
|
import _VisualDVM.Repository.BugReport.BugReport;
|
||||||
import _VisualDVM.Repository.BugReportsDatabase;
|
import _VisualDVM.Repository.BugReportsDatabase;
|
||||||
@@ -83,6 +84,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
//bonus backup
|
//bonus backup
|
||||||
|
//todo оформить как у планировщика, так как это нить, напрямую сервер трогать нельзя.
|
||||||
if (rightNow.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY) {
|
if (rightNow.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY) {
|
||||||
EmailMessage message = new EmailMessage(
|
EmailMessage message = new EmailMessage(
|
||||||
"db backup",
|
"db backup",
|
||||||
|
|||||||
@@ -5,11 +5,14 @@ import Common.Database.Tables.FKBehaviour;
|
|||||||
import Common.Database.Tables.FKCurrentObjectBehaviuor;
|
import Common.Database.Tables.FKCurrentObjectBehaviuor;
|
||||||
import Common.Database.Tables.FKDataBehaviour;
|
import Common.Database.Tables.FKDataBehaviour;
|
||||||
import Common.Visual.DataSetControlForm;
|
import Common.Visual.DataSetControlForm;
|
||||||
|
import _VisualDVM.Constants;
|
||||||
|
import _VisualDVM.Global;
|
||||||
import _VisualDVM.Repository.SubscriberWorkspace.SubscriberWorkspace;
|
import _VisualDVM.Repository.SubscriberWorkspace.SubscriberWorkspace;
|
||||||
import _VisualDVM.Repository.Subscribes.UI.SubsribersForm;
|
import _VisualDVM.Repository.Subscribes.UI.SubsribersForm;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Vector;
|
||||||
public class SubsribersDBTable extends DBTable<String, Subscriber> {
|
public class SubsribersDBTable extends DBTable<String, Subscriber> {
|
||||||
public SubsribersDBTable() {
|
public SubsribersDBTable() {
|
||||||
super(String.class, Subscriber.class);
|
super(String.class, Subscriber.class);
|
||||||
@@ -33,4 +36,33 @@ public class SubsribersDBTable extends DBTable<String, Subscriber> {
|
|||||||
res.put(SubscriberWorkspace.class, new FKBehaviour(FKDataBehaviour.DELETE, FKCurrentObjectBehaviuor.ACTIVE));
|
res.put(SubscriberWorkspace.class, new FKBehaviour(FKDataBehaviour.DELETE, FKCurrentObjectBehaviuor.ACTIVE));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
public Vector<String> getActiveSubscribers(){
|
||||||
|
Vector<String> res = new Vector<>();
|
||||||
|
for (Subscriber subscriber : Data.values()) {
|
||||||
|
if ((subscriber.mailOn != 0) && !res.contains(subscriber.address))
|
||||||
|
res.add(subscriber.address);
|
||||||
|
}
|
||||||
|
for (String admin_mail : Constants.admins_mails) {
|
||||||
|
if (!res.contains(admin_mail))
|
||||||
|
res.add(admin_mail);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
public Vector<String> checkRecipients(Vector<String> recipients){
|
||||||
|
Vector<String> res = new Vector<>();
|
||||||
|
for (String address: recipients){
|
||||||
|
if (this.containsKey(address) && get(address).mailOn!=0){
|
||||||
|
res.add(address);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//--
|
||||||
|
if (!res.contains(Global.mainModule.getAccount().email))
|
||||||
|
res.add(Global.mainModule.getAccount().email);
|
||||||
|
//--
|
||||||
|
for (String admin_mail : Constants.admins_mails) {
|
||||||
|
if (!res.contains(admin_mail))
|
||||||
|
res.add(admin_mail);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package _VisualDVM.TestingSystem.Common;
|
|||||||
import Common.CommonConstants;
|
import Common.CommonConstants;
|
||||||
import Common.Utils.Loggable;
|
import Common.Utils.Loggable;
|
||||||
import Common.Utils.Utils_;
|
import Common.Utils.Utils_;
|
||||||
|
import _VisualDVM.Constants;
|
||||||
import _VisualDVM.Global;
|
import _VisualDVM.Global;
|
||||||
import _VisualDVM.GlobalData.Machine.Machine;
|
import _VisualDVM.GlobalData.Machine.Machine;
|
||||||
import _VisualDVM.GlobalData.Machine.MachineType;
|
import _VisualDVM.GlobalData.Machine.MachineType;
|
||||||
@@ -107,7 +108,12 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
|||||||
message.subject = "Состояние пакета тестирования " + packageDescription() + " " +
|
message.subject = "Состояние пакета тестирования " + packageDescription() + " " +
|
||||||
Utils_.Brackets(testingPackage.id) + " изменилось на " + Utils_.Brackets(testingPackage.state.getDescription());
|
Utils_.Brackets(testingPackage.id) + " изменилось на " + Utils_.Brackets(testingPackage.state.getDescription());
|
||||||
message.text = testingPackage.description;
|
message.text = testingPackage.description;
|
||||||
ServerCommand(ServerCode.Email, testingPackage.sender_address, message);
|
Vector<String> recipients = new Vector<>(Constants.admins_mails);
|
||||||
|
if (!recipients.contains(testingPackage.sender_address))
|
||||||
|
recipients.add(testingPackage.sender_address);
|
||||||
|
//--
|
||||||
|
for (String address: recipients)
|
||||||
|
ServerCommand(ServerCode.Email, address, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---
|
//---
|
||||||
|
|||||||
Reference in New Issue
Block a user