Examples of IncorrectParameterException


Examples of org.dtk.resources.exceptions.IncorrectParameterException

      } catch (FileNotFoundException e) {
        logger.log(Level.SEVERE, String.format(errorCreatingPackageLogMsg, e.getMessage()));
        throw new ConfigurationException(fatalProcessingErrorMsg);
      } catch (IOException e) {
        logger.log(Level.SEVERE, String.format(errorCreatingPackageLogMsg, e.getMessage()));
        throw new IncorrectParameterException(invalidRequestErrorMsg);
      } catch (URISyntaxException e) {
        logger.log(Level.SEVERE, String.format(errorCreatingPackageLocationLogMsg, e.getMessage()));
        throw new ConfigurationException(fatalProcessingErrorMsg);
      }
    } else {
      throw new IncorrectParameterException(missingAppParameterErrorMsg);
    }

    logger.exiting(this.getClass().getName(), "createTemporaryPackage")
    return created;
  }
View Full Code Here

Examples of org.dtk.resources.exceptions.IncorrectParameterException

    try {
      buildRequest = new BuildRequest(packages, cdn, optimise, cssOptimise, platforms, themes, layers);
      logger.log(Level.INFO, String.format(newBuildRequestLogMsg, buildRequest.serialise()));
    } catch (JsonMappingException e) {
      logFatalBuildRequest(buildDetails, e);
      throw new IncorrectParameterException(layersParsingErrorText);
    } catch (JsonParseException e) {
      logFatalBuildRequest(buildDetails, e);
      throw new IncorrectParameterException(layersParsingErrorText);
    } catch (IOException e) {
      logFatalBuildRequest(buildDetails, e);
      throw new IncorrectParameterException(layersParsingErrorText);
    } catch (NoSuchAlgorithmException e) {
      throw new ConfigurationException(missingAlgorithmErrorText);
    }
   
    return buildRequest;
View Full Code Here

Examples of org.dtk.resources.exceptions.IncorrectParameterException

      while (it.hasNext()) {
          Map<String, String> entry = it.next();
          String name = extractMandatoryParameter(entry, "name"),
            version = extractMandatoryParameter(entry, "version");
          if (!repo.packageVersionExists(name, version)) {
            throw new IncorrectParameterException(String.format(invalidPackageErrorText, name));   
          } else if (name.equals("dojo")) {
            containsDojoPackage = true;
          }
      }
   
      // Dojo package is mandatory!
    if (!containsDojoPackage) {
      throw new IncorrectParameterException(String.format(invalidPackageErrorText, "dojo"));
    }
   
    return packages;
  }
View Full Code Here

Examples of org.dtk.resources.exceptions.IncorrectParameterException

    while (depIter.hasNext()) {
      Map<String, String> dependency = depIter.next();
      String packageId = dependency.get("package");
      // ... and check it has a valid package reference
      if (packageId == null || !validPackages.contains(packageId)) {
        throw new IncorrectParameterException(String.format(invalidModulePackageErrorText, dependency.get("name")));
      }
    }
  }
View Full Code Here

Examples of org.dtk.resources.exceptions.IncorrectParameterException

   * @param identifier - Parameter identifier
   * @throws IncorrectParameterException - Missing mandatory build parameter
   */
  protected <T> T extractMandatoryParameter(Map<String, T> request, String identifier) {
    if (!request.containsKey(identifier) || request.get(identifier) == null) {
      throw new IncorrectParameterException(String.format(missingParameterErrorText, identifier));
    }
   
    return request.get(identifier);
  }
View Full Code Here

Examples of org.dtk.resources.exceptions.IncorrectParameterException

  public void submitFeedback(HashMap<String, Object> feedbackSubmission) {
    if (feedbackSubmission.containsKey(FEEDBACK_DETAILS)) {     
      addFeedbackFeedEntry(feedbackSubmission);
      logger.log(Level.INFO, constructLogMessage(feedbackSubmission));
    } else {
      throw new IncorrectParameterException(MISSING_FEEDBACK_DETAILS);
    }
  } 
View Full Code Here

Examples of org.dtk.resources.exceptions.IncorrectParameterException

        add("dijit");
      }});         
     
      return remotePage;
    } catch (MalformedURLException e) {
      throw new IncorrectParameterException(incorrectUrlErrorText);
    } catch (IOException e) {
      throw new IncorrectParameterException(incorrectUrlErrorText);
    } catch (IllegalArgumentException e) {
            throw new IncorrectParameterException(incorrectUrlErrorText);
    }   
  }
View Full Code Here

Examples of org.dtk.resources.exceptions.IncorrectParameterException

      logger.log(Level.INFO, String.format(webPageParseLogMsg, webPage.getModules().size(), temporaryPackageId, customModuleNames.size()));
     
    } catch (FatalAnalysisError e) {
      logger.log(Level.SEVERE, String.format(failedWebPageParseLogMsg, e));
      throw new IncorrectParameterException(parsingFailureErrorText);
    } catch (ModuleSourceNotAvailable e) {
      logger.log(Level.SEVERE, String.format(failedWebPageParseLogMsg, e));
      throw new IncorrectParameterException(parsingFailureErrorText);
    } catch (UnknownModuleIdentifier e) {
      logger.log(Level.SEVERE, String.format(failedWebPageParseLogMsg, e));
      throw new IncorrectParameterException(parsingFailureErrorText);
    }
   
       
    moduleAnalysis.put("requiredDojoModules", requiredDojoModules);
   
View Full Code Here

Examples of org.dtk.resources.exceptions.IncorrectParameterException

    try {
      String typeStr = (String) request.getFirst(typeParameter);
      type = InputType.valueOf(typeStr.toUpperCase());
    } catch (NullPointerException npe) {
      throw new IncorrectParameterException(invalidTypeErrorText);
    } catch (IllegalArgumentException iae) {
      throw new IncorrectParameterException(invalidTypeErrorText);
    }
    return type;
  }
View Full Code Here

Examples of org.dtk.resources.exceptions.IncorrectParameterException

  protected String retrieveInputValue(MultivaluedMap<String, Object> request)
  throws IncorrectParameterException {
    String value = (String) request.getFirst(valueParameter);

    if (value == null || value.isEmpty()) {
      throw new IncorrectParameterException(invalidValueErrorText);
    }

    return value;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.