Examples of ChecksumManager


Examples of org.jdesktop.wonderland.web.checksums.ChecksumManager

            @PathParam("assetpath") String assetPath) {

        // Fetch the checksum directly from the manager and return it. If we
        // cannot find the factory to handle the content assets, then return
        // an error (this should never happen).
        ChecksumManager checksumManager = ChecksumManager.getChecksumManager();
        ContentAssetDescriptor cad = new ContentAssetDescriptor(contentRoot, assetPath);
        ChecksumFactory checksumFactory = checksumManager.getChecksumFactory(cad);
        if (checksumFactory == null) {
            logger.warning("Unable to find checksum factory for " + cad);
            return Response.noContent().build();
        }
View Full Code Here

Examples of org.jdesktop.wonderland.web.checksums.ChecksumManager

    public Response getChecksums(@PathParam("modulename") String moduleName,
            @PathParam("modulePart") String modulePart) {

        // Fetch all of the module parts given the module name. This case
        // handles if the module part is null (in which case all module parts)
        ChecksumManager checksumManager = ChecksumManager.getChecksumManager();
        Map<DeployedAsset, File> partMap = AssetDeployer.getFileMap(moduleName, modulePart);

        logger.warning("Fetching checksums for module " + moduleName + " part " +
                modulePart);

        // Create a checksum list from all of the individual module parts and
        // put them into a single map.
        ChecksumList checksumList = new ChecksumList();
        for (DeployedAsset deployedAsset : partMap.keySet()) {
            // Create an proper AssetDeployer using the module name and module
            // part. Add to the master list.
            ModuleAssetDescriptor mad = new ModuleAssetDescriptor(
                    deployedAsset.moduleName, deployedAsset.assetType, null);
            ChecksumFactory factory = checksumManager.getChecksumFactory(mad);
            ChecksumList partList = factory.getChecksumList(mad, ChecksumAction.DO_NOT_GENERATE);
            if (partList != null) {
                logger.info("Adding found part " + deployedAsset.assetType +
                        " with size " + partList.getChecksumMap().size());
                checksumList.putChecksums(partList.getChecksumMap());
View Full Code Here

Examples of org.jdesktop.wonderland.web.checksums.ChecksumManager

        super.deploy(type, module, part);

        // For each module to deploy, we want to generate a checksums file. We
        // need to create a descriptor for the module and part and ask for the
        // checksums to generate it.
        ChecksumManager checksumManager = ChecksumManager.getChecksumManager();
        ModuleAssetDescriptor descriptor = new ModuleAssetDescriptor(module.getName(), type, null);
        ChecksumFactory factory = checksumManager.getChecksumFactory(descriptor);
        factory.getChecksumList(descriptor, ChecksumAction.FORCE_GENERATE);
    }
View Full Code Here

Examples of org.jdesktop.wonderland.web.checksums.ChecksumManager

     * Returns the checksum file for the given module name and module part.
     */
    private File getChecksumFile(String moduleName, String modulePart) {
        // Form the File from the module name and module part beneath the
        // "modules" subdirectory.
        ChecksumManager checksumManager = ChecksumManager.getChecksumManager();
        String checksumDir = "modules" + File.separator + moduleName +
                File.separator + modulePart + File.separator +
                CHECKSUM_FILE;
        return new File(checksumManager.getChecksumDir(), checksumDir);
    }
View Full Code Here

Examples of org.jdesktop.wonderland.web.checksums.ChecksumManager

     * Returns the checksum file for the given content root name and asset path
     */
    private File getChecksumFile(String rootName, String assetPath) {
        // Form the File from the module name and module part beneath the
        // "modules" subdirectory.
        ChecksumManager checksumManager = ChecksumManager.getChecksumManager();
        String checksumFile = "content" + File.separator + rootName +
                File.separator + assetPath + File.separator + "checksum.xml";
        return new File(checksumManager.getChecksumDir(), checksumFile);
    }
View Full Code Here

Examples of org.jdesktop.wonderland.web.checksums.ChecksumManager

                // go through each checksum, and create a checksum
                // to add to the output. If there is no factory to load the
                // checksum for the asset, the go onto the next deployed asset
                // part
                ModuleAssetDescriptor mad = new ModuleAssetDescriptor(moduleName, asset.assetType, null);
                ChecksumManager checksumManager = ChecksumManager.getChecksumManager();
                ChecksumFactory factory = checksumManager.getChecksumFactory(mad);
                ChecksumList checksumList = factory.getChecksumList(mad, ChecksumAction.DO_NOT_GENERATE);
                if (checksumList == null) {
                    continue;
                }
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.