org.alembik.util
Class WURFLUtils

java.lang.Object
  extended by org.alembik.util.WURFLUtils

public final class WURFLUtils
extends java.lang.Object

The class provides utility methods to access certain parameters set by WURFL User-Agent resolver.

Since:
1.0-beta6
See Also:
TranscodingService.getTranscodingProfile(org.openmobilealliance.schema.sti.v1_0.TranscodingJob)

Field Summary
static java.lang.String WURFL_FALLBACK_ID
          The name of the Property, which specifies the WURFL fallback device ID of a matched device.
static java.lang.String WURFL_UA
          The name of the Property, which specifies the WURFL UA string of a matched device.
 
Constructor Summary
WURFLUtils()
           
 
Method Summary
static java.lang.String getFallBackId(TranscodingParams profile)
          Returns the ID of the fallback device set in the given transcoding profile.
static java.lang.String getMatchedUA(TranscodingParams profile)
          Returns the User-Agent string of a matched device set in the given transcoding profile.
static void setFallBackId(TranscodingParams profile, java.lang.String fallbackID)
          Sets the fallback device ID of the matched device.
static void setMatchedUA(TranscodingParams profile, java.lang.String userAgent)
          Sets the User-Agent string of a matched device.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WURFL_FALLBACK_ID

public static final java.lang.String WURFL_FALLBACK_ID
The name of the Property, which specifies the WURFL fallback device ID of a matched device.

See Also:
Constant Field Values

WURFL_UA

public static final java.lang.String WURFL_UA
The name of the Property, which specifies the WURFL UA string of a matched device.

See Also:
Constant Field Values
Constructor Detail

WURFLUtils

public WURFLUtils()
Method Detail

getFallBackId

public static java.lang.String getFallBackId(TranscodingParams profile)
Returns the ID of the fallback device set in the given transcoding profile.

Parameters:
profile - transcoding profile
Returns:
fallback device ID, if set; otherwise null
See Also:
WURFL_FALLBACK_ID, getFallBackId(TranscodingParams)

setFallBackId

public static void setFallBackId(TranscodingParams profile,
                                 java.lang.String fallbackID)
Sets the fallback device ID of the matched device.

Parameters:
profile - transcoding profile
fallbackID - fallback device ID
See Also:
WURFL_FALLBACK_ID, setFallBackId(TranscodingParams, String)

getMatchedUA

public static java.lang.String getMatchedUA(TranscodingParams profile)
Returns the User-Agent string of a matched device set in the given transcoding profile.

Parameters:
profile - transcoding profile
Returns:
UA string, if set; otherwise null
See Also:
WURFL_UA, setMatchedUA(TranscodingParams, String)

setMatchedUA

public static void setMatchedUA(TranscodingParams profile,
                                java.lang.String userAgent)
Sets the User-Agent string of a matched device.

Parameters:
profile - transcoding profile
userAgent - device's UA string
See Also:
WURFL_UA, getMatchedUA(TranscodingParams)