public final class LocaleUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Collection<com.fatwire.assetapi.data.AssetId> |
findTranslation(com.fatwire.mda.DimensionManager dimensionManager,
List<com.fatwire.assetapi.data.AssetId> toFilterList,
Collection<com.fatwire.assetapi.data.AssetId> preferredDimensionIds,
com.fatwire.mda.DimensionSetInstance dimSet)
Deprecated.
Main translation lookup method.
|
static com.fatwire.assetapi.data.AssetId |
findTranslation(COM.FutureTense.Interfaces.ICS ics,
com.fatwire.assetapi.data.AssetId id,
long preferredDimension,
com.fatwire.mda.DimensionSetInstance dimset)
Deprecated.
|
static com.fatwire.assetapi.data.AssetId |
findTranslation(COM.FutureTense.Interfaces.ICS ics,
com.fatwire.assetapi.data.AssetId id,
long preferredDimension,
long dimensionSetId)
Deprecated.
Look up the translation for the asset specified, in the locale specified.
|
static com.fatwire.assetapi.data.AssetId |
findTranslation(COM.FutureTense.Interfaces.ICS ics,
com.fatwire.assetapi.data.AssetId id,
long preferredDimension,
String dimensionSetName)
Deprecated.
Look up the translation for the asset specified, in the locale specified.
|
static com.fatwire.assetapi.data.AssetId |
findTranslation(COM.FutureTense.Interfaces.ICS ics,
com.fatwire.assetapi.data.AssetId id,
String preferredLocaleDimensionIdString,
String site)
Deprecated.
Look up the translation for the asset specified, in the locale specified.
|
static com.fatwire.assetapi.data.AssetId |
findTranslation(COM.FutureTense.Interfaces.ICS ics,
String c,
String cid,
String preferredLocaleDimensionId,
String site)
Deprecated.
Look up the translation for the asset specified, in the locale specified.
|
static com.fatwire.mda.DimensionSetInstance |
getDimensionSet(COM.FutureTense.Interfaces.ICS ics,
long theDimSetId)
Deprecated.
|
static com.fatwire.mda.DimensionSetInstance |
getDimensionSet(COM.FutureTense.Interfaces.ICS ics,
String name)
Deprecated.
|
static long |
locateDimensionSetForSite(COM.FutureTense.Interfaces.ICS ics,
String site)
Deprecated.
Locates a single dimension set in a site.
|
public static com.fatwire.assetapi.data.AssetId findTranslation(COM.FutureTense.Interfaces.ICS ics, String c, String cid, String preferredLocaleDimensionId, String site)
If the desired translation is not available, null will be returned.
If a dimension set for the site has been configured that returns the asset other than the preferred locale, that is considered to be fine and not really the problem of the end user. In other words, a dimension set may dictate that a "backup" language can be returned to the user.
Null, however, is a valid option.
c
- asset type of asset to look upcid
- asset id of asset to look uppreferredLocaleDimensionId
- id of locale desiredsite
- name of siteics
- ics contextpublic static com.fatwire.assetapi.data.AssetId findTranslation(COM.FutureTense.Interfaces.ICS ics, com.fatwire.assetapi.data.AssetId id, String preferredLocaleDimensionIdString, String site)
If the desired translation is not available, null will be returned.
If a dimension set for the site has been configured that returns the asset other than the preferred locale, that is considered to be fine and not really the problem of the end user. In other words, a dimension set may dictate that a "backup" language can be returned to the user.
Null, however, is a valid option.
ics
- contextid
- id of asset to look uppreferredLocaleDimensionIdString
- id of locale desiredsite
- name of sitepublic static com.fatwire.assetapi.data.AssetId findTranslation(COM.FutureTense.Interfaces.ICS ics, com.fatwire.assetapi.data.AssetId id, long preferredDimension, long dimensionSetId)
If the desired translation is not available, null will be returned.
If a dimension set for the site has been configured that returns the asset other than the preferred locale, that is considered to be fine and not really the problem of the end user. In other words, a dimension set may dictate that a "backup" language can be returned to the user.
Null, however, is a valid option.
ics
- Content Server context objectid
- id of asset to look uppreferredDimension
- id of locale desireddimensionSetId
- dimension set to use to find the translationpublic static com.fatwire.assetapi.data.AssetId findTranslation(COM.FutureTense.Interfaces.ICS ics, com.fatwire.assetapi.data.AssetId id, long preferredDimension, String dimensionSetName)
If the desired translation is not available, null will be returned.
If a dimension set has been configured that returns the asset other than the preferred locale, that is considered to be fine and not really the problem of the end user. In other words, a dimension set may dictate that a "backup" language can be returned to the user.
Null, however, is a valid option.
ics
- Content Server context objectid
- id of asset to look uppreferredDimension
- id of locale desireddimensionSetName
- the name of the dimension set to use to find the
translationpublic static com.fatwire.assetapi.data.AssetId findTranslation(COM.FutureTense.Interfaces.ICS ics, com.fatwire.assetapi.data.AssetId id, long preferredDimension, com.fatwire.mda.DimensionSetInstance dimset) throws IllegalStateException
ics
- Content Server context objectid
- asset idpreferredDimension
- id for preferred localedimset
- dimension set instanceIllegalStateException
- exception when illegal state is reachedpublic static Collection<com.fatwire.assetapi.data.AssetId> findTranslation(com.fatwire.mda.DimensionManager dimensionManager, List<com.fatwire.assetapi.data.AssetId> toFilterList, Collection<com.fatwire.assetapi.data.AssetId> preferredDimensionIds, com.fatwire.mda.DimensionSetInstance dimSet)
dimensionManager
- manager class for Dimension lookupstoFilterList
- list of input assets that need to be translated. Often it's just one, but a list is perfectly valid.preferredDimensionIds
- preferred dimensions to be investigated for a result. Priority preference depends on the
configured filterdimSet
- DimensionSet to use for filtering.public static long locateDimensionSetForSite(COM.FutureTense.Interfaces.ICS ics, String site)
ics
- contextsite
- site containing a dimension setpublic static com.fatwire.mda.DimensionSetInstance getDimensionSet(COM.FutureTense.Interfaces.ICS ics, long theDimSetId)
public static com.fatwire.mda.DimensionSetInstance getDimensionSet(COM.FutureTense.Interfaces.ICS ics, String name)
Copyright © 2010–2017. All rights reserved.