Package com.google.diffable.exceptions

Examples of com.google.diffable.exceptions.ResourceManagerException


        return false;
      } else {
        return true;
      }
    } else {
      throw new ResourceManagerException(
        provider.error("filemgr.filenotmanaged",
                   resource.getAbsolutePath()));
    }
  }
View Full Code Here


    // artifacts are already setup, this call is a no-op.
    try {
      createResourceArtifacts(resource);
    } catch (Exception exc) {
      printer.print(exc);
      throw new ResourceManagerException(
        provider.error("filemgr.cantcreateresource",
                   resource.getAbsolutePath()));
    }
    // If the resource has changed obtain the new hash of the resources
    // contents and generate diffs between the older versions of the
    // resource and the latest version.
    if (hasResourceChanged(resource)) {
      provider.info(logger, "filemgr.resourcechanged",
                resource.getAbsolutePath());
      try {
        String latestHash = readInAndCopyLatestVersion(resource, false);

        // If the latest hash is not null, then the actual contents of
        // the managed resource have changes, and new diffs must be
        // generated.
        if (latestHash != null) {
          provider.info(logger, "filemgr.gendeltas",
                      resource.getAbsolutePath());
          generateDeltas(resource, latestHash);
          // Update the Diffable context so it can correctly identify
          // the most recent version of this resource.
          diffableCtx.setCurrentVersion(resource, latestHash);
        }
      } catch (Exception exc) {
        printer.print(exc);
        throw new ResourceManagerException(
            provider.error("filemgr.cantloadlatest",
                       resource.getAbsolutePath()));
      }
    }
  }
View Full Code Here

                  resourceStore.getAbsolutePath());
        break;
      }
    }
    if (resourceStore == null) {
      throw new ResourceManagerException(
        provider.error("filemgr.cantcreatestore"));
    } else {
      return this;
    }
  }
View Full Code Here

TOP

Related Classes of com.google.diffable.exceptions.ResourceManagerException

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.