git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit '77d3a60869e7a780c6ae069e51530e1eacece5e2'
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
library
/
RemoteLibraryServer.java
diff --git
a/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java
b/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java
index 0319439c05f012b630bbd422f900232f25a3caa7..dc9688c4de69c0348a1ee7dbac4665ec581d905a 100644
(file)
--- a/
src/be/nikiroo/fanfix/library/RemoteLibraryServer.java
+++ b/
src/be/nikiroo/fanfix/library/RemoteLibraryServer.java
@@
-2,7
+2,6
@@
package be.nikiroo.fanfix.library;
import java.io.IOException;
import java.net.URL;
import java.io.IOException;
import java.net.URL;
-import java.rmi.AccessException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
@@
-149,7
+148,7
@@
public class RemoteLibraryServer extends ServerObject {
try {
rep = doRequest(action, command, args, rw, whitelist);
} catch (IOException e) {
try {
rep = doRequest(action, command, args, rw, whitelist);
} catch (IOException e) {
- rep = new RemoteLibraryException(e);
+ rep = new RemoteLibraryException(e
, true
);
}
commands.put(id, command);
}
commands.put(id, command);
@@
-266,8
+265,8
@@
public class RemoteLibraryServer extends ServerObject {
}
} else if ("SAVE_STORY".equals(command)) {
if (!rw) {
}
} else if ("SAVE_STORY".equals(command)) {
if (!rw) {
- throw new
AccessException("Read-Only remote library: "
- + args[0]);
+ throw new
RemoteLibraryException("Read-Only remote library: "
+ + args[0]
, false
);
}
List<Object> list = new ArrayList<Object>();
}
List<Object> list = new ArrayList<Object>();
@@
-285,19
+284,19
@@
public class RemoteLibraryServer extends ServerObject {
return story.getMeta().getLuid();
} else if ("IMPORT".equals(command)) {
if (!rw) {
return story.getMeta().getLuid();
} else if ("IMPORT".equals(command)) {
if (!rw) {
- throw new
AccessException("Read-Only remote library: "
- + args[0]);
+ throw new
RemoteLibraryException("Read-Only remote library: "
+ + args[0]
, false
);
}
Progress pg = createPgForwarder(action);
}
Progress pg = createPgForwarder(action);
-
Story story
= Instance.getLibrary().imprt(
+
MetaData meta
= Instance.getLibrary().imprt(
new URL((String) args[0]), pg);
forcePgDoneSent(pg);
new URL((String) args[0]), pg);
forcePgDoneSent(pg);
- return
story.getMeta()
.getLuid();
+ return
meta
.getLuid();
} else if ("DELETE_STORY".equals(command)) {
if (!rw) {
} else if ("DELETE_STORY".equals(command)) {
if (!rw) {
- throw new
AccessException("Read-Only remote library: "
- + args[0]);
+ throw new
RemoteLibraryException("Read-Only remote library: "
+ + args[0]
, false
);
}
Instance.getLibrary().delete((String) args[0]);
}
Instance.getLibrary().delete((String) args[0]);
@@
-315,8
+314,8
@@
public class RemoteLibraryServer extends ServerObject {
}
} else if ("SET_COVER".equals(command)) {
if (!rw) {
}
} else if ("SET_COVER".equals(command)) {
if (!rw) {
- throw new
AccessException("Read-Only remote library: "
- + args[0] + ", " + args[1]);
+ throw new
RemoteLibraryException("Read-Only remote library: "
+ + args[0] + ", " + args[1]
, false
);
}
if ("SOURCE".equals(args[0])) {
}
if ("SOURCE".equals(args[0])) {
@@
-328,8
+327,8
@@
public class RemoteLibraryServer extends ServerObject {
}
} else if ("CHANGE_STA".equals(command)) {
if (!rw) {
}
} else if ("CHANGE_STA".equals(command)) {
if (!rw) {
- throw new
AccessException("Read-Only remote library: "
- + args[0] + ", " + args[1]);
+ throw new
RemoteLibraryException("Read-Only remote library: "
+ + args[0] + ", " + args[1]
, false
);
}
Progress pg = createPgForwarder(action);
}
Progress pg = createPgForwarder(action);
@@
-338,8
+337,8
@@
public class RemoteLibraryServer extends ServerObject {
forcePgDoneSent(pg);
} else if ("EXIT".equals(command)) {
if (!rw) {
forcePgDoneSent(pg);
} else if ("EXIT".equals(command)) {
if (!rw) {
- throw new
Access
Exception(
- "Read-Only remote library: EXIT");
+ throw new
RemoteLibrary
Exception(
+ "Read-Only remote library: EXIT"
, false
);
}
stop(0, false);
}
stop(0, false);