Package org.dtk.resources.exceptions

Examples of org.dtk.resources.exceptions.MissingResourceException


   
    // Retrieve current build state for reference build
    BuildState buildState = buildStateManager.retrieveBuildState(reference);
   
    if (buildState != BuildState.COMPLETED) {
      throw new MissingResourceException(missingBuildResourceErrorText);
    }

    // Set header to force download of content rather than display.
    response.setHeader(HttpUtil.contentDisposition, HttpUtil.contentDispositionAttachment);
   
View Full Code Here


   * @param packageName - Package identifier
   * @return List of all package versions
   */
  public List<String> getPackageVersions(String packageName) {
    if (!packageExists(packageName)) {
      throw new MissingResourceException("Unable to find package with that identifier.");
    }
    return getAllPackageDirectories(packageName);
  }
View Full Code Here

   * @throws IOException - Couldn't access package descriptor
   */
  public HashMap<String, Object> getPackageDetails(String packageName, String packageVersion) {
    // Verify package existence retrieving details
    if (!packageVersionExists(packageName, packageVersion)) {
      throw new MissingResourceException("Unable to find package version details with that identifier.");
    }
   
    HashMap<String, Object> packageMetaData = null;
   
    try {
View Full Code Here

  protected String getTemporaryPackageLocation(String packageReference) {
    String tempDirectory = System.getProperty("java.io.tmpdir");
    File temporaryPackage = new File(tempDirectory, packageReference);
   
    if (!temporaryPackage.exists() || !temporaryPackage.isDirectory()) {
      throw new MissingResourceException("Cannot find temporary package location");
    }
   
    // Return absolute package path
    return temporaryPackage.getAbsolutePath();
  }
View Full Code Here

   * @throws MissingResourceException - Could not find that reference
   */
  protected BuildStatus retrieveBuildStatus(String reference) throws MissingResourceException {
    // Verify that this resource exists
    if (!buildStateLookup.containsKey(reference)) {
      throw new MissingResourceException(missingResourceErrorText);
    }
   
    return buildStateLookup.get(reference);
  }
View Full Code Here

TOP

Related Classes of org.dtk.resources.exceptions.MissingResourceException

Copyright © 2018 www.massapicom. 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.