Skip to content

Commit b436269

Browse files
committed
webservice updated
1 parent 5ddb191 commit b436269

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed

logicaldoc-core/src/main/java/com/logicaldoc/core/communication/EventCollector.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import com.logicaldoc.core.document.Document;
1717
import com.logicaldoc.core.document.DocumentDAO;
1818
import com.logicaldoc.core.history.AbstractDocumentHistory;
19-
import com.logicaldoc.core.history.ExtendedHistory;
19+
import com.logicaldoc.core.history.History;
2020
import com.logicaldoc.core.threading.ThreadPools;
2121
import com.logicaldoc.util.Context;
2222

@@ -64,7 +64,7 @@ public void removeListener(EventListener listener) {
6464
* @param history
6565
* @return true if it was not remembered already, false otherwise
6666
*/
67-
private boolean rememberHistory(ExtendedHistory history) {
67+
private boolean rememberHistory(History history) {
6868
Queue<Long> fifo = fifos.get(history.getClass().getName());
6969
if (fifo == null) {
7070
fifo = new CircularFifoQueue<>(FIFO_SIZE);
@@ -84,7 +84,7 @@ private boolean rememberHistory(ExtendedHistory history) {
8484
*
8585
* @param history the history to notify
8686
*/
87-
public void newEvent(ExtendedHistory history) {
87+
public void newEvent(History history) {
8888
if (!isEnabled()) {
8989
log.debug("Aspect {} not enabled", ASPECT);
9090
return;

logicaldoc-core/src/main/java/com/logicaldoc/core/communication/EventListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.logicaldoc.core.communication;
22

3-
import com.logicaldoc.core.history.ExtendedHistory;
3+
import com.logicaldoc.core.history.History;
44

55
/**
66
* A listener for the event emitted by the collector
@@ -15,5 +15,5 @@ public interface EventListener {
1515
*
1616
* @param event the event to process
1717
*/
18-
public void newEvent(ExtendedHistory event);
18+
public void newEvent(History event);
1919
}

logicaldoc-core/src/main/java/com/logicaldoc/core/history/HibernateHistoryDAO.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121
/**
2222
* Parent of all DAOs that handle histories
2323
*
24-
* @param <T> Class of the implementation of a {@link ExtendedHistory} this DAO handles
24+
* @param <T> Class of the implementation of a {@link ExtendedHistory} this DAO
25+
* handles
2526
*
2627
* @author Alessandro Gasparini - LogicalDOC
2728
* @since 9.0.1
2829
*/
29-
public abstract class HibernateHistoryDAO<T extends ExtendedHistory> extends HibernatePersistentObjectDAO<T>
30+
public abstract class HibernateHistoryDAO<T extends History> extends HibernatePersistentObjectDAO<T>
3031
implements PersistentObjectDAO<T> {
3132

3233
@Resource(name = "ContextProperties")
@@ -64,7 +65,7 @@ public void store(T history) throws PersistenceException {
6465
EventCollector.get().newEvent(history);
6566
}
6667

67-
protected String getTenantName(ExtendedHistory history) throws PersistenceException {
68+
protected String getTenantName(History history) throws PersistenceException {
6869
if (HibernateHistoryDAO.tenantNames.containsKey(history.getTenantId()))
6970
return HibernateHistoryDAO.tenantNames.get(history.getTenantId());
7071

logicaldoc-webapp/src/main/java/com/logicaldoc/web/websockets/EventEndpoint.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.logicaldoc.core.folder.FolderEvent;
3131
import com.logicaldoc.core.history.AbstractDocumentHistory;
3232
import com.logicaldoc.core.history.ExtendedHistory;
33+
import com.logicaldoc.core.history.History;
3334
import com.logicaldoc.core.security.TenantDAO;
3435
import com.logicaldoc.core.security.user.UserEvent;
3536
import com.logicaldoc.core.security.user.UserHistory;
@@ -82,7 +83,7 @@ public class EventEndpoint implements EventListener {
8283
* @param history
8384
* @return true if it was not remembered already, false otherwise
8485
*/
85-
private boolean rememberHistory(ExtendedHistory history) {
86+
private boolean rememberHistory(History history) {
8687
Queue<Long> fifo = fifos.get(history.getClass().getName());
8788
if (fifo == null) {
8889
fifo = new CircularFifoQueue<>(FIFO_SIZE);
@@ -138,7 +139,7 @@ public void onBinaryMessage(final byte[] data, final Session session) {
138139
}
139140

140141
@Override
141-
public void newEvent(ExtendedHistory event) {
142+
public void newEvent(History event) {
142143
ContextProperties config = Context.get().getProperties();
143144

144145
try {
@@ -166,7 +167,7 @@ public void newEvent(ExtendedHistory event) {
166167
}
167168
}
168169

169-
private WebsocketMessage prepareMessage(ExtendedHistory event) throws PersistenceException, ServerException {
170+
private WebsocketMessage prepareMessage(History event) throws PersistenceException, ServerException {
170171
WebsocketMessage message = new WebsocketMessage(event.getSessionId(), event.getEvent());
171172
message.setUserId(event.getUserId());
172173
message.setUsername(event.getUserLogin());

logicaldoc-webservice/src/main/java/com/logicaldoc/webservice/WebserviceCall.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import org.hibernate.annotations.Cache;
99
import org.hibernate.annotations.CacheConcurrencyStrategy;
1010

11-
import com.logicaldoc.core.history.ExtendedHistory;
11+
import com.logicaldoc.core.history.History;
1212

1313
/**
1414
* Represents a call to the webservice
@@ -20,7 +20,7 @@
2020
@Table(name = "ld_webservicecall")
2121
@Cacheable
2222
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
23-
public class WebserviceCall extends ExtendedHistory {
23+
public class WebserviceCall extends History {
2424

2525
private static final long serialVersionUID = 1L;
2626

logicaldoc-webservice/src/main/resources/mappings/WebserviceCall.hbm.xml renamed to logicaldoc-webservice/src/main/resources/mappings/WebserviceCall.hbm.skip

File renamed without changes.

0 commit comments

Comments
 (0)