Package com.volantis.mcs.assets

Examples of com.volantis.mcs.assets.DynamicVisualAsset


        AssetGroup assetGroup = new AssetGroup("Default Group");
        MarinerURL url = new MarinerURL("http://test.com:8080/this=that");

        // Asset construction
        String value = "Dynamic Value";
        DynamicVisualAsset asset = new DynamicVisualAsset();
        asset.setEncoding(DynamicVisualAsset.TV);
        asset.setValue(value);

        String expected = tvPrefix + value;
        doRewriterTest(asset, assetGroup, url, expected);
    }
View Full Code Here


        // If the asset is a DynamicVisualAsset and the encoding is TV then the
        // asset url consists of the device specific tv channel prefix and the
        // value appended if it is set. If the tv channel prefix is not valid in
        // a url then we have problems.
        if (asset.getClass() == DynamicVisualAsset.class) {
            DynamicVisualAsset dynamicVisualAsset = (DynamicVisualAsset) asset;
            if (dynamicVisualAsset.getEncoding() == DynamicVisualAsset.TV) {
                MarinerPageContext marinerPageContext
                        = ContextInternals.getMarinerPageContext(requestContext);
                InternalDevice device = marinerPageContext.getDevice();

                String tvChannelPrefix = device.getTVChannelPrefix();
                String url = tvChannelPrefix;
                String value = dynamicVisualAsset.getValue();
                if (value != null) {
                    url += value;
                }
                return  new MarinerURL(url);
            }
View Full Code Here

            InternalDevice device) {

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

        DynamicVisualAsset asset = new DynamicVisualAsset();

        setAssetIdentity(policy, asset);

        asset.setEncoding(ENCODING.get(metaData.getVideoEncoding()));
        asset.setPixelsX(metaData.getWidth());
        asset.setPixelsY(metaData.getHeight());

        setValue(asset, variant);

        return asset;
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.assets.DynamicVisualAsset

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.