private boolean isApplicationNameValid() {
   if (!OpenshiftValidator.isApplicationNameValid(osAppName)) {
     view.showApplicationNameError(
         locale.invalidApplicationNameError(), locale.invalidApplicationNameDetailError());
     return false;
   }
   if (view.getMode() == CREATE_NEW_PROJECT) {
     for (Pair<String, String> pair : osApplications) {
       if (pair.getFirst().equals(view.getOpenShiftProjectName())
           && pair.getSecond().equals(osAppName)) {
         view.showApplicationNameError(locale.existingApplicationNameError(), null);
         return false;
       }
     }
   } else if (view.getMode() == SELECT_EXISTING_PROJECT
       && view.getOpenShiftSelectedProject() != null) {
     for (Pair<String, String> pair : osApplications) {
       if (pair.getFirst().equals(view.getOpenShiftSelectedProject().getMetadata().getName())
           && pair.getSecond().equals(osAppName)) {
         view.showApplicationNameError(locale.existingApplicationNameError(), null);
         return false;
       }
     }
   }
   view.hideApplicationNameError();
   return true;
 }
  private void reset() {
    osProjects.clear();
    osApplications.clear();
    osImageStreams = null;
    osAppName = null;
    osActiveStreamTag = null;
    projectRemotes = null;

    view.setDeployButtonEnabled(false);
    view.setLabels(Collections.<KeyValue>emptyList());
    view.setEnvironmentVariables(Collections.<KeyValue>emptyList());
    view.setApplicationName(null);
    view.hideApplicationNameError();
    view.hideProjectNameError();
    view.hideLabelsError();
    view.hideVariablesError();
    view.setOpenShiftProjectName(null);
    view.setOpenShiftProjectDisplayName(null);
    view.setOpenShiftProjectDescription(null);
    view.setMode(CREATE_NEW_PROJECT);
    view.setImages(Collections.<String>emptyList());
    view.setProjects(Collections.<Project>emptyList());
  }