Package com.onenetwork.platform.integ
Class TransformerContext
java.lang.Object
com.onenetwork.platform.integ.TransformerContext
- Direct Known Subclasses:
CsvTransformContext
,JsonTransformerContext
public class TransformerContext
extends java.lang.Object
Base context for various transformers (including CSV, JSON, etc)
-
Constructor Summary
Constructors Constructor Description TransformerContext(java.util.List<? extends Field> fields, java.util.Locale locale, PlatformUserContext platformUserContext)
-
Method Summary
Modifier and Type Method Description java.util.List<? extends Field>
getFields()
java.io.File
getInputFile()
Deprecated.UsegetInputFileResource()
to read input file in storage independent fashionSharedStorageServiceResource
getInputFileResource()
When the source is coming from a file, provides a path to that file.java.util.Locale
getLocale()
PlatformUserContext
getPlatformUserContext()
Returns the platform user's contextvoid
setInputFile(java.io.File f)
Deprecated.void
setInputFileResource(SharedStorageServiceResource inputFileResource)
When the source is coming from a file, provides a path to that file.
-
Constructor Details
-
TransformerContext
public TransformerContext(java.util.List<? extends Field> fields, java.util.Locale locale, PlatformUserContext platformUserContext)
-
-
Method Details
-
getLocale
public java.util.Locale getLocale()- Returns:
- the user locale
-
getFields
- Returns:
- a list of fields which are governing the transform - for example, in a CSV transform, this will contain the list of all format fields + derived fields
-
getPlatformUserContext
Returns the platform user's context- Returns:
-
getInputFile
@Deprecated public java.io.File getInputFile()Deprecated.UsegetInputFileResource()
to read input file in storage independent fashionWhen the source is coming from a file, provides a path to that file. May not always be available as some inputs are not file-based. -
setInputFile
@Deprecated public void setInputFile(java.io.File f)Deprecated.When the source is coming from a file, provides a path to that file. May not always be available as some inputs are not file-based. -
getInputFileResource
When the source is coming from a file, provides a path to that file. May not always be available as some inputs are not file-based. -
setInputFileResource
When the source is coming from a file, provides a path to that file. May not always be available as some inputs are not file-based.
-