public class RfcUtil extends Util
Modifier and Type | Field and Description |
---|---|
static String |
GenNS_DOCUMENTATION_KEY |
static String |
GenNS_URI |
static String |
RfcNS_BYTE_LENGTH_KEY
Details key for a parameter list entry annotation providing the byte
length of the underlying data field for Non-Unicode layout represented by
the annotated record entry.
|
static String |
RfcNS_BYTE_OFFSET_KEY
Details key for a record entry annotation providing the offset of the
underlying data field in a Non-Unicode layout represented by the
annotated parameter list entry.
|
static String |
RfcNS_CLASS_NAME_OF_FIELD_KEY
Details key for a parameter list entry annotation providing the
fully-qualified Java classname of the annotated parameter list entry.
|
static String |
RfcNS_DECIMALS_KEY
Details key for a parameter list entry annotation providing the number of
decimals in the the underlying data field represented by the annotated
parameter list entry.
|
static String |
RfcNS_DEFAULT_KEY
Details key for a parameter list entry annotation providing the default
value of the annotated parameter list entry.
|
static String |
RfcNS_DESCRIPTION_KEY
Details key for a parameter list entry annotation providing the
description of the underlying JCo data field represented by the annotated
parameter list entry.
|
static String |
RfcNS_FIELD_COUNT_KEY
Details key for a structure annotation providing the number of
fields in the structure.
|
static String |
RfcNS_IS_ABAP_OBJECT_KEY
Details key for a parameter list entry annotation indicating whether the
annotated parameter list entry represents an underlying JCo
ABAP Object . |
static String |
RfcNS_IS_CHANGING_KEY
Details key for a parameter list entry annotation indicating whether the
underlying data field represented by the annotated parameter list entry
is a changing parameter.
|
static String |
RfcNS_IS_EXCEPTION_KEY
Details key for a parameter list entry annotation indicating whether the
underlying data field represented by the annotated parameter list entry
is an exception.
|
static String |
RfcNS_IS_EXPORT_KEY
Details key for a parameter list entry annotation indicating whether the
underlying data field represented by the annotated parameter list entry
is an export parameter.
|
static String |
RfcNS_IS_IMPORT_KEY
Details key for a parameter list entry annotation indicating whether the
underlying data field represented by the annotated parameter list entry
is an import parameter.
|
static String |
RfcNS_IS_NESTED_TYPE1_STRUCTURE_KEY
Details key for a structure annotation indicating whether structure
represents a nested
TYPE1 JCo structure. |
static String |
RfcNS_IS_OPTIONAL_KEY
Details key for a parameter list entry annotation indicating whether the
underlying data field represented by the annotated parameter list entry
is an optional parameter.
|
static String |
RfcNS_IS_STRUCTURE_KEY
Details key for a parameter list entry annotation indicating whether the
annotated parameter list entry is a structure type entry;
i.e.
|
static String |
RfcNS_IS_TABLE_KEY
Details key for a parameter list entry annotation indicating whether the
annotated parameter list entry is a table type entry;
i.e.
|
static String |
RfcNS_LENGTH_KEY
Details key for a parameter list entry annotation providing the max
length of the underlying data field represented by the annotated
parameter list entry.
|
static String |
RfcNS_LINE_TYPE_KEY
Details key for a table annotation providing the line type of
table
|
static String |
RfcNS_NAME_KEY
Details key for a structure annotation providing the name of
the structure.
|
static String |
RfcNS_RECORD_FIELD_NAME_KEY
Details key for a parameter list entry annotation providing the field
name in an underlying JCo structure or table represented by the annotated
parameter list entry.
|
static String |
RfcNS_RECORD_LENGTH_KEY
Details key for a structure annotation providing the record length
of structure.
|
static String |
RfcNS_RECORD_TYPE_NAME_KEY
Details key for a parameter list entry annotation indicating the table,
structure or data element name of the underlying JCo data field
represented by the annotated parameter list entry.
|
static String |
RfcNS_TYPE_AS_STRING_KEY
Details key for a parameter list entry annotation providing the String
representation of the JCo data type of the underlying data field
represented by the annotated parameter list entry.
|
static String |
RfcNS_TYPE_KEY
Details key for a parameter list entry annotation providing the JCo data
type of the underlying data field represented by the annotated parameter
list entry.
|
static String |
RfcNS_UNICODE_BYTE_LENGTH_KEY
Details key for a record entry annotation providing the length of the
underlying data field for Unicode layout represented by the annotated
record entry.
|
static String |
RfcNS_UNICODE_BYTE_OFFSET_KEY
Details key for a record entry annotation providing the offset of the
underlying data field in a Unicode layout represented by the annotated
record entry.
|
static String |
RfcNS_UNICODE_RECORD_LENGTH_KEY
Details key for a structure annotation providing the unicode record length
of structure.
|
static String |
ROW |
Constructor and Description |
---|
RfcUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addListMetaData(org.eclipse.emf.ecore.EClass eClass,
JCoListMetaData jcoListMetaData)
Populate the given
EClass with structural features and
annotations derived from the meta-data of the given
JCoListMetaData . |
static void |
addListMetaDataToRequest(org.eclipse.emf.ecore.EClass structure,
JCoListMetaData importListMetaData,
JCoListMetaData changingListMetaData,
JCoListMetaData tableListMetaData) |
static void |
addListMetaDataToResponse(org.eclipse.emf.ecore.EClass structure,
JCoListMetaData changingListMetaData,
JCoListMetaData tableListMetaData,
JCoListMetaData exportListMetaData) |
static void |
addRecordMetaData(org.eclipse.emf.ecore.EClass eClass,
JCoRecordMetaData jcoRecordMetaData)
Populate the given
EClass with structural features and
annotations derived from the meta-data of the given
JCoRecordMetaData . |
static org.fusesource.camel.component.sap.model.rfc.Structure |
addTableRow(org.fusesource.camel.component.sap.model.rfc.Table<? extends org.fusesource.camel.component.sap.model.rfc.Structure> table)
Adds new row to table.
|
static org.fusesource.camel.component.sap.model.rfc.Structure |
addTableRow(org.fusesource.camel.component.sap.model.rfc.Table<? extends org.fusesource.camel.component.sap.model.rfc.Structure> table,
int index)
Adds new row to table at given
index . |
static String |
checkForKeywordLiterals(String value)
Check for ABAP keyword literal values.
|
static Object |
convertJCoDefaultValue(JCoListMetaData listMetaData,
int index)
Converts the JCo string representation for a default value into its
equivalent Java runtime value.
|
static com.sap.conn.jco.AbapException[] |
createAbapExceptions(List<org.fusesource.camel.component.sap.model.rfc.AbapException> abapExceptions)
Create JCo ABAP Exception list from meta-data in ABAP Exception list.
|
static org.eclipse.emf.ecore.EObject |
createInstance(JCoRepository repository,
String packageName,
String eClassName)
Creates new instance of
EClass with
the name eClassName in the EPackage
packageName described in the
repository . |
static JCoFunctionTemplate |
createJCoFunctionTemplate(String name,
org.fusesource.camel.component.sap.model.rfc.FunctionTemplate functionTemplate)
Creates JCo Function Template named
named from meta-data in
functionTemplate . |
static JCoListMetaData |
createJCoListMetaData(String name,
List<org.fusesource.camel.component.sap.model.rfc.ListFieldMetaData> listDescriptors)
Create JCo List Meta Data named
name from meta-data in
listDescriptors . |
static JCoRecordMetaData |
createJCoRecordMetaData(org.fusesource.camel.component.sap.model.rfc.RecordMetaData recordMetaData)
Create JCo Record Meta Data named
name from meta-data in
listDescriptors . |
static JCoCustomRepository |
createRepository(String repositoryName,
org.fusesource.camel.component.sap.model.rfc.RepositoryData repositoryData)
Creates custom repository named
repositoryName and
populates with repositoryData . |
static org.fusesource.camel.component.sap.model.rfc.Structure |
executeFunction(JCoDestination destination,
String functionName,
org.fusesource.camel.component.sap.model.rfc.Structure request)
Performs SRFC call of named remote function module with
request at
destination . |
static void |
executeFunction(JCoDestination destination,
String functionName,
org.fusesource.camel.component.sap.model.rfc.Structure request,
String tid)
Performs TRFC call of named remote function module with
request at destination . |
static void |
executeFunction(JCoDestination destination,
String functionName,
org.fusesource.camel.component.sap.model.rfc.Structure request,
String tid,
String queueName)
Performs QRFC call of named remote function module with
request at destination . |
static void |
extractJCoParameterListsIntoRequest(JCoFunction jcoFunction,
org.fusesource.camel.component.sap.model.rfc.Structure request)
Extract parameters from
jcoFunction parameter lists to
request . |
static void |
extractJCoParameterListsIntoResponse(JCoFunction jcoFunction,
org.fusesource.camel.component.sap.model.rfc.Structure response)
Extract parameters from
jcoFunction parameter lists to
response . |
static void |
extractJCoRecordIntoStructure(JCoRecord jrecord,
org.fusesource.camel.component.sap.model.rfc.Structure structure)
Extract parameters from
jrecord to structure . |
static void |
extractJCoTableIntoTable(JCoTable jcoTable,
org.fusesource.camel.component.sap.model.rfc.Table<? extends org.fusesource.camel.component.sap.model.rfc.Structure> table)
Extract rows from
table from jcoTable . |
static void |
fillJCoParameterListsFromRequest(org.fusesource.camel.component.sap.model.rfc.Structure request,
JCoFunction jcoFunction)
Fill
jcoFunction parameter lists with parameters from
request . |
static void |
fillJCoParameterListsFromResponse(org.fusesource.camel.component.sap.model.rfc.Structure response,
JCoFunction jcoFunction)
Fill
jcoFunction parameter lists with parameters from
response . |
static void |
fillJCoRecordFromStructure(org.fusesource.camel.component.sap.model.rfc.Structure structure,
JCoRecord jcoRecord)
Fill parameters from
jrecord from structure . |
static void |
fillJCoTableFromTable(org.fusesource.camel.component.sap.model.rfc.Table<? extends org.fusesource.camel.component.sap.model.rfc.Structure> table,
JCoTable jcoTable)
Fill
jcoTable with rows from table . |
static org.fusesource.camel.component.sap.model.rfc.Destination |
getDestination(String destinationName)
Returns
Destination designated by destinationName . |
static org.eclipse.emf.ecore.EClassifier |
getEDataType(int jcoDataType)
Return the
EClassifier corresponding to the given JCo data type. |
static org.eclipse.emf.ecore.EPackage |
getEPackage(JCoRepository repository,
String nsURI)
Returns (and creates if necessary) the
EPackage instance
containing the definition of the input and output Structure s
passed to the JcoFunction designated by nsURi and
described in the given repository . |
static org.fusesource.camel.component.sap.model.rfc.Request |
getRequest(JCoRepository repository,
String functionModuleName)
Returns a new request structure to pass to remote function module
designated by
functionModuleName defined in
repository . |
static org.fusesource.camel.component.sap.model.rfc.Response |
getResponse(JCoRepository repository,
String functionModuleName)
Returns a new response structure to pass to remote function module
designated by
functionModuleName defined in
repository . |
static List<org.fusesource.camel.component.sap.model.rfc.RFC> |
getRFCs(JCoDestination jcoDestination,
String functionNameFilter,
String groupNameFilter)
Returns the filtered list of remote function modules defined in
jcoDestination . |
static org.eclipse.emf.ecore.EClass |
getStructureClass(org.eclipse.emf.ecore.EPackage ePackage,
JCoRecordMetaData jcoRecordMetaData)
Create and return an
EClass in ePackage deriving
from Structure and representing a JCoRecord described by
jcoRecordMetaData . |
static org.eclipse.emf.ecore.EClass |
getTableClass(org.eclipse.emf.ecore.EPackage ePackage,
JCoRecordMetaData jcoRecordMetaData)
Create and return an
EClass in ePackage deriving
from extends Structure> and representing a
JCoTable described by jcoRecordMetaData . |
addAnnotation, addNameSpaceDeclarations, beginTransaction, commitTransaction, convertSapDateStringToDate, convertSAPNamespaceToXMLName, convertSAPNamespaceToXMLPrefix, convertSapTimeStringToDate, convertXMLNameToSAPNamespace, createXMIResource, createXMIResource, createXMIResource, createXMLResource, createXMLResource, createXMLResource, ensureBasePackages, fromInputStream, getAnnotation, getValue, getValue, load, loadRegistry, marshal, marshalXml, print, reattachStaticPackageSuperTypes, rollbackTransaction, save, saveRegistry, serializeOptions, setValue, setValue, toInputStream, toOutputStream, unmarshal, unmarshalXml, unserializeOptions
public static final String ROW
public static final String GenNS_URI
public static final String GenNS_DOCUMENTATION_KEY
public static final String RfcNS_NAME_KEY
public static final String RfcNS_FIELD_COUNT_KEY
public static final String RfcNS_LINE_TYPE_KEY
public static final String RfcNS_RECORD_LENGTH_KEY
public static final String RfcNS_UNICODE_RECORD_LENGTH_KEY
public static final String RfcNS_IS_NESTED_TYPE1_STRUCTURE_KEY
TYPE1
JCo structure. A
TYPE1
JCo structure has a fixed length in memory, but with a
nested structure.
The details value is true
if the structure represents a
TYPE1
structure; false
otherwise.
public static final String RfcNS_DESCRIPTION_KEY
public static final String RfcNS_CLASS_NAME_OF_FIELD_KEY
public static final String RfcNS_RECORD_TYPE_NAME_KEY
null
if the data element
name is unavailable.public static final String RfcNS_TYPE_KEY
public static final String RfcNS_TYPE_AS_STRING_KEY
public static final String RfcNS_UNICODE_BYTE_LENGTH_KEY
public static final String RfcNS_UNICODE_BYTE_OFFSET_KEY
public static final String RfcNS_BYTE_LENGTH_KEY
public static final String RfcNS_BYTE_OFFSET_KEY
public static final String RfcNS_LENGTH_KEY
For character based data element types the length is the char length.
For STRING and XSTRING data element types the length is 0.
For STRUCTURE and TABLE data element types the length is 0.
For numerical based data element types the length is the byte length.
public static final String RfcNS_DECIMALS_KEY
The details value is possibly non-zero only for record entries whose underlying data field has the JCo data type BCD or FLOAT.
public static final String RfcNS_DEFAULT_KEY
public static final String RfcNS_RECORD_FIELD_NAME_KEY
null
otherwise.public static final String RfcNS_IS_ABAP_OBJECT_KEY
ABAP Object
. The details value is true
if the
parameter list entry represents an ABAP Object
;
false
otherwise.public static final String RfcNS_IS_STRUCTURE_KEY
MappedRecord
. The details value is true
if
the parameter list entry is a MappedRecord
; false
otherwise.public static final String RfcNS_IS_TABLE_KEY
IndexedRecord
. The details value is true
if the parameter list entry is a IndexedRecord
;
false
otherwise.public static final String RfcNS_IS_IMPORT_KEY
true
if the underlying data field is an import parameter;
false
otherwise.public static final String RfcNS_IS_EXPORT_KEY
true
if the underlying data field is an export parameter;
false
otherwise.public static final String RfcNS_IS_CHANGING_KEY
true
if the underlying data field is a changing parameter;
false
otherwise.public static final String RfcNS_IS_EXCEPTION_KEY
true
if the underlying data field is an exception; false
otherwise.public static final String RfcNS_IS_OPTIONAL_KEY
true
if the underlying data field is an optional parameter;
false
otherwise.public static org.fusesource.camel.component.sap.model.rfc.Destination getDestination(String destinationName)
Destination
designated by destinationName
.destinationName
- - the name of destination.null
if none exists.public static List<org.fusesource.camel.component.sap.model.rfc.RFC> getRFCs(JCoDestination jcoDestination, String functionNameFilter, String groupNameFilter)
jcoDestination
.jcoDestination
- - the destination containing remote function modules.functionNameFilter
- - the function name filtergroupNameFilter
- - the group name filter.public static org.fusesource.camel.component.sap.model.rfc.Structure executeFunction(JCoDestination destination, String functionName, org.fusesource.camel.component.sap.model.rfc.Structure request) throws JCoException
request
at
destination
.destination
- - the destination containing remote function module.functionName
- - name of remote function module.request
- - the request passed.JCoException
public static void executeFunction(JCoDestination destination, String functionName, org.fusesource.camel.component.sap.model.rfc.Structure request, String tid) throws JCoException
request
at destination
.destination
- - the destination containing remote function module.functionName
- - name of remote function module.request
- - the request passed.tid
- - the transaction ID.JCoException
public static void executeFunction(JCoDestination destination, String functionName, org.fusesource.camel.component.sap.model.rfc.Structure request, String tid, String queueName) throws JCoException
request
at destination
.destination
- - the destination containing remote function module.functionName
- - name of remote function module.request
- - the request passed.tid
- - the transaction ID.queueName
- - the name of queueJCoException
public static void fillJCoParameterListsFromRequest(org.fusesource.camel.component.sap.model.rfc.Structure request, JCoFunction jcoFunction)
jcoFunction
parameter lists with parameters from
request
.request
- - the request containing the values.jcoFunction
- - the function with parameters list to be filled.public static void fillJCoParameterListsFromResponse(org.fusesource.camel.component.sap.model.rfc.Structure response, JCoFunction jcoFunction)
jcoFunction
parameter lists with parameters from
response
.response
- - the response containing the values.jcoFunction
- - the function with parameters list to be filled.public static void extractJCoParameterListsIntoRequest(JCoFunction jcoFunction, org.fusesource.camel.component.sap.model.rfc.Structure request)
jcoFunction
parameter lists to
request
.jcoFunction
- - the function containing the values.request
- - the request to be filled with values.public static void extractJCoParameterListsIntoResponse(JCoFunction jcoFunction, org.fusesource.camel.component.sap.model.rfc.Structure response)
jcoFunction
parameter lists to
response
.jcoFunction
- - the function containing the values.response
- - the response to be filled with values.public static org.fusesource.camel.component.sap.model.rfc.Structure addTableRow(org.fusesource.camel.component.sap.model.rfc.Table<? extends org.fusesource.camel.component.sap.model.rfc.Structure> table)
table
- - the table to be added to.public static org.fusesource.camel.component.sap.model.rfc.Structure addTableRow(org.fusesource.camel.component.sap.model.rfc.Table<? extends org.fusesource.camel.component.sap.model.rfc.Structure> table, int index)
index
.table
- - the table to be added to.index
- - the index in table to add new row.public static void extractJCoRecordIntoStructure(JCoRecord jrecord, org.fusesource.camel.component.sap.model.rfc.Structure structure)
jrecord
to structure
.jrecord
- - the JCo record containing the values.structure
- - the structure to be filled with values.public static void fillJCoRecordFromStructure(org.fusesource.camel.component.sap.model.rfc.Structure structure, JCoRecord jcoRecord)
jrecord
from structure
.structure
- - the stucture containing the values.jcoRecord
- - the JCo record to be filled with values.public static void extractJCoTableIntoTable(JCoTable jcoTable, org.fusesource.camel.component.sap.model.rfc.Table<? extends org.fusesource.camel.component.sap.model.rfc.Structure> table)
table
from jcoTable
.jcoTable
- - the JCo table containing the rows.table
- - the table to be filled with rows.public static void fillJCoTableFromTable(org.fusesource.camel.component.sap.model.rfc.Table<? extends org.fusesource.camel.component.sap.model.rfc.Structure> table, JCoTable jcoTable)
jcoTable
with rows from table
.table
- - the table containing the rows.jcoTable
- - the JCo table to be filled with rows.public static org.fusesource.camel.component.sap.model.rfc.Request getRequest(JCoRepository repository, String functionModuleName)
functionModuleName
defined in
repository
.repository
- - the repository containing meta-data of function module.functionModuleName
- - the name designating the remote function module.public static org.fusesource.camel.component.sap.model.rfc.Response getResponse(JCoRepository repository, String functionModuleName)
functionModuleName
defined in
repository
.repository
- - the repository containing meta-data of function module.functionModuleName
- - the name designating the remote function module.public static org.eclipse.emf.ecore.EObject createInstance(JCoRepository repository, String packageName, String eClassName)
EClass
with
the name eClassName
in the EPackage
packageName
described in the
repository
.repository
- - the JCoRepository
containing function module meta-data.packageName
- - the package name containing classeClassName
- - the name of the class.null
if eClassName
not found.public static org.eclipse.emf.ecore.EPackage getEPackage(JCoRepository repository, String nsURI)
EPackage
instance
containing the definition of the input and output Structure
s
passed to the JcoFunction
designated by nsURi
and
described in the given repository
.repository
- - the JCoRepository
containing the meta data *
describing the designated JCoFunction
.nsURI
- - the URI designating JCoFunction
. The URI format is
of the form:
http://sap.fusesource.org/rfc/{repository-name}/{jco
-function-name}.EPackage
instance.public static void addListMetaDataToRequest(org.eclipse.emf.ecore.EClass structure, JCoListMetaData importListMetaData, JCoListMetaData changingListMetaData, JCoListMetaData tableListMetaData)
public static void addListMetaDataToResponse(org.eclipse.emf.ecore.EClass structure, JCoListMetaData changingListMetaData, JCoListMetaData tableListMetaData, JCoListMetaData exportListMetaData)
public static void addListMetaData(org.eclipse.emf.ecore.EClass eClass, JCoListMetaData jcoListMetaData)
EClass
with structural features and
annotations derived from the meta-data of the given
JCoListMetaData
.eClass
- - the EClass
populated with meta-data.jcoListMetaData
- - the JCoListMetaData
from which the meta-data is
derived.public static org.eclipse.emf.ecore.EClass getStructureClass(org.eclipse.emf.ecore.EPackage ePackage, JCoRecordMetaData jcoRecordMetaData)
EClass
in ePackage
deriving
from Structure
and representing a JCoRecord
described by
jcoRecordMetaData
.ePackage
- - the EPackage
instance containing the EClass
definition.jcoRecordMetaData
- - the JCoRecordMetaData
instance describing an
underlying JCoRecord
instance.EClass
instance created.public static org.eclipse.emf.ecore.EClass getTableClass(org.eclipse.emf.ecore.EPackage ePackage, JCoRecordMetaData jcoRecordMetaData)
EClass
in ePackage
deriving
from extends Structure>
and representing a
JCoTable
described by jcoRecordMetaData
.ePackage
- - the EPackage
instance containing the EClass
definition.jcoRecordMetaData
- - the JCoRecordMetaData
instance describing an
underlying JCoTable
instance.EClass
instance created.public static void addRecordMetaData(org.eclipse.emf.ecore.EClass eClass, JCoRecordMetaData jcoRecordMetaData)
EClass
with structural features and
annotations derived from the meta-data of the given
JCoRecordMetaData
.eClass
- - the EClass
populated with meta-data.jcoRecordMetaData
- - the JCoRecordMetaData
from which the meta-data is
derived.public static org.eclipse.emf.ecore.EClassifier getEDataType(int jcoDataType)
EClassifier
corresponding to the given JCo data type.jcoDataType
- - the JCo data type.EClassifier
corresponding to the given JCo data type.public static JCoCustomRepository createRepository(String repositoryName, org.fusesource.camel.component.sap.model.rfc.RepositoryData repositoryData)
repositoryName
and
populates with repositoryData
.repositoryName
- - the name of the custom repository.repositoryData
- - the data to populate the repository with.public static JCoFunctionTemplate createJCoFunctionTemplate(String name, org.fusesource.camel.component.sap.model.rfc.FunctionTemplate functionTemplate)
named
from meta-data in
functionTemplate
.name
- - the name of new JCo function template.functionTemplate
- - the function template containing meta-data to populate new
function template with.public static JCoListMetaData createJCoListMetaData(String name, List<org.fusesource.camel.component.sap.model.rfc.ListFieldMetaData> listDescriptors)
name
from meta-data in
listDescriptors
.name
- - the name of new JCo list meta data.listDescriptors
- - the list descriptors containing meta-data to populate new
list meta data with.public static JCoRecordMetaData createJCoRecordMetaData(org.fusesource.camel.component.sap.model.rfc.RecordMetaData recordMetaData)
name
from meta-data in
listDescriptors
.recordMetaData
- - the record meta data to populate into new JCo record meta
data.public static com.sap.conn.jco.AbapException[] createAbapExceptions(List<org.fusesource.camel.component.sap.model.rfc.AbapException> abapExceptions)
abapExceptions
- - the list of meta data to populate into JCo ABAP exception
listpublic static String checkForKeywordLiterals(String value)
value
- - the value to checkvalue
is
returned.public static Object convertJCoDefaultValue(JCoListMetaData listMetaData, int index)
listMetaData
- - the meta-data for JCoList.index
- - the index of the field in the list meta-data whose default value is to be converted.Apache Camel