Package org.jdesktop.wonderland.web.checksums

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


        // 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();
        }

        // Ask the factory for the asset. If it does not exist, then ask it to
        // create the checksum
        ChecksumList checksumList = checksumFactory.getChecksumList(cad, ChecksumAction.GENERATE);
        if (checksumList == null) {
            logger.warning("Unable to generate checksum for " + contentRoot +
                    " " + assetPath);
            return Response.noContent().build();
        }
View Full Code Here


        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

        // 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

                // 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;
                }

                for (Map.Entry<String, Checksum> e : checksumList.getChecksumMap().entrySet()) {
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.web.checksums.ChecksumFactory

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.