Package org.platformlayer.cas

Examples of org.platformlayer.cas.CasStoreMap


  public Md5Hash getResolved(OpsTarget target) throws OpsException {
    if (resolved == null) {
      if (hash == null) {
        if (specifier != null) {
          CasStoreMap casStores = cas.getCasStoreMap(target);
          resolved = (Md5Hash) casStores.resolve(specifier);
        }
      } else {
        resolved = hash;
      }
    }
View Full Code Here


    target.mkdir(remoteFilePath.getParentFile());

    Md5Hash resolved = getResolved(target);

    CasStoreObject casObject;
    CasStoreMap casStoreMap = cas.getCasStoreMap(target);

    try {
      casObject = casStoreMap.findArtifact(new OpsCasTarget(target), resolved);
    } catch (Exception e) {
      throw new OpsException("Error while resolving artifact:" + getHumanName(), e);
    }

    if (url != null && casObject == null) {
View Full Code Here

  }

  public CasStoreMap getCasStoreMap(OpsTarget target) throws OpsException {
    // TODO: Reintroduce (some) caching?
    // if (this.casStores == null) {
    CasStoreMap casStores = new CasStoreMap();

    FilesystemCasStore filesystemCasStore = new FilesystemCasStore(new CasStoreInfo(false),
        new OpsCasTarget(target));
    casStores.addPrimary(filesystemCasStore);

    // TODO: Don't hard-code
    casStores.addSecondary(buildJenkins("http://192.168.131.14:8080/"));
    // casStores.add(buildJenkins("http://192.168.192.36:8080/"));

    for (ProviderOf<CasStoreProvider> casStoreProvider : providers.listItemsProviding(CasStoreProvider.class)) {
      CasStore casStore = casStoreProvider.get().getCasStore();
      casStores.addSecondary(casStore);

      if (casStore.getOptions().isStaging()) {
        // Use this as a staging store i.e. we can upload files to here instead of to the VM
        casStores.addStagingStore(casStore);
      }
    }

    // this.casStores = casStores;
    // }
View Full Code Here

TOP

Related Classes of org.platformlayer.cas.CasStoreMap

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.