@PermitAll public class DataFunctionsImpl extends Object implements DataFunctions
Modifier and Type | Field and Description |
---|---|
static String |
UNMAPPED_RECORD_TYPE_ERROR
Error thrown when a record is not mapped.
|
Constructor and Description |
---|
DataFunctionsImpl()
Creates new instance.
|
DataFunctionsImpl(ModelManagementDao modelManagementDao,
CoreTypeFactory coreTypeFactory)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
RecordHolder |
createBinaryHandle(ExecutionContext context,
String fileName,
String description,
String content)
Creates binary handle.
|
RecordHolder |
createBinaryHandle(ExecutionContext context,
String fileName,
String description,
String content,
String mime,
String charset)
Creates binary handle.
|
RecordHolder |
getBinaryHandle(ExecutionContext context,
Decimal id)
Returns a binary handle of the specified identifier.
|
RecordHolder |
resource(ExecutionContext context,
String module,
String path)
Creates a binary handle from a module's resource located at the specified path.
|
Decimal |
size(ExecutionContext ctx,
BinaryHolder binary)
Returns the size of the binary data in bytes.
|
BinaryHolder |
toBinary(ExecutionContext ctx,
String str)
Converts the specified string to binary.
|
String |
toString(ExecutionContext ctx,
BinaryHolder binary,
String charset)
Converts binary to string.
|
public static final String UNMAPPED_RECORD_TYPE_ERROR
public DataFunctionsImpl()
public DataFunctionsImpl(ModelManagementDao modelManagementDao, CoreTypeFactory coreTypeFactory)
modelManagementDao
- coreTypeFactory
- NullPointerException
- if any of the arguments is nullpublic RecordHolder resource(ExecutionContext context, String module, String path) throws ErrorException
DataFunctions
resource
in interface DataFunctions
module
- name of modulepath
- path to binary contentErrorException
public RecordHolder getBinaryHandle(ExecutionContext context, Decimal id) throws ErrorException
DataFunctions
getBinaryHandle
in interface DataFunctions
ErrorException
public RecordHolder createBinaryHandle(ExecutionContext context, String fileName, String description, String content) throws ErrorException
DataFunctions
createBinaryHandle
in interface DataFunctions
ErrorException
public RecordHolder createBinaryHandle(ExecutionContext context, String fileName, String description, String content, String mime, String charset) throws ErrorException
DataFunctions
createBinaryHandle
in interface DataFunctions
ErrorException
public BinaryHolder toBinary(ExecutionContext ctx, String str)
DataFunctions
toBinary
in interface DataFunctions
public String toString(ExecutionContext ctx, BinaryHolder binary, String charset) throws ErrorException
DataFunctions
toString
in interface DataFunctions
ErrorException
public Decimal size(ExecutionContext ctx, BinaryHolder binary) throws ErrorException
DataFunctions
size
in interface DataFunctions
ErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.