aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-07-27 09:18:50 +0500
committerAbyss777 <abyss@fox5.ru>2018-07-27 09:18:50 +0500
commit47a5fc014282314ef8c2b719a961c01c6cd2b822 (patch)
treef099eff33a6bcd3917add19fec9fce7e849e819f /src/org/traccar
parente4ec06498f63ca31d8fd7332523bd997f3fe44a0 (diff)
downloadtrackermap-server-47a5fc014282314ef8c2b719a961c01c6cd2b822.tar.gz
trackermap-server-47a5fc014282314ef8c2b719a961c01c6cd2b822.tar.bz2
trackermap-server-47a5fc014282314ef8c2b719a961c01c6cd2b822.zip
Move notificators to appropriate package and rename.
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/notification/NotificatorManager.java10
-rw-r--r--src/org/traccar/notificators/Notificator.java (renamed from src/org/traccar/notification/Notificator.java)3
-rw-r--r--src/org/traccar/notificators/NotificatorMail.java (renamed from src/org/traccar/notification/NotificationMail.java)8
-rw-r--r--src/org/traccar/notificators/NotificatorNull.java (renamed from src/org/traccar/notification/NotificationNull.java)4
-rw-r--r--src/org/traccar/notificators/NotificatorSms.java (renamed from src/org/traccar/notification/NotificationSms.java)8
-rw-r--r--src/org/traccar/notificators/NotificatorWeb.java (renamed from src/org/traccar/notification/NotificationWeb.java)4
6 files changed, 23 insertions, 14 deletions
diff --git a/src/org/traccar/notification/NotificatorManager.java b/src/org/traccar/notification/NotificatorManager.java
index 147de47d3..a3b13ef25 100644
--- a/src/org/traccar/notification/NotificatorManager.java
+++ b/src/org/traccar/notification/NotificatorManager.java
@@ -24,15 +24,17 @@ import java.util.Set;
import org.traccar.Context;
import org.traccar.helper.Log;
import org.traccar.model.Typed;
+import org.traccar.notificators.NotificatorNull;
+import org.traccar.notificators.Notificator;
public final class NotificatorManager {
- private static final String DEFAULT_WEB_NOTIFICATOR = "org.traccar.notification.NotificationWeb";
- private static final String DEFAULT_MAIL_NOTIFICATOR = "org.traccar.notification.NotificationMail";
- private static final String DEFAULT_SMS_NOTIFICATOR = "org.traccar.notification.NotificationSms";
+ private static final String DEFAULT_WEB_NOTIFICATOR = "org.traccar.notificators.NotificatorWeb";
+ private static final String DEFAULT_MAIL_NOTIFICATOR = "org.traccar.notificators.NotificatorMail";
+ private static final String DEFAULT_SMS_NOTIFICATOR = "org.traccar.notificators.NotificatorSms";
private final Map<String, Notificator> notificators = new HashMap<>();
- private static final Notificator NULL_NOTIFICATOR = new NotificationNull();
+ private static final Notificator NULL_NOTIFICATOR = new NotificatorNull();
public NotificatorManager() {
final String[] types = Context.getConfig().getString("notificator.types", "").split(",");
diff --git a/src/org/traccar/notification/Notificator.java b/src/org/traccar/notificators/Notificator.java
index d912b445d..de9817c9f 100644
--- a/src/org/traccar/notification/Notificator.java
+++ b/src/org/traccar/notificators/Notificator.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.traccar.notification;
+package org.traccar.notificators;
import org.traccar.helper.Log;
import org.traccar.model.Event;
import org.traccar.model.Position;
+import org.traccar.notification.MessageException;
public abstract class Notificator {
diff --git a/src/org/traccar/notification/NotificationMail.java b/src/org/traccar/notificators/NotificatorMail.java
index c2ee67299..cf786ffc4 100644
--- a/src/org/traccar/notification/NotificationMail.java
+++ b/src/org/traccar/notificators/NotificatorMail.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.traccar.notification;
+package org.traccar.notificators;
import java.util.Properties;
@@ -31,8 +31,12 @@ import org.traccar.helper.Log;
import org.traccar.model.Event;
import org.traccar.model.Position;
import org.traccar.model.User;
+import org.traccar.notification.FullMessage;
+import org.traccar.notification.MessageException;
+import org.traccar.notification.NotificationFormatter;
+import org.traccar.notification.PropertiesProvider;
-public final class NotificationMail extends Notificator {
+public final class NotificatorMail extends Notificator {
private static Properties getProperties(PropertiesProvider provider) {
Properties properties = new Properties();
diff --git a/src/org/traccar/notification/NotificationNull.java b/src/org/traccar/notificators/NotificatorNull.java
index 3ee954c24..2120cda0c 100644
--- a/src/org/traccar/notification/NotificationNull.java
+++ b/src/org/traccar/notificators/NotificatorNull.java
@@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.traccar.notification;
+package org.traccar.notificators;
import org.traccar.helper.Log;
import org.traccar.model.Event;
import org.traccar.model.Position;
-public final class NotificationNull extends Notificator {
+public final class NotificatorNull extends Notificator {
@Override
public void sendAsync(long userId, Event event, Position position) {
diff --git a/src/org/traccar/notification/NotificationSms.java b/src/org/traccar/notificators/NotificatorSms.java
index ed651ac11..cc19f9a58 100644
--- a/src/org/traccar/notification/NotificationSms.java
+++ b/src/org/traccar/notificators/NotificatorSms.java
@@ -14,19 +14,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.traccar.notification;
+package org.traccar.notificators;
import org.traccar.Context;
import org.traccar.model.Event;
import org.traccar.model.Position;
import org.traccar.model.User;
+import org.traccar.notification.MessageException;
+import org.traccar.notification.NotificationFormatter;
import org.traccar.sms.SmsManager;
-public final class NotificationSms extends Notificator {
+public final class NotificatorSms extends Notificator {
private final SmsManager smsManager;
- public NotificationSms() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
+ public NotificatorSms() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
final String smsClass = Context.getConfig().getString("notificator.sms.manager.class", "");
if (smsClass.length() > 0) {
smsManager = (SmsManager) Class.forName(smsClass).newInstance();
diff --git a/src/org/traccar/notification/NotificationWeb.java b/src/org/traccar/notificators/NotificatorWeb.java
index afc401d24..1d11c0b46 100644
--- a/src/org/traccar/notification/NotificationWeb.java
+++ b/src/org/traccar/notificators/NotificatorWeb.java
@@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.traccar.notification;
+package org.traccar.notificators;
import org.traccar.Context;
import org.traccar.model.Event;
import org.traccar.model.Position;
-public final class NotificationWeb extends Notificator {
+public final class NotificatorWeb extends Notificator {
@Override
public void sendSync(long userId, Event event, Position position) {