protected void saveProjectConfiguration() { if (Application.get().getUserId().isGuest()) { MessageBox.showAlert( "You are not signed in", "To save the layout, you need to sign in first."); return; } ProjectLayoutConfiguration config = getProject().getProjectLayoutConfiguration(); config.setProjectId(projectId); ProjectConfigurationServiceManager.getInstance() .saveProjectConfiguration( projectId, Application.get().getUserId(), config, new SaveConfigHandler()); }
public void setTarget(OWLEntity target) { currentTarget = target; UserId userId = Application.get().getUserId(); view.setPostNewTopicEnabled(currentTarget != null && !userId.isGuest()); view.setPostNewTopicHandler(new PostNewTopicHandlerImpl(Optional.fromNullable(currentTarget))); reload(); }
public void pollForProjectEvents() { GWT.log("Polling for project events for " + projectId + " from " + nextTag); UserId userId = Application.get().getUserId(); DispatchServiceManager.get() .execute( new GetProjectEventsAction(nextTag, projectId, userId), new AsyncCallback<GetProjectEventsResult>() { @Override public void onFailure(Throwable caught) {} @Override public void onSuccess(GetProjectEventsResult result) { dispatchEvents(result.getEvents()); } }); }
private void getProjectConfiguration() { UIUtil.showLoadProgessBar("Loading Project", "Loading user interface configuration"); ProjectConfigurationServiceManager.getInstance() .getProjectConfiguration( projectId, Application.get().getUserId(), new GetProjectConfigurationHandler()); }