Class DataMappingToString
- java.lang.Object
-
- com.priint.pubserver.plugin.PluginControlDefault
-
- com.priint.pubserver.plugins.datamapping.DataMappingToString
-
- All Implemented Interfaces:
com.priint.pubserver.datamapping.DataMappingToStringLocal,com.priint.pubserver.plugin.interfaces.PluginControl
public class DataMappingToString extends com.priint.pubserver.plugin.PluginControlDefault implements com.priint.pubserver.datamapping.DataMappingToStringLocal
-
-
Constructor Summary
Constructors Constructor Description DataMappingToString()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>bestLocalizedTextToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, com.priint.pubserver.plugin.entitydata.Context context, java.lang.String defaultValue)Maps the text of a text list that best matches the context to string.java.util.List<java.lang.String>bucketLabelToString(java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> buckets)maps the label of the first bucket of a bucket list to stringjava.util.List<java.lang.String>bucketPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> buckets, java.lang.String propertyName)Gets an arbitrary property from a bucketjava.util.List<java.lang.String>cordPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.Cord> cords, java.lang.String propertyName)Gets an arbitrary property from a cordjava.util.List<java.lang.String>firstKeyValueByKeyToString(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String key, java.lang.String designator)Returns designated field(s) of first KeyValue with given key in input listjava.util.List<java.lang.String>firstKeyValueToString(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String designator)Returns designated field(s) of first KeyValue in input listjava.util.List<java.lang.String>firstMediaAssetTextToString(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets)Get the first text of the first media assetjava.util.List<java.lang.String>firstMediaAssetToFilePath(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets)java.util.List<java.lang.String>firstMediaAssetToFilePath(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media)Gets the path of the first media object from the first media asset.java.util.List<java.lang.String>firstMediaAssetToFileUrl(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0)java.util.List<java.lang.String>firstMediaAssetToFileUrl(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media)gets the URL of the first media object from the first media assetjava.util.List<java.lang.String>firstPriceToString(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices, java.lang.String designator)maps the first price of a price list to stringjava.util.List<java.lang.String>firstTextOfAncestorBucketsToString(java.lang.String sessionId, java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> descendants, java.lang.String entityModelName, java.lang.String ancestorEntityId, java.lang.String textIdentifier, int level, com.priint.pubserver.plugin.entitydata.Context context, java.lang.String searchStr)goes back n levels in bucket tree and maps the specified text of that ancestor bucket to string.java.util.List<java.lang.String>firstTextToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)maps the first text of a text list to stringjava.util.List<java.lang.String>firstTextToStringOrEmptyString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)maps the first text of a text list to string, at least return empty stringjava.util.List<java.lang.String>keyValuePropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String propertyName)Gets an arbitrary property from a keyValuejava.util.List<java.lang.String>keyValuesToStrings(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues)maps all values of a key value list to a string listjava.util.List<java.lang.String>lastMediaAssetToFilePath(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0)java.util.List<java.lang.String>lastMediaAssetToFilePath(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media)gets the path of the last media object from the last media assetjava.util.List<java.lang.String>lastMediaAssetToFileUrl(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0)java.util.List<java.lang.String>lastMediaAssetToFileUrl(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media)gets the URL of the last media object from the last media assetjava.util.List<java.lang.String>lastTextToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)maps the last text of a text list to stringjava.util.List<java.lang.String>mapKeyValuesByKeyToString(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> inputList, java.lang.String reqRecords, java.lang.String key, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix, java.lang.String designator)Returns designated field(s) of requested KeyValues or all KeyValues to a string, with selected delimiter, prefix and suffixjava.util.List<java.lang.String>mapKeyValuesToString(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> inputList, java.lang.String reqRecords, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix, java.lang.String designator)Returns designated field(s) of requested KeyValues or all KeyValues with given key to a string, with selected delimiter, prefix and suffixjava.util.List<java.lang.String>mediaAssetListToFilePath(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String record, java.lang.String type, java.lang.String media)gets the path of the first media object from the first media assetjava.util.List<java.lang.String>mediaAssetListToFileUrl(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String record, java.lang.String type, java.lang.String media)gets the URL of the first media object from the first media assetjava.util.List<java.lang.String>mediaAssetPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String propertyName)Gets an arbitrary property from a mediaAssetjava.util.List<java.lang.String>nthPriceToString(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices, java.lang.String designator, int nth)The nth price as string: map the field(s) selected by designator of the nth price to a stringjava.util.List<java.lang.String>planningPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.Planning> plannings, java.lang.String propertyName)Gets an arbitrary property from a planningjava.util.List<java.lang.String>priceListToString(java.util.List<com.priint.pubserver.plugin.entitydata.Price> inputList, java.lang.String reqRecords, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix, java.lang.String designator)Returns list of Price converted into delimited stringjava.util.List<java.lang.String>pricePropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices, java.lang.String propertyName)Gets an arbitrary property from a pricejava.util.List<java.lang.String>tableDataPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.TableData> tableDatas, java.lang.String propertyName)Gets an arbitrary property from a tableDatajava.util.List<java.lang.String>textListToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> inputList, java.lang.String reqRecords, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix)Returns list of Text converted into delimited stringjava.util.List<java.lang.String>textListToStrings(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, java.lang.String range, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix)maps all texts of a text list to a string listjava.util.List<java.lang.String>textPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, java.lang.String propertyName)Gets an arbitrary property from a textjava.util.List<java.lang.String>textsToStrings(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)maps all texts of a text list to a string listjava.util.List<java.lang.String>textToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, int nth)maps the nth text of a text list to stringjava.util.List<java.lang.String>uniqueKeyIdentifiers(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues)java.util.List<java.lang.String>valuesByKeyToStrings(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String key)maps all values associated to the given key to a string list-
Methods inherited from class com.priint.pubserver.plugin.PluginControlDefault
afterCreateConfigurations, afterDeleteConfigurations, afterUpdateConfigurations, createConfiguration, deleteConfigurations, getSession, getSessionId, initInstance, loadServerConfig, ping, readSessionAttribute, updateConfigurations, writeSessionAttribute
-
-
-
-
Method Detail
-
bucketLabelToString
public java.util.List<java.lang.String> bucketLabelToString(java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> buckets) throws com.priint.pubserver.exception.PubServerExceptionmaps the label of the first bucket of a bucket list to string- Specified by:
bucketLabelToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
buckets- list of buckets- Returns:
- label of the first bucket in the buckets list
- Throws:
com.priint.pubserver.exception.PubServerException
-
firstTextToStringOrEmptyString
public java.util.List<java.lang.String> firstTextToStringOrEmptyString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts) throws com.priint.pubserver.exception.PubServerExceptionmaps the first text of a text list to string, at least return empty string- Parameters:
texts- list of texts- Returns:
- text of the first list entry if list empty return empty string
- Throws:
com.priint.pubserver.exception.PubServerException
-
firstTextToString
public java.util.List<java.lang.String> firstTextToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts) throws com.priint.pubserver.exception.PubServerExceptionmaps the first text of a text list to string- Specified by:
firstTextToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
texts- list of texts- Returns:
- text of the first list entry
- Throws:
com.priint.pubserver.exception.PubServerException
-
bestLocalizedTextToString
public java.util.List<java.lang.String> bestLocalizedTextToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, com.priint.pubserver.plugin.entitydata.Context context, java.lang.String defaultValue) throws com.priint.pubserver.exception.PubServerExceptionMaps the text of a text list that best matches the context to string. Returns defaultValue if no matching text found.Intention: content system has text like
[ {lang: "de", cntry:"", value: "Viele Grüße"}, {lang: "de", cntry:"AT", value: "Grüezzi"}, {lang: "de", cntry:"CH", value: "Viele Grüsse"} ]If called for context {language:"deu", country:"DE"} it should return "Viele Grüße" although there is no "de-DE" in the data.In EntityModel set entity context for country to [unused].
Connector will probably return both texts - at least pubhubdb would do.
DataMapping will read all texts and check if the correct one is in, otherwise fall back to the generic version, or in the end to a default value.In example "de-DE" will not be found. But "de" will be returned.
If the first entry was not be there, "de-AT" would be returned because it is the first entry matching at least "de".- Parameters:
texts- list of textscontext- Context as search filter (e.g country and language)defaultValue- default value to be returned if no data found- Returns:
- text value of the best matching list entry or defaultValue as string
- Throws:
com.priint.pubserver.exception.PubServerException
-
textToString
public java.util.List<java.lang.String> textToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, int nth) throws com.priint.pubserver.exception.PubServerExceptionmaps the nth text of a text list to string- Specified by:
textToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
texts- list of textsnth- which list entry to return- Returns:
- text of the nth list entry
- Throws:
com.priint.pubserver.exception.PubServerException
-
lastTextToString
public java.util.List<java.lang.String> lastTextToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts) throws com.priint.pubserver.exception.PubServerExceptionmaps the last text of a text list to string- Specified by:
lastTextToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
texts- list of texts- Returns:
- text of the last list entry
- Throws:
com.priint.pubserver.exception.PubServerException
-
textsToStrings
public java.util.List<java.lang.String> textsToStrings(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts) throws com.priint.pubserver.exception.PubServerExceptionmaps all texts of a text list to a string list- Specified by:
textsToStringsin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
texts- list of texts- Returns:
- string list with all texts
- Throws:
com.priint.pubserver.exception.PubServerException
-
textListToString
public java.util.List<java.lang.String> textListToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> inputList, java.lang.String reqRecords, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix)Returns list of Text converted into delimited string- Parameters:
inputList- list of Text to be convertedreqRecords- requested records from text listdelimiter- string to be used for resultprefix- string to be added before the first elementsuffix- string to be added after the last element- Returns:
- string consisting of prefix, texts with delimiter and suffix as first element of string list
-
textListToStrings
public java.util.List<java.lang.String> textListToStrings(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, java.lang.String range, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix) throws com.priint.pubserver.exception.PubServerExceptionmaps all texts of a text list to a string list- Specified by:
textListToStringsin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
texts- list of textsrange- selects which entries from the text list to concatenatedelimiter- put between the textsprefix- put as prefix for first textsuffix- put as suffix behind last text- Returns:
- string consisting of prefix, texts with delimiter and suffix as first element of string list
- Throws:
com.priint.pubserver.exception.PubServerException
-
firstTextOfAncestorBucketsToString
public java.util.List<java.lang.String> firstTextOfAncestorBucketsToString(java.lang.String sessionId, java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> descendants, java.lang.String entityModelName, java.lang.String ancestorEntityId, java.lang.String textIdentifier, int level, com.priint.pubserver.plugin.entitydata.Context context, java.lang.String searchStr) throws com.priint.pubserver.exception.PubServerExceptiongoes back n levels in bucket tree and maps the specified text of that ancestor bucket to string. If level > 1 all ancestors must have the same entityId.- Specified by:
firstTextOfAncestorBucketsToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
sessionId- SessionId (use tag)descendants- List of buckets, only first entry is usedentityModelName- Name of the Entity Model (use tag)ancestorEntityId- EntityId of the ancestorstextIdentifier- Text entity of bucket to be returnedlevel- Number of steps up in bucket tree (begins with 1)context- Context as search filter (e.g country and language)searchStr- Search string- Returns:
- specified text of ancestor bucket, with specified level up in bucket tree
- Throws:
com.priint.pubserver.exception.PubServerException
-
firstKeyValueToString
public java.util.List<java.lang.String> firstKeyValueToString(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String designator) throws com.priint.pubserver.exception.PubServerExceptionReturns designated field(s) of first KeyValue in input list- Parameters:
keyValues- List of KeyValues to be converteddesignator- String 'ValueWithoutUnit', 'ValueWithUnit', 'Label', 'Symbol', 'Unit' or 'ParentIdentifier'- Returns:
- String list with one or no element
- Throws:
com.priint.pubserver.exception.PubServerException
-
firstKeyValueByKeyToString
public java.util.List<java.lang.String> firstKeyValueByKeyToString(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String key, java.lang.String designator) throws com.priint.pubserver.exception.PubServerExceptionReturns designated field(s) of first KeyValue with given key in input list- Parameters:
keyValues- List of KeyValues to be convertedkey- filter KeyValues by thisdesignator- String 'ValueWithoutUnit', 'ValueWithUnit', 'Label', 'Symbol', 'Unit' or 'ParentIdentifier'- Returns:
- String list with one or no element
- Throws:
com.priint.pubserver.exception.PubServerException
-
mapKeyValuesToString
public java.util.List<java.lang.String> mapKeyValuesToString(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> inputList, java.lang.String reqRecords, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix, java.lang.String designator)Returns designated field(s) of requested KeyValues or all KeyValues with given key to a string, with selected delimiter, prefix and suffix- Parameters:
inputList- List of KeyValues to be convertedreqRecords- list of requested records from the keyValue list, delimited by ',' (comma) can contain- string 'all' whole list will be returned
- positive numbers - returns record of the index decremented by one e.g 1 will return index of 0
- negative numbers - returns element count from the end of the list, e.g -1 will return index of the last element
- 0 (zero) - returns element, the same result as 1
delimiter- string to be added between the elementsprefix- string to be added before the first elementsuffix- string to be added after the last elementdesignator- String 'ValueWithoutUnit', 'ValueWithUnit', 'Label', 'Symbol', 'Unit' or 'ParentIdentifier'- Returns:
- String list with one or no element
-
mapKeyValuesByKeyToString
public java.util.List<java.lang.String> mapKeyValuesByKeyToString(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> inputList, java.lang.String reqRecords, java.lang.String key, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix, java.lang.String designator)Returns designated field(s) of requested KeyValues or all KeyValues to a string, with selected delimiter, prefix and suffix- Parameters:
inputList- List of KeyValues to be convertedreqRecords- list of requested records from the keyValue list, delimited by ',' (comma) can contain- string 'all' whole list will be returned
- positive numbers - returns record of the index decremented by one e.g 1 will return index of 0
- negative numbers - returns element count from the end of the list, e.g -1 will return index of the last element
- 0 (zero) - returns element, the same result as 1
key- filter KeyValues by thisdelimiter- string to be added between the elementsprefix- string to be added before the first elementsuffix- string to be added after the last elementdesignator- String 'ValueWithoutUnit', 'ValueWithUnit', 'Label', 'Symbol', 'Unit' or 'ParentIdentifier'- Returns:
- String list with one or no element
-
keyValuesToStrings
public java.util.List<java.lang.String> keyValuesToStrings(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues) throws com.priint.pubserver.exception.PubServerExceptionmaps all values of a key value list to a string list- Specified by:
keyValuesToStringsin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
keyValues- result set of the query- Returns:
- a string list of the values of all given key values
- Throws:
com.priint.pubserver.exception.PubServerException
-
valuesByKeyToStrings
public java.util.List<java.lang.String> valuesByKeyToStrings(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String key) throws com.priint.pubserver.exception.PubServerExceptionmaps all values associated to the given key to a string list- Specified by:
valuesByKeyToStringsin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
keyValues- result set of the querykey- filter keeping only key values with given key- Returns:
- a string list of the values of the filtered key values
- Throws:
com.priint.pubserver.exception.PubServerException
-
mediaAssetListToFileUrl
public java.util.List<java.lang.String> mediaAssetListToFileUrl(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String record, java.lang.String type, java.lang.String media) throws com.priint.pubserver.exception.PubServerExceptiongets the URL of the first media object from the first media asset- Specified by:
mediaAssetListToFileUrlin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
mediaAssets- the result set of the queryrecord- select which record of the set shall be returnedtype- type of the media object to be returnedmedia- media of the media object to be returned- Returns:
- list of string with one element, the url
- Throws:
com.priint.pubserver.exception.PubServerException
-
firstMediaAssetToFileUrl
public java.util.List<java.lang.String> firstMediaAssetToFileUrl(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media) throws com.priint.pubserver.exception.PubServerExceptiongets the URL of the first media object from the first media asset- Parameters:
mediaAssets- the result set of the querytype- type of the media object to be returnedmedia- media of the media object to be returned- Returns:
- list of string, the first element is the url
- Throws:
com.priint.pubserver.exception.PubServerException
-
lastMediaAssetToFileUrl
public java.util.List<java.lang.String> lastMediaAssetToFileUrl(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media) throws com.priint.pubserver.exception.PubServerExceptiongets the URL of the last media object from the last media asset- Parameters:
mediaAssets- the result set of the querytype- type of the media object to be returnedmedia- media of the media object to be returned- Returns:
- list of string, the first element is the URL
- Throws:
com.priint.pubserver.exception.PubServerException
-
mediaAssetListToFilePath
public java.util.List<java.lang.String> mediaAssetListToFilePath(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String record, java.lang.String type, java.lang.String media) throws com.priint.pubserver.exception.PubServerExceptiongets the path of the first media object from the first media asset- Specified by:
mediaAssetListToFilePathin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
mediaAssets- the result set of the queryrecord- select which record of the media asset list shall be returnedtype- type of the media object to be returnedmedia- media of the media object to be returned- Returns:
- list of string with one element, the path
- Throws:
com.priint.pubserver.exception.PubServerException
-
firstMediaAssetToFilePath
public java.util.List<java.lang.String> firstMediaAssetToFilePath(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media) throws com.priint.pubserver.exception.PubServerExceptionGets the path of the first media object from the first media asset.If no path separator character is found in input path and filename will be concatenated using system default (i.e. backslash on windows)
- Parameters:
mediaAssets- the result set of the querytype- type of the media object to be returnedmedia- media of the media object to be returned- Returns:
- list of string with one element, the path
- Throws:
com.priint.pubserver.exception.PubServerException
-
lastMediaAssetToFilePath
public java.util.List<java.lang.String> lastMediaAssetToFilePath(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media) throws com.priint.pubserver.exception.PubServerExceptiongets the path of the last media object from the last media asset- Parameters:
mediaAssets- the result set of the querytype- type of the media object to be returnedmedia- media of the media object to be returned- Returns:
- list of string with one element, the path
- Throws:
com.priint.pubserver.exception.PubServerException
-
firstMediaAssetTextToString
public java.util.List<java.lang.String> firstMediaAssetTextToString(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets)
Get the first text of the first media asset- Parameters:
mediaAssets- the result set of the query- Returns:
- list of string with one element, the text or an empty string, if no text is found
-
firstMediaAssetToFilePath
public java.util.List<java.lang.String> firstMediaAssetToFilePath(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets) throws com.priint.pubserver.exception.PubServerException- Specified by:
firstMediaAssetToFilePathin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Throws:
com.priint.pubserver.exception.PubServerException
-
firstMediaAssetToFileUrl
public java.util.List<java.lang.String> firstMediaAssetToFileUrl(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0) throws com.priint.pubserver.exception.PubServerException- Specified by:
firstMediaAssetToFileUrlin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Throws:
com.priint.pubserver.exception.PubServerException
-
lastMediaAssetToFilePath
public java.util.List<java.lang.String> lastMediaAssetToFilePath(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0) throws com.priint.pubserver.exception.PubServerException- Specified by:
lastMediaAssetToFilePathin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Throws:
com.priint.pubserver.exception.PubServerException
-
lastMediaAssetToFileUrl
public java.util.List<java.lang.String> lastMediaAssetToFileUrl(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0) throws com.priint.pubserver.exception.PubServerException- Specified by:
lastMediaAssetToFileUrlin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Throws:
com.priint.pubserver.exception.PubServerException
-
firstPriceToString
public java.util.List<java.lang.String> firstPriceToString(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices, java.lang.String designator) throws com.priint.pubserver.exception.PubServerExceptionmaps the first price of a price list to string- Parameters:
prices- list of pricesdesignator- Either Price (default), PriceAndCurrency, Label, Currency, PriceUnit, PackagingUnit or QuantityOfPackagingUnit- Returns:
- text of the first list entry
- Throws:
com.priint.pubserver.exception.PubServerException
-
nthPriceToString
public java.util.List<java.lang.String> nthPriceToString(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices, java.lang.String designator, int nth) throws com.priint.pubserver.exception.PubServerExceptionThe nth price as string: map the field(s) selected by designator of the nth price to a string- Specified by:
nthPriceToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
prices- result of the query, <Entity.ResultList>designator- Either Price (default), PriceAndCurrency, Label, Currency, PriceUnit, PackagingUnit or QuantityOfPackagingUnitnth- the nth entry of the price list, should be >0- Returns:
- string list with no (if input list is empty or too short) or one element
- Throws:
com.priint.pubserver.exception.PubServerException
-
priceListToString
public java.util.List<java.lang.String> priceListToString(java.util.List<com.priint.pubserver.plugin.entitydata.Price> inputList, java.lang.String reqRecords, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix, java.lang.String designator)Returns list of Price converted into delimited string- Parameters:
inputList- List of Prices to be convertedreqRecords- string containing a list of requested records from the pricelist delimited by ',' (comma).Can contain
- string 'all' whole list will be returned
- positive numbers - returns record of the index decremented by one e.g 1 will return index of 0
- negative numbers - returns element count from the end of the list, e.g -1 will return index of the last element
- 0 (zero) - returns element, the same result as 1
delimiter- string used for result delimitationprefix- string to be added before the first elementsuffix- string to be added after the last elementdesignator- Price (default), PriceAndCurrency, Label, Currency, PriceUnit, PackagingUnit, QuantityOfPackagingUnit- Returns:
- delimited string of requested records
-
bucketPropertyToString
public java.util.List<java.lang.String> bucketPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> buckets, java.lang.String propertyName) throws com.priint.pubserver.exception.PubServerExceptionGets an arbitrary property from a bucket
- Specified by:
bucketPropertyToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
buckets- result from data querypropertyName- name of the property- Returns:
- list of the requested properties
- Throws:
com.priint.pubserver.exception.PubServerException
-
cordPropertyToString
public java.util.List<java.lang.String> cordPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.Cord> cords, java.lang.String propertyName) throws com.priint.pubserver.exception.PubServerExceptionGets an arbitrary property from a cord
- Specified by:
cordPropertyToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
cords- result from data querypropertyName- name of the property- Returns:
- list of the requested properties
- Throws:
com.priint.pubserver.exception.PubServerException
-
keyValuePropertyToString
public java.util.List<java.lang.String> keyValuePropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String propertyName) throws com.priint.pubserver.exception.PubServerExceptionGets an arbitrary property from a keyValue
- Specified by:
keyValuePropertyToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
keyValues- result from data querypropertyName- name of the property- Returns:
- list of the requested properties
- Throws:
com.priint.pubserver.exception.PubServerException
-
mediaAssetPropertyToString
public java.util.List<java.lang.String> mediaAssetPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String propertyName) throws com.priint.pubserver.exception.PubServerExceptionGets an arbitrary property from a mediaAsset
- Specified by:
mediaAssetPropertyToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
mediaAssets- result from data querypropertyName- name of the property- Returns:
- list of the requested properties
- Throws:
com.priint.pubserver.exception.PubServerException
-
planningPropertyToString
public java.util.List<java.lang.String> planningPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.Planning> plannings, java.lang.String propertyName) throws com.priint.pubserver.exception.PubServerExceptionGets an arbitrary property from a planning
- Specified by:
planningPropertyToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
plannings- result from data querypropertyName- name of the property- Returns:
- list of the requested properties
- Throws:
com.priint.pubserver.exception.PubServerException
-
pricePropertyToString
public java.util.List<java.lang.String> pricePropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices, java.lang.String propertyName) throws com.priint.pubserver.exception.PubServerExceptionGets an arbitrary property from a price
- Specified by:
pricePropertyToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
prices- result from data querypropertyName- name of the property- Returns:
- list of the requested properties
- Throws:
com.priint.pubserver.exception.PubServerException
-
textPropertyToString
public java.util.List<java.lang.String> textPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, java.lang.String propertyName) throws com.priint.pubserver.exception.PubServerExceptionGets an arbitrary property from a text
- Specified by:
textPropertyToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
texts- result from data querypropertyName- name of the property- Returns:
- list of the requested properties
- Throws:
com.priint.pubserver.exception.PubServerException
-
tableDataPropertyToString
public java.util.List<java.lang.String> tableDataPropertyToString(java.util.List<com.priint.pubserver.plugin.entitydata.TableData> tableDatas, java.lang.String propertyName) throws com.priint.pubserver.exception.PubServerExceptionGets an arbitrary property from a tableData
- Specified by:
tableDataPropertyToStringin interfacecom.priint.pubserver.datamapping.DataMappingToStringLocal- Parameters:
tableDatas- result from data querypropertyName- name of the property- Returns:
- list of the requested properties
- Throws:
com.priint.pubserver.exception.PubServerException
-
uniqueKeyIdentifiers
public java.util.List<java.lang.String> uniqueKeyIdentifiers(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues) throws com.priint.pubserver.exception.PubServerException- Throws:
com.priint.pubserver.exception.PubServerException
-
-