}
final Set<Activity> activities = getActivities( place );
if ( activities == null || activities.size() == 0 ) {
final PlaceRequest notFoundPopup = new DefaultPlaceRequest( "workbench.activity.notfound" );
notFoundPopup.addParameter( "requestedPlaceIdentifier", place.getIdentifier() );
if ( activityManager.containsActivity( notFoundPopup ) ) {
return Pair.newPair( null, notFoundPopup );
} else {
final PlaceRequest ufNotFoundPopup = new DefaultPlaceRequest( "uf.workbench.activity.notfound" );
ufNotFoundPopup.addParameter( "requestedPlaceIdentifier", place.getIdentifier() );
return Pair.newPair( null, ufNotFoundPopup );
}
} else if ( activities.size() > 1 ) {
final PlaceRequest multiplePlaces = new DefaultPlaceRequest( "workbench.activities.multiple" ).addParameter( "requestedPlaceIdentifier", null );
return Pair.newPair( null, multiplePlaces );
}
return Pair.newPair( activities.iterator().next(), place );