public class BookmarkableUrlHelper extends Object
http://url/index.html#FWidgets|$PagedTableScreen[WSimpleDockScreen,],~WiresPropertiesScreen$PagedTableScreen
between the '#' and '|' there is the perspective name between the '|' and '$' there is the CSV list of the screens opened when loading the perspective between the '[' and ']'there is the CSV list of the docked Screens after the '$' there is the CSV list of the screens not belonging to the current perspective
'~' denotes a closed screen
In this unit we have the basic methods used to compose such URLs
Modifier and Type | Field and Description |
---|---|
static String |
CLOSED_DOCK_PREFIX |
static String |
CLOSED_PREFIX |
static String |
DOCK_BEGIN_SEP |
static String |
DOCK_CLOSE_SEP |
static int |
MAX_NAV_URL_SIZE |
static String |
OTHER_SCREEN_SEP |
static String |
PERSPECTIVE_SEP |
static String |
SEPARATOR |
Constructor and Description |
---|
BookmarkableUrlHelper() |
Modifier and Type | Method and Description |
---|---|
static Set<String> |
getClosedScreenFromPlace(org.uberfire.mvp.PlaceRequest place)
Get the opened screens in the given place request
|
static Set<String> |
getDockedScreensFromPlace(org.uberfire.mvp.PlaceRequest place)
Return all the docked screens
|
static Set<String> |
getDockedScreensFromUrl(String url)
Return the docked screens in the URL
|
static Set<String> |
getOpenedScreenFromPlace(org.uberfire.mvp.PlaceRequest place)
Get the opened screens in the given place request
|
static org.uberfire.mvp.PlaceRequest |
getPerspectiveFromPlace(org.uberfire.mvp.PlaceRequest place)
Given a bookmarkable URL this methods returns a PlaceRequest
with the perspective
|
static Set<String> |
getScreensFromPlace(org.uberfire.mvp.PlaceRequest place)
Return all the screens (opened or closed) that is, everything
after the perspective declaration
|
static String |
getUrlToken(String bookmarkableUrl,
String screen)
Given a screen name, this method extracts the corresponding token in the
URL, that is the screen name with optional parameters and markers
|
static boolean |
isPerspectiveInUrl(String url)
Returns true if the perspective is present in the URL
|
static boolean |
isPerspectiveScreen(String bookmarkableUrl,
String screen)
Check whether the screen belongs to the currently opened perspective
|
static boolean |
isScreenClosed(String bookmarkableUrl,
String screen)
Return true if the given screen is already closed.
|
static String |
registerClose(String bookmarkableUrl,
String screenName)
Update the bookmarkable URL, marking a screen or editor closed.
|
static String |
registerClosedDock(String currentBookmarkableURLStatus,
UberfireDock targetDock) |
static String |
registerCloseEditor(String currentBookmarkableURLStatus,
org.uberfire.mvp.PlaceRequest place)
Remove the editor reference from the URL
|
static String |
registerOpenedDock(String currentBookmarkableURLStatus,
UberfireDock targetDock) |
static String |
registerOpenedPerspective(String currentBookmarkableURLStatus,
org.uberfire.mvp.PlaceRequest place) |
static String |
registerOpenedScreen(String bookmarkableUrl,
org.uberfire.mvp.PlaceRequest placeRequest)
Add a screen to the bookmarkable URL.
|
static boolean |
urlContainsExtraPerspectiveScreen(String bookmarkableUrl)
Check if the URL contains screens not belonging to the current perspective
|
public static final String PERSPECTIVE_SEP
public static final String DOCK_BEGIN_SEP
public static final String DOCK_CLOSE_SEP
public static final String SEPARATOR
public static final String OTHER_SCREEN_SEP
public static final String CLOSED_PREFIX
public static final String CLOSED_DOCK_PREFIX
public static final int MAX_NAV_URL_SIZE
public static String registerOpenedScreen(String bookmarkableUrl, org.uberfire.mvp.PlaceRequest placeRequest)
We add the '|' or the '$' when needed
bookmarkableUrl
- placeRequest
- public static String registerClose(String bookmarkableUrl, String screenName)
We remove the '$' when needed
screenName
- public static org.uberfire.mvp.PlaceRequest getPerspectiveFromPlace(org.uberfire.mvp.PlaceRequest place)
place\
- public static boolean isPerspectiveScreen(String bookmarkableUrl, String screen)
screen
- public static boolean isPerspectiveInUrl(String url)
public static boolean urlContainsExtraPerspectiveScreen(String bookmarkableUrl)
public static String getUrlToken(String bookmarkableUrl, String screen)
screen
- public static Set<String> getDockedScreensFromUrl(String url)
url
- public static Set<String> getDockedScreensFromPlace(org.uberfire.mvp.PlaceRequest place)
place
- public static Set<String> getScreensFromPlace(org.uberfire.mvp.PlaceRequest place)
place
- public static Set<String> getClosedScreenFromPlace(org.uberfire.mvp.PlaceRequest place)
place
- public static Set<String> getOpenedScreenFromPlace(org.uberfire.mvp.PlaceRequest place)
place
- public static boolean isScreenClosed(String bookmarkableUrl, String screen)
screen
- public static String registerOpenedPerspective(String currentBookmarkableURLStatus, org.uberfire.mvp.PlaceRequest place)
public static String registerOpenedDock(String currentBookmarkableURLStatus, UberfireDock targetDock)
public static String registerClosedDock(String currentBookmarkableURLStatus, UberfireDock targetDock)
Copyright © 2012–2018 JBoss by Red Hat. All rights reserved.