Events
This commit is contained in:
parent
8da4ffeffe
commit
2ab40a24c7
9
buisnesslogic/src/main/java/com/plannaplan/Acceptor.java
Normal file
9
buisnesslogic/src/main/java/com/plannaplan/Acceptor.java
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package com.plannaplan;
|
||||||
|
|
||||||
|
public class Acceptor {
|
||||||
|
public Acceptor() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void run() {
|
||||||
|
}
|
||||||
|
}
|
9
buisnesslogic/src/main/java/com/plannaplan/Emailer.java
Normal file
9
buisnesslogic/src/main/java/com/plannaplan/Emailer.java
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package com.plannaplan;
|
||||||
|
|
||||||
|
public class Emailer {
|
||||||
|
public Emailer() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void performAllMails() {
|
||||||
|
}
|
||||||
|
}
|
13
buisnesslogic/src/main/java/com/plannaplan/EventChcker.java
Normal file
13
buisnesslogic/src/main/java/com/plannaplan/EventChcker.java
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package com.plannaplan;
|
||||||
|
|
||||||
|
import com.plannaplan.interfaces.EventCreator;
|
||||||
|
|
||||||
|
public class EventChcker implements EventCreator {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.plannaplan;
|
||||||
|
|
||||||
|
import com.plannaplan.interfaces.Historable;
|
||||||
|
|
||||||
|
public class TransferValidator implements Historable {
|
||||||
|
|
||||||
|
public TransferValidator() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void performAllTransfers() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addActionToHistory() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.plannaplan.abstracts;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.plannaplan.interfaces.EventCreator;
|
||||||
|
|
||||||
|
public abstract class EventWatcher {
|
||||||
|
|
||||||
|
protected List<EventCreator> creators;
|
||||||
|
|
||||||
|
public EventWatcher() {
|
||||||
|
this.creators = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void attach(EventCreator creator) {
|
||||||
|
this.creators.add(creator);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void detach(EventCreator creator) {
|
||||||
|
this.creators.remove(creator);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update() {
|
||||||
|
}
|
||||||
|
}
|
@ -1,19 +1,17 @@
|
|||||||
package com.plannaplan.services;
|
package com.plannaplan.services;
|
||||||
|
|
||||||
import com.plannaplan.interfaces.EventCreator;
|
import com.plannaplan.abstracts.EventWatcher;
|
||||||
import com.plannaplan.repositories.AssignmentRepository;
|
import com.plannaplan.repositories.AssignmentRepository;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class AssignmentService implements EventCreator {
|
public class AssignmentService extends EventWatcher {
|
||||||
@Autowired
|
@Autowired
|
||||||
private AssignmentRepository repo;
|
private AssignmentRepository repo;
|
||||||
|
|
||||||
@Override
|
public AssignmentService() {
|
||||||
public void update() {
|
super();
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,19 +1,17 @@
|
|||||||
package com.plannaplan.services;
|
package com.plannaplan.services;
|
||||||
|
|
||||||
import com.plannaplan.interfaces.EventCreator;
|
import com.plannaplan.abstracts.EventWatcher;
|
||||||
import com.plannaplan.repositories.TransferRepository;
|
import com.plannaplan.repositories.TransferRepository;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class TransferService implements EventCreator {
|
public class TransferService extends EventWatcher {
|
||||||
@Autowired
|
@Autowired
|
||||||
private TransferRepository repo;
|
private TransferRepository repo;
|
||||||
|
|
||||||
@Override
|
public TransferService() {
|
||||||
public void update() {
|
super();
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,20 +1,18 @@
|
|||||||
package com.plannaplan.services;
|
package com.plannaplan.services;
|
||||||
|
|
||||||
import com.plannaplan.interfaces.EventCreator;
|
import com.plannaplan.abstracts.EventWatcher;
|
||||||
import com.plannaplan.repositories.UserRepository;
|
import com.plannaplan.repositories.UserRepository;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class UserService implements EventCreator {
|
public class UserService extends EventWatcher {
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserRepository repo;
|
private UserRepository repo;
|
||||||
|
|
||||||
@Override
|
public UserService() {
|
||||||
public void update() {
|
super();
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.plannaplan.transferutils;
|
||||||
|
|
||||||
|
public class TransferMatcher {
|
||||||
|
public TransferMatcher() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void findMatches() {
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.plannaplan.transferutils;
|
||||||
|
|
||||||
|
public class TransfersExecuter {
|
||||||
|
public TransfersExecuter() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void execute() {
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user