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
allow server stop on all protocols
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
library
/
WebLibraryUrls.java
diff --git
a/src/be/nikiroo/fanfix/library/WebLibraryUrls.java
b/src/be/nikiroo/fanfix/library/WebLibraryUrls.java
index 41f1c82feb17c2312ddc3868f5fd9176f3886c59..c02fc382341481ed9c8a95a74a16faf13544648b 100644
(file)
--- a/
src/be/nikiroo/fanfix/library/WebLibraryUrls.java
+++ b/
src/be/nikiroo/fanfix/library/WebLibraryUrls.java
@@
-7,6
+7,8
@@
class WebLibraryUrls {
static public final String LOGOUT_URL = "/logout";
static public final String LOGOUT_URL = "/logout";
+ static public final String EXIT_URL = "/exit";
+
static private final String VIEWER_URL_BASE = "/view/story/";
static private final String VIEWER_URL = VIEWER_URL_BASE
+ "{luid}/{chap}/{para}";
static private final String VIEWER_URL_BASE = "/view/story/";
static private final String VIEWER_URL = VIEWER_URL_BASE
+ "{luid}/{chap}/{para}";
@@
-38,6
+40,9
@@
class WebLibraryUrls {
static private final String IMPRT_URL_PROGRESS = IMPRT_URL_BASE + "{luid}";
static public final String IMPRT_URL_IMPORT = IMPRT_URL_BASE + "import";
static private final String IMPRT_URL_PROGRESS = IMPRT_URL_BASE + "{luid}";
static public final String IMPRT_URL_IMPORT = IMPRT_URL_BASE + "import";
+ static private final String DELETE_URL_BASE = "/delete/";
+ static private final String DELETE_URL_STORY = DELETE_URL_BASE + "{luid}";
+
// GET/SET ("luid" param -> set cover to the cover of this story -- not ok
// for /cover/story/)
static private final String COVER_URL_BASE = "/cover/";
// GET/SET ("luid" param -> set cover to the cover of this story -- not ok
// for /cover/story/)
static private final String COVER_URL_BASE = "/cover/";
@@
-100,8
+105,9
@@
class WebLibraryUrls {
static public boolean isSupportedUrl(String url) {
return INDEX_URL.equals(url) || VERSION_URL.equals(url)
static public boolean isSupportedUrl(String url) {
return INDEX_URL.equals(url) || VERSION_URL.equals(url)
- || LOGOUT_URL.equals(url) || isViewUrl(url) || isStoryUrl(url)
- || isListUrl(url) || isCoverUrl(url) || isImprtUrl(url);
+ || LOGOUT_URL.equals(url) || EXIT_URL.equals(url)
+ || isViewUrl(url) || isStoryUrl(url) || isListUrl(url)
+ || isCoverUrl(url) || isImprtUrl(url) || isDeleteUrl(url);
}
static public String getCoverUrlStory(String luid) {
}
static public String getCoverUrlStory(String luid) {
@@
-119,6
+125,11
@@
class WebLibraryUrls {
.replace("{author}", author);
}
.replace("{author}", author);
}
+ static public String getDeleteUrlStory(String luid) {
+ return DELETE_URL_STORY //
+ .replace("{luid}", luid);
+ }
+
static public boolean isViewUrl(String url) {
return url != null && url.startsWith(VIEWER_URL_BASE);
}
static public boolean isViewUrl(String url) {
return url != null && url.startsWith(VIEWER_URL_BASE);
}
@@
-138,4
+149,8
@@
class WebLibraryUrls {
static public boolean isImprtUrl(String url) {
return url != null && url.startsWith(IMPRT_URL_BASE);
}
static public boolean isImprtUrl(String url) {
return url != null && url.startsWith(IMPRT_URL_BASE);
}
+
+ static public boolean isDeleteUrl(String url) {
+ return url != null && url.startsWith(DELETE_URL_BASE);
+ }
}
}