public class RfcUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GenNS_DOCUMENTATION_KEY |
static java.lang.String |
GenNS_URI |
static java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String |
RfcNS_DEFAULT_KEY
Details key for a parameter list entry annotation providing the default
value of the annotated parameter list entry.
|
static java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String |
RfcNS_IS_NESTED_TYPE1_STRUCTURE_KEY
Details key for a parameter list entry annotation indicating whether the
annotated parameter list entry represents an underlying
TYPE1 JCo structure. |
static java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String |
RfcNS_UNICODE_RECORD_LENGTH_KEY
Details key for a record entry annotation providing the total length of
an underlying JCo structure or single row in an underlying JCo table with
a Unicode layout.
|
static java.lang.String |
ROW |
| Modifier and Type | Method and Description |
|---|---|
static void |
addAnnotation(org.eclipse.emf.ecore.EModelElement modelElement,
java.lang.String source,
java.lang.String key,
java.lang.String value)
Adds detail entry to designated annotation of given model element.
|
static void |
addListMetaData(org.eclipse.emf.ecore.EClass eClass,
com.sap.conn.jco.JCoListMetaData jcoListMetaData)
Populate the given
EClass with structural features and
annotations derived from the meta-data of the given
JCoListMetaData. |
static void |
addRecordMetaData(org.eclipse.emf.ecore.EClass eClass,
com.sap.conn.jco.JCoRecordMetaData jcoRecordMetaData)
Populate the given
EClass with structural features and
annotations derived from the meta-data of the given
JCoRecordMetaData. |
static Structure |
addTableRow(Table<? extends Structure> table) |
static Structure |
addTableRow(Table<? extends Structure> table,
int index) |
static void |
beginTransaction(com.sap.conn.jco.JCoDestination jcoDestination) |
static void |
commitTransaction(com.sap.conn.jco.JCoDestination jcoDestination) |
static com.sap.conn.jco.AbapException[] |
createAbapExceptions(java.util.List<AbapException> abapExceptions) |
static com.sap.conn.jco.JCoFunctionTemplate |
createJCoFunctionTemplate(java.lang.String name,
FunctionTemplate functionTemplate) |
static com.sap.conn.jco.JCoListMetaData |
createJCoListMetaData(java.lang.String name,
java.util.List<ListFieldMetaData> listDescriptors) |
static com.sap.conn.jco.JCoRecordMetaData |
createJCoRecordMetaData(RecordMetaData recordMetaData) |
static com.sap.conn.jco.JCoCustomRepository |
createRepository(java.lang.String repositoryName,
RepositoryData repositoryData) |
static Structure |
executeFunction(com.sap.conn.jco.JCoDestination destination,
java.lang.String functionName,
Structure request) |
static void |
executeFunction(com.sap.conn.jco.JCoDestination destination,
java.lang.String functionName,
Structure request,
java.lang.String tid) |
static void |
executeFunction(com.sap.conn.jco.JCoDestination destination,
java.lang.String functionName,
Structure request,
java.lang.String tid,
java.lang.String queueName) |
static void |
extractJCoParameterListsIntoRequest(com.sap.conn.jco.JCoFunction jcoFunction,
Structure request) |
static void |
extractJCoParameterListsIntoResponse(com.sap.conn.jco.JCoFunction jcoFunction,
Structure response) |
static void |
extractJCoRecordIntoStructure(com.sap.conn.jco.JCoRecord jrecord,
Structure eObject) |
static void |
extractJCoTableIntoTable(com.sap.conn.jco.JCoTable jcoTable,
Table<? extends Structure> table) |
static void |
fillJCoParameterListsFromRequest(Structure request,
com.sap.conn.jco.JCoFunction jcoFunction) |
static void |
fillJCoParameterListsFromResponse(Structure response,
com.sap.conn.jco.JCoFunction jcoFunction) |
static void |
fillJCoRecordFromStructure(Structure eObject,
com.sap.conn.jco.JCoRecord jcoRecord) |
static void |
fillJCoTableFromTable(Table<? extends Structure> table,
com.sap.conn.jco.JCoTable jcoTable) |
static org.eclipse.emf.ecore.EObject |
fromInputStream(java.io.InputStream in) |
static Destination |
getDestination(java.lang.String 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(com.sap.conn.jco.JCoRepository repository,
java.lang.String nsURI)
Returns (and creates if necessary) the
EPackage instance
containing the definition of the input and output Structures
passed to the JcoFunction designated by nsURi and
described in the given repository. |
static org.eclipse.emf.ecore.EObject |
getInstance(com.sap.conn.jco.JCoRepository repository,
java.lang.String functionModuleName,
java.lang.String eClassName)
Returns an
EObject instance defined by the EClass with
the name eClassName in the EPackage associated with
the functionModuleName described in the
repository. |
static Structure |
getRequest(com.sap.conn.jco.JCoRepository repository,
java.lang.String functionModuleName) |
static Structure |
getResponse(com.sap.conn.jco.JCoRepository repository,
java.lang.String functionModuleName) |
static java.util.List<RFC> |
getRFCs(com.sap.conn.jco.JCoDestination jcoDestination,
java.lang.String functionNameFilter,
java.lang.String groupNameFilter) |
static org.eclipse.emf.ecore.EClass |
getStructureClass(org.eclipse.emf.ecore.EPackage ePackage,
com.sap.conn.jco.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,
com.sap.conn.jco.JCoRecordMetaData jcoRecordMetaData)
Create and return an
EClass in ePackage deriving
from extends Structure> and representing a
JCoTable described by jcoRecordMetaData. |
static java.lang.Object |
getValue(org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.ecore.EStructuralFeature feature) |
static java.lang.Object |
getValue(org.eclipse.emf.ecore.EObject object,
java.lang.String featureName) |
static java.lang.String |
marshal(org.eclipse.emf.ecore.EObject eObject)
Marshals the given
EObject into a string. |
static void |
print(org.eclipse.emf.ecore.EObject eObject) |
static void |
rollbackTransaction(com.sap.conn.jco.JCoDestination jcoDestination) |
static boolean |
setValue(org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object value) |
static boolean |
setValue(org.eclipse.emf.ecore.EObject object,
java.lang.String featureName,
java.lang.Object value) |
static java.io.InputStream |
toInputStream(org.eclipse.emf.ecore.EObject eObject) |
static java.io.OutputStream |
toOutputStream(org.eclipse.emf.ecore.EObject eObject) |
static org.eclipse.emf.ecore.EObject |
unmarshal(java.lang.String string)
Unmarshals the given string content into an
EObject instance. |
public static final java.lang.String ROW
public static final java.lang.String GenNS_URI
public static final java.lang.String GenNS_DOCUMENTATION_KEY
public static final java.lang.String RfcNS_DESCRIPTION_KEY
public static final java.lang.String RfcNS_CLASS_NAME_OF_FIELD_KEY
public static final java.lang.String RfcNS_RECORD_TYPE_NAME_KEY
null if the data element
name is unavailable.public static final java.lang.String RfcNS_TYPE_KEY
public static final java.lang.String RfcNS_TYPE_AS_STRING_KEY
public static final java.lang.String RfcNS_UNICODE_BYTE_LENGTH_KEY
public static final java.lang.String RfcNS_UNICODE_BYTE_OFFSET_KEY
public static final java.lang.String RfcNS_UNICODE_RECORD_LENGTH_KEY
public static final java.lang.String RfcNS_BYTE_LENGTH_KEY
public static final java.lang.String RfcNS_BYTE_OFFSET_KEY
public static final java.lang.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 java.lang.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 java.lang.String RfcNS_DEFAULT_KEY
public static final java.lang.String RfcNS_RECORD_FIELD_NAME_KEY
null otherwise.public static final java.lang.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 java.lang.String RfcNS_IS_NESTED_TYPE1_STRUCTURE_KEY
TYPE1 JCo structure. The details value is true
if the parameter list entry represents a TYPE1 structure;
false otherwise.public static final java.lang.String RfcNS_IS_STRUCTURE_KEY
MappedRecord. The details value is true if
the parameter list entry is a MappedRecord; false
otherwise.public static final java.lang.String RfcNS_IS_TABLE_KEY
IndexedRecord. The details value is true
if the parameter list entry is a IndexedRecord;
false otherwise.public static final java.lang.String RfcNS_IS_IMPORT_KEY
true if the underlying data field is an import parameter;
false otherwise.public static final java.lang.String RfcNS_IS_EXPORT_KEY
true if the underlying data field is an export parameter;
false otherwise.public static final java.lang.String RfcNS_IS_CHANGING_KEY
true if the underlying data field is a changing parameter;
false otherwise.public static final java.lang.String RfcNS_IS_EXCEPTION_KEY
true
if the underlying data field is an exception; false
otherwise.public static final java.lang.String RfcNS_IS_OPTIONAL_KEY
true if the underlying data field is an optional parameter;
false otherwise.public static Destination getDestination(java.lang.String destinationName)
public static java.util.List<RFC> getRFCs(com.sap.conn.jco.JCoDestination jcoDestination, java.lang.String functionNameFilter, java.lang.String groupNameFilter)
public static Structure executeFunction(com.sap.conn.jco.JCoDestination destination, java.lang.String functionName, Structure request) throws com.sap.conn.jco.JCoException
com.sap.conn.jco.JCoExceptionpublic static void executeFunction(com.sap.conn.jco.JCoDestination destination,
java.lang.String functionName,
Structure request,
java.lang.String tid)
throws com.sap.conn.jco.JCoException
com.sap.conn.jco.JCoExceptionpublic static void executeFunction(com.sap.conn.jco.JCoDestination destination,
java.lang.String functionName,
Structure request,
java.lang.String tid,
java.lang.String queueName)
throws com.sap.conn.jco.JCoException
com.sap.conn.jco.JCoExceptionpublic static void fillJCoParameterListsFromRequest(Structure request, com.sap.conn.jco.JCoFunction jcoFunction)
public static void fillJCoParameterListsFromResponse(Structure response, com.sap.conn.jco.JCoFunction jcoFunction)
public static void extractJCoParameterListsIntoRequest(com.sap.conn.jco.JCoFunction jcoFunction,
Structure request)
public static void extractJCoParameterListsIntoResponse(com.sap.conn.jco.JCoFunction jcoFunction,
Structure response)
public static void beginTransaction(com.sap.conn.jco.JCoDestination jcoDestination)
public static void commitTransaction(com.sap.conn.jco.JCoDestination jcoDestination)
throws com.sap.conn.jco.JCoException
com.sap.conn.jco.JCoExceptionpublic static void rollbackTransaction(com.sap.conn.jco.JCoDestination jcoDestination)
throws com.sap.conn.jco.JCoException
com.sap.conn.jco.JCoExceptionpublic static java.lang.Object getValue(org.eclipse.emf.ecore.EObject object,
java.lang.String featureName)
public static java.lang.Object getValue(org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.ecore.EStructuralFeature feature)
public static boolean setValue(org.eclipse.emf.ecore.EObject object,
java.lang.String featureName,
java.lang.Object value)
public static boolean setValue(org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object value)
public static void extractJCoRecordIntoStructure(com.sap.conn.jco.JCoRecord jrecord,
Structure eObject)
public static void fillJCoRecordFromStructure(Structure eObject, com.sap.conn.jco.JCoRecord jcoRecord)
public static void extractJCoTableIntoTable(com.sap.conn.jco.JCoTable jcoTable,
Table<? extends Structure> table)
public static void fillJCoTableFromTable(Table<? extends Structure> table, com.sap.conn.jco.JCoTable jcoTable)
public static Structure getRequest(com.sap.conn.jco.JCoRepository repository, java.lang.String functionModuleName)
public static Structure getResponse(com.sap.conn.jco.JCoRepository repository, java.lang.String functionModuleName)
public static org.eclipse.emf.ecore.EObject getInstance(com.sap.conn.jco.JCoRepository repository,
java.lang.String functionModuleName,
java.lang.String eClassName)
EObject instance defined by the EClass with
the name eClassName in the EPackage associated with
the functionModuleName described in the
repository.repository - - the JCoRepository describingfunctionModuleName - eClassName - public static org.eclipse.emf.ecore.EPackage getEPackage(com.sap.conn.jco.JCoRepository repository,
java.lang.String nsURI)
EPackage instance
containing the definition of the input and output Structures
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 addAnnotation(org.eclipse.emf.ecore.EModelElement modelElement,
java.lang.String source,
java.lang.String key,
java.lang.String value)
modelElement - - the model element to be annotated.source - - the source URL of annotation to be added to.key - - the key of the detail entry to be added to annotation.value - - the value of the detail entry to added to annotation.public static void addListMetaData(org.eclipse.emf.ecore.EClass eClass,
com.sap.conn.jco.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,
com.sap.conn.jco.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,
com.sap.conn.jco.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,
com.sap.conn.jco.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 void print(org.eclipse.emf.ecore.EObject eObject)
throws java.io.IOException
java.io.IOExceptionpublic static java.io.OutputStream toOutputStream(org.eclipse.emf.ecore.EObject eObject)
throws java.io.IOException
java.io.IOExceptionpublic static java.io.InputStream toInputStream(org.eclipse.emf.ecore.EObject eObject)
throws java.io.IOException
java.io.IOExceptionpublic static org.eclipse.emf.ecore.EObject fromInputStream(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String marshal(org.eclipse.emf.ecore.EObject eObject)
throws java.io.IOException
EObject into a string.eObject - - the EObject to be marshalled.EObject.java.io.IOExceptionpublic static org.eclipse.emf.ecore.EObject unmarshal(java.lang.String string)
throws java.io.IOException
EObject instance.string - - the string content to unmarshal.EObject instance unmarshalled from the string
content.java.io.IOExceptionpublic static com.sap.conn.jco.JCoCustomRepository createRepository(java.lang.String repositoryName,
RepositoryData repositoryData)
public static com.sap.conn.jco.JCoFunctionTemplate createJCoFunctionTemplate(java.lang.String name,
FunctionTemplate functionTemplate)
public static com.sap.conn.jco.JCoListMetaData createJCoListMetaData(java.lang.String name,
java.util.List<ListFieldMetaData> listDescriptors)
public static com.sap.conn.jco.JCoRecordMetaData createJCoRecordMetaData(RecordMetaData recordMetaData)
public static com.sap.conn.jco.AbapException[] createAbapExceptions(java.util.List<AbapException> abapExceptions)
Copyright © 2014 Red Hat, Inc.. All Rights Reserved.