git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'subtree'
[nikiroo-utils.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..5ec669fea4d313dda921209a4d693c5f4ee5d16a 100644
(file)
--- a/
src/be/nikiroo/fanfix/library/WebLibraryUrls.java
+++ b/
src/be/nikiroo/fanfix/library/WebLibraryUrls.java
@@
-38,6
+38,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/";
@@
-101,7
+104,8
@@
class WebLibraryUrls {
static public boolean isSupportedUrl(String url) {
return INDEX_URL.equals(url) || VERSION_URL.equals(url)
|| LOGOUT_URL.equals(url) || isViewUrl(url) || isStoryUrl(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);
+ || isListUrl(url) || isCoverUrl(url) || isImprtUrl(url)
+ || isDeleteUrl(url);
}
static public String getCoverUrlStory(String luid) {
}
static public String getCoverUrlStory(String luid) {
@@
-119,6
+123,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
+147,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);
+ }
}
}