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
java 1.6 compat
[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 f88b25ae5a3d335938fba59b0c3a24fea6afb8f9..0319439c05f012b630bbd422f900232f25a3caa7 100644
(file)
--- a/
src/be/nikiroo/fanfix/library/RemoteLibraryServer.java
+++ b/
src/be/nikiroo/fanfix/library/RemoteLibraryServer.java
@@
-2,7
+2,7
@@
package be.nikiroo.fanfix.library;
import java.io.IOException;
import java.net.URL;
import java.io.IOException;
import java.net.URL;
-import java.
nio.file.AccessDenied
Exception;
+import java.
rmi.Access
Exception;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
@@
-266,8
+266,8
@@
public class RemoteLibraryServer extends ServerObject {
}
} else if ("SAVE_STORY".equals(command)) {
if (!rw) {
}
} else if ("SAVE_STORY".equals(command)) {
if (!rw) {
- throw new Access
DeniedException("" + args[0], null,
-
"Read-Only remote library"
);
+ throw new Access
Exception("Read-Only remote library: "
+
+ args[0]
);
}
List<Object> list = new ArrayList<Object>();
}
List<Object> list = new ArrayList<Object>();
@@
-285,8
+285,8
@@
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 Access
DeniedException("" + args[0], null,
-
"Read-Only remote library"
);
+ throw new Access
Exception("Read-Only remote library: "
+
+ args[0]
);
}
Progress pg = createPgForwarder(action);
}
Progress pg = createPgForwarder(action);
@@
-296,8
+296,8
@@
public class RemoteLibraryServer extends ServerObject {
return story.getMeta().getLuid();
} else if ("DELETE_STORY".equals(command)) {
if (!rw) {
return story.getMeta().getLuid();
} else if ("DELETE_STORY".equals(command)) {
if (!rw) {
- throw new Access
DeniedException("" + args[0], null,
-
"Read-Only remote library"
);
+ throw new Access
Exception("Read-Only remote library: "
+
+ args[0]
);
}
Instance.getLibrary().delete((String) args[0]);
}
Instance.getLibrary().delete((String) args[0]);
@@
-315,8
+315,8
@@
public class RemoteLibraryServer extends ServerObject {
}
} else if ("SET_COVER".equals(command)) {
if (!rw) {
}
} else if ("SET_COVER".equals(command)) {
if (!rw) {
- throw new Access
DeniedException("" + args[0], "" + args[1],
-
"Read-Only remote library"
);
+ throw new Access
Exception("Read-Only remote library: "
+
+ args[0] + ", " + args[1]
);
}
if ("SOURCE".equals(args[0])) {
}
if ("SOURCE".equals(args[0])) {
@@
-328,8
+328,8
@@
public class RemoteLibraryServer extends ServerObject {
}
} else if ("CHANGE_STA".equals(command)) {
if (!rw) {
}
} else if ("CHANGE_STA".equals(command)) {
if (!rw) {
- throw new Access
DeniedException("" + args[0], "" + args[1],
-
"Read-Only remote library"
);
+ throw new Access
Exception("Read-Only remote library: "
+
+ args[0] + ", " + args[1]
);
}
Progress pg = createPgForwarder(action);
}
Progress pg = createPgForwarder(action);
@@
-338,8
+338,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
DeniedException("EXIT", "",
- "Read-Only remote library
, cannot close it
");
+ throw new Access
Exception(
+ "Read-Only remote library
: EXIT
");
}
stop(0, false);
}
stop(0, false);