Skip to content

Commit da04e87

Browse files
committed
refactor(CollectionUrl): extract exposeUrlsToView() method.
Addressed to #927 No functional changes.
1 parent 3d03247 commit da04e87

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/main/java/ru/mystamps/web/Url.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,14 @@ public static Map<String, String> asMap(boolean production) {
121121
AccountUrl.exposeUrlsToView(map);
122122
CategoryUrl.exposeUrlsToView(map);
123123
CountryUrl.exposeUrlsToView(map);
124+
CollectionUrl.exposeUrlsToView(map);
124125

125126
map.put("ADD_IMAGE_SERIES_PAGE", ADD_IMAGE_SERIES_PAGE);
126127
map.put("ADD_PARTICIPANT_PAGE", ParticipantUrl.ADD_PARTICIPANT_PAGE);
127128
map.put("ADD_SERIES_ASK_PAGE", ADD_SERIES_ASK_PAGE);
128129
map.put("ADD_SERIES_PAGE", ADD_SERIES_PAGE);
129130
map.put("BOOTSTRAP_LANGUAGE", BOOTSTRAP_LANGUAGE);
130131
map.put("DAILY_STATISTICS", DAILY_STATISTICS);
131-
map.put("ESTIMATION_COLLECTION_PAGE", CollectionUrl.ESTIMATION_COLLECTION_PAGE);
132-
map.put("INFO_COLLECTION_PAGE", CollectionUrl.INFO_COLLECTION_PAGE);
133132
map.put("INFO_SERIES_PAGE", INFO_SERIES_PAGE);
134133
map.put("LIST_IMPORT_REQUESTS_PAGE", LIST_IMPORT_REQUESTS_PAGE);
135134
map.put("IMPORT_SERIES_SALES", IMPORT_SERIES_SALES);

src/main/java/ru/mystamps/web/feature/collection/CollectionUrl.java

+7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
*/
1818
package ru.mystamps.web.feature.collection;
1919

20+
import java.util.Map;
21+
2022
/**
2123
* Collection-related URLs.
2224
*
@@ -36,4 +38,9 @@ public final class CollectionUrl {
3638
private CollectionUrl() {
3739
}
3840

41+
public static void exposeUrlsToView(Map<String, String> urls) {
42+
urls.put("ESTIMATION_COLLECTION_PAGE", ESTIMATION_COLLECTION_PAGE);
43+
urls.put("INFO_COLLECTION_PAGE", INFO_COLLECTION_PAGE);
44+
}
45+
3946
}

0 commit comments

Comments
 (0)