Package org.dtk.resources.build.manager

Examples of org.dtk.resources.build.manager.BuildStatusManager


    Response accepted = null;
   
    BuildRequest buildRequest = generateNewBuildRequest(buildDetails);
   
    // Schedule build request with status manager
    BuildStatusManager buildStatusManager = BuildStatusManager.getInstance();
    buildStatusManager.scheduleBuildRequest(buildRequest);
   
    // Access unique identifier for these build parameters
    String buildResultId = buildRequest.getBuildReference();
   
    // Store full URL reference for build status link, allowing client to navigate
View Full Code Here


    @PathParam("ref") String reference) {
    logger.entering(this.getClass().getName(), "retrieveBuildStatus");
   
    HashMap<String, String> buildStatus = new HashMap<String, String>();

    BuildStatusManager buildStateManager = BuildStatusManager.getInstance();
   
    // Retrieve current build state for reference build
    BuildState buildState = buildStateManager.retrieveBuildState(reference);
   
    // Store resulting state in the response
    buildStatus.put("state", buildState.toString());
    buildStatus.put("logs", buildStateManager.getCompleteBuildLog(reference));
    // If build has completed, include resource link, otherwise just include
    // current logs.
    if (buildState == BuildState.COMPLETED) {
      buildStatus.put("result", layersBuildResourcePath(request, reference));
    // Unless build is complete, response contents will likely change so ensure result isn't
View Full Code Here

  @GET
  @Path("{reference}")
  @Produces("application/zip")
  public StreamingOutput retrieveBuildResult(@Context HttpServletResponse response, @PathParam("reference") String reference) {
    logger.entering(this.getClass().getName(), "retrieveBuildResult");
    BuildStatusManager buildStateManager = BuildStatusManager.getInstance();
   
    // 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);
   
    logger.exiting(this.getClass().getName(), "retrieveBuildResult");     
    // Stream file output back to the user
    return FileUtil.streamingFileOutput(buildStateManager.getBuildResultPath(reference), false);
  }
View Full Code Here

    PackageRepository packageRepo = PackageRepository.getInstance();
    packageRepo.setPackageBaseLocation(packagePath);
    packageRepo.setBuildParametersLocation(currentContext.getRealPath(buildParametersConfig));
   
    BuildStatusManager buildStatusManager = BuildStatusManager.getInstance();
    buildStatusManager.setBuildResultCachePath(cachePath);
    buildStatusManager.setBuildModulePath(builderModulePath);
    buildStatusManager.setLoaderModulePath(loaderModulePath);
   
    // Add file handlers to certain class loggers
    initialiseLoggingHandlers();
  }
View Full Code Here

   * the custom build identifier.
   *
   * @return Directory containing build artifacts, archive, profile and files.
   */
  public String getBuildResultDir() {
    BuildStatusManager buildStatusManager = BuildStatusManager.getInstance();
    String buildCacheRepository = buildStatusManager.getBuildResultCachePath();
   
    // Add unique build identifier to the cache path location
    File buildResultDir = new File(buildCacheRepository, buildReference);
   
    return buildResultDir.getAbsolutePath();
View Full Code Here

TOP

Related Classes of org.dtk.resources.build.manager.BuildStatusManager

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.