use of org.eclipse.scout.rt.shared.services.common.bookmark.BookmarkData in project scout.rt by eclipse.
the class AbstractBookmarkStorageService method readBookmarks.
protected BookmarkData readBookmarks(Object userId) {
BookmarkData model = new BookmarkData();
// user
BookmarkFolder folder = readUserFolder(userId);
if (folder != null) {
model.setUserBookmarks(folder);
}
// global
if (ACCESS.check(new ReadGlobalBookmarkPermission())) {
folder = readGlobalFolder();
if (folder != null) {
model.setGlobalBookmarks(folder);
}
}
return model;
}
use of org.eclipse.scout.rt.shared.services.common.bookmark.BookmarkData in project scout.rt by eclipse.
the class AbstractBookmarkStorageService method getBookmarkData.
@Override
public BookmarkData getBookmarkData() {
Object userId = getCurrentUserId();
BookmarkData newData = readBookmarks(userId);
if (processSpoolToInbox(newData.getUserBookmarks())) {
writeUserFolder(newData.getUserBookmarks(), userId);
}
return newData;
}
use of org.eclipse.scout.rt.shared.services.common.bookmark.BookmarkData in project scout.rt by eclipse.
the class BookmarkService method getServiceState.
private ServiceState getServiceState() {
IClientSession session = ClientSessionProvider.currentSession();
if (session == null) {
throw new IllegalStateException("null client session in current job context");
}
ServiceState data = (ServiceState) session.getData(SESSION_DATA_KEY);
if (data == null) {
data = new ServiceState();
data.m_model = new BookmarkData();
session.setData(SESSION_DATA_KEY, data);
}
return data;
}
Aggregations