public PlaceRequest build() { return new PlaceRequest(nameToken, params); } }
request = new PlaceRequest(tok); places.add(new PlaceRequest(token));
private String createApplicationLink(String applicationName) { PlaceRequest request = new PlaceRequest(NameTokens.APPLICATIONS_PRESENTER); if (applicationName != null) { request = request.with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(applicationName)); } return _presenter.getPlaceManager().buildRelativeHistoryToken(request, -1); }
private String createApplicationLink(String applicationName) { PlaceRequest request = new PlaceRequest(NameTokens.APPLICATIONS_PRESENTER); if (applicationName != null) { request = request.with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(applicationName)); } return _presenter.getPlaceManager().buildRelativeHistoryToken(request, -1); }
/** * Notifies the presenter that the user has selected an artifact reference. * The presenter will navigate to the artifacts page. * * @param artifact the selected artifact. */ public void onArtifactSelected(ArtifactReference artifact) { PlaceRequest request = new PlaceRequest(NameTokens.ARTIFACTS_PRESENTER); if (artifact != null) { request = request.with(NameTokens.ARTIFACT_REFERENCE_KEY_PARAM, URL.encode(artifact.key())); } _placeManager.revealRelativePlace(request, -1); }
@Override public void onSelection(SelectionEvent<Integer> event) { if (_modifyingTabs) { // add/remove tab may change the selection return; } if (event.getSelectedItem() < 0) { // TODO: WHAT???? return; } final PlaceRequest current = placeManager.getCurrentPlaceRequest(); final String selectedToken = _tabs.get(event.getSelectedItem()).getTargetHistoryToken(); final String currentToken = current == null ? null : current.getNameToken(); if (!selectedToken.equals(currentToken)) { placeManager.revealPlace(new PlaceRequest(selectedToken)); } } });
/** * Notifies the presenter that the user has selected an application. The * presenter will load the application details and pass them back to the * view to be displayed. * * @param application the selected application. */ public void onApplicationSelected(Application application) { PlaceRequest request = new PlaceRequest(NameTokens.APPLICATIONS_PRESENTER); if (application != null) { request = request.with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(application.getName())); } _placeManager.revealRelativePlace(request, -1); }
/** * Navigates to the application page, displaying the details of the * application. * * @param application the selected application */ public void onApplicationSelected(Application application) { if (application == null) { Console.error(Singleton.MESSAGES.error_navigateToApplication()); return; } _placeManager.revealRelativePlace( new PlaceRequest(NameTokens.APPLICATIONS_PRESENTER).with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(application.getName())), -1); }
/** * Notifies the presenter that the user has selected a reference. The * presenter will load the reference details and pass them back to the view * to be displayed. * * @param reference the selected reference. */ public void onReferenceSelected(Reference reference) { PlaceRequest request = new PlaceRequest(NameTokens.REFERENCES_PRESENTER); if (reference != null && reference.getName() != null) { request = request.with(NameTokens.REFERENCE_NAME_PARAM, URL.encode(reference.getName())); if (reference.getApplication() != null) { request = request.with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(reference.getApplication())); } } _placeManager.revealRelativePlace(request, -1); }
/** * Notifies the presenter that the user wishes to view details about a * specific service. * * @param service the service. * @param application the application containing the service. */ public void onNavigateToService(Service service, Application application) { if (service == null || application == null) { Console.error(Singleton.MESSAGES.error_navigateToService()); return; } _placeManager.revealRelativePlace( new PlaceRequest(NameTokens.SERVICES_PRESENTER).with(NameTokens.SERVICE_NAME_PARAM, URL.encode(service.getName())).with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(application.getName())), -1); }
/** * Notifies the presenter that the user has selected a service. The * presenter will load the service details and pass them back to the view to * be displayed. * * @param service the selected service. */ public void onServiceSelected(Service service) { PlaceRequest request = new PlaceRequest(NameTokens.SERVICES_PRESENTER); if (service != null && service.getName() != null) { request = request.with(NameTokens.SERVICE_NAME_PARAM, URL.encode(service.getName())); if (service.getApplication() != null) { request = request.with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(service.getApplication())); } } _placeManager.revealRelativePlace(request, -1); }
/** * Notifies the presenter that the user wishes to view details about a * specific reference. * * @param reference the reference. * @param application the application containing the reference. */ public void onNavigateToReference(Reference reference, Application application) { if (reference == null || application == null) { Console.error(Singleton.MESSAGES.error_navigateToReference()); return; } _placeManager.revealRelativePlace( new PlaceRequest(NameTokens.REFERENCES_PRESENTER).with(NameTokens.REFERENCE_NAME_PARAM, URL.encode(reference.getName())).with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(application.getName())), -1); }