-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore file Upload for the moment, work further with WebSockets
- Loading branch information
1 parent
6124873
commit da1b0b2
Showing
5 changed files
with
144 additions
and
32 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/main/java/org/jabref/logic/sharelatex/ShareLatexUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.jabref.logic.sharelatex; | ||
|
||
|
||
public class ShareLatexUtil { | ||
|
||
|
||
public String processBibDocId() { | ||
return ""; | ||
|
||
} | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/org/jabref/logic/sharelatex/SharelatexClientEndpoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.jabref.logic.sharelatex; | ||
|
||
import javax.websocket.ClientEndpoint; | ||
import javax.websocket.EndpointConfig; | ||
import javax.websocket.OnMessage; | ||
import javax.websocket.OnOpen; | ||
import javax.websocket.Session; | ||
|
||
@ClientEndpoint | ||
public class SharelatexClientEndpoint { | ||
|
||
@OnMessage | ||
public void processMessageFromServer(String message, Session session) { | ||
System.out.println("Message came from the server ! " + message); | ||
} | ||
|
||
@OnOpen | ||
public void onOpen(Session session, EndpointConfig config) { | ||
System.out.println("Session opened"); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
package org.jabref.logic.sharelatex; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Paths; | ||
|
||
import org.jabref.JabRefExecutorService; | ||
|
||
import org.junit.Test; | ||
|
||
|
@@ -12,8 +13,16 @@ public void test() throws IOException { | |
SharelatexConnector connector = new SharelatexConnector(); | ||
connector.connectToServer("http://192.168.1.248", "[email protected]", "test"); | ||
connector.getProjects(); | ||
connector.uploadFile("591188ed98ba55690073c29e", | ||
Paths.get("X:\\Users\\CS\\Documents\\_JABREFTEMP\\aaaaaaaaaaaaaa.bib")); | ||
// connector.uploadFile("591188ed98ba55690073c29e",Paths.get("X:\\Users\\CS\\Documents\\_JABREFTEMP\\aaaaaaaaaaaaaa.bib")); | ||
// connector.uploadFileWithWebClient("591188ed98ba55690073c29e", | ||
// Paths.get("X:\\Users\\CS\\Documents\\_JABREFTEMP\\aaaaaaaaaaaaaa.bib")); | ||
|
||
|
||
JabRefExecutorService.INSTANCE.executeAndWait(()-> { | ||
|
||
connector.StartWebsocketListener(); | ||
|
||
}); | ||
} | ||
|
||
} |