продолжение рефакторинга рассылки и исправление анимации
v++
This commit is contained in:
@@ -90,14 +90,6 @@ public class BugReport extends rDBObject {
|
||||
for (String a : data)
|
||||
if (a.length() > 0)
|
||||
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;
|
||||
}
|
||||
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
|
||||
@Override
|
||||
public void GetVersionInfo() {
|
||||
version = 1123;
|
||||
version = 1124;
|
||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||
date_text = df.format(getClassBuildTime());
|
||||
|
||||
@@ -12,6 +12,7 @@ import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.Passes.All.ArchivesBackupPass;
|
||||
import _VisualDVM.Passes.All.UnzipFolderPass;
|
||||
import _VisualDVM.Passes.All.ZipFolderPass;
|
||||
import _VisualDVM.Passes.Server.TestingSystemPass;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
import _VisualDVM.Repository.BugReport.BugReport;
|
||||
import _VisualDVM.Repository.BugReportsDatabase;
|
||||
@@ -83,6 +84,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
);
|
||||
}
|
||||
//bonus backup
|
||||
//todo оформить как у планировщика, так как это нить, напрямую сервер трогать нельзя.
|
||||
if (rightNow.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY) {
|
||||
EmailMessage message = new EmailMessage(
|
||||
"db backup",
|
||||
|
||||
@@ -5,11 +5,14 @@ import Common.Database.Tables.FKBehaviour;
|
||||
import Common.Database.Tables.FKCurrentObjectBehaviuor;
|
||||
import Common.Database.Tables.FKDataBehaviour;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Repository.SubscriberWorkspace.SubscriberWorkspace;
|
||||
import _VisualDVM.Repository.Subscribes.UI.SubsribersForm;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public class SubsribersDBTable extends DBTable<String, Subscriber> {
|
||||
public SubsribersDBTable() {
|
||||
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));
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user