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