Package com.volantis.mcs.policies.variants.script

Examples of com.volantis.mcs.policies.variants.script.ScriptMetaData


    public RepositoryObject createOldObject(
            ActivatedVariablePolicy policy, Variant variant,
            InternalDevice device) {

        // Convert the variant into an asset.
        ScriptMetaData metaData = (ScriptMetaData) variant.getMetaData();

        ScriptAsset asset = new ScriptAsset();

        setAssetIdentity(policy, asset);

        final ScriptEncoding scriptEncoding = metaData.getScriptEncoding();
        if (scriptEncoding != null) {
            asset.setProgrammingLanguage((String) ENCODING.get(scriptEncoding));
            // use the first mime type if there is any
            final Iterator iter = scriptEncoding.mimeTypes();
            if (iter.hasNext()) {
                asset.setMimeType((String) iter.next());
            }
        }
        asset.setCharacterSet(metaData.getCharacterSet());

        setValue(asset, variant);

        return asset;
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.policies.variants.script.ScriptMetaData

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.