Anda di halaman 1dari 22

PUBLIC

SAP HANA Cloud Integration for process integration


2015-11-04

Developing Adapters

Content

Developing Adapters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.1

Adapter Development Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3


Constraints for Developing a Camel Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Creating OSGi Bundle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Component Metadata. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Deploying and Editing a Secure Parameter Artifact. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1.2

Programming Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

1.3

Deleting Adapters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Developing Adapters
Content

Developing Adapters

You develop new SAP HCI adapters to extend the connectivity of SAP HANA Cloud Integration with remote
systems.
SAP HANA Cloud Integration (SAP HCI) provides a set of adapters to meet standard connectivity needs. For
example, the SOAP adapter allows you to exchange SOAP messages through SAP HCI, or the SFTP adapter
supports the exchange of files with SFTP servers. These adapters can be configured in integration flow to enable
connectivity between sender and reciever systems. For more details on integration flow and on existing
adapters(channels) refer to .
To extend the connectivity options of SAP HCI, you can develop new adapter tailored along specific requirements.
Once the adapter development process has been finished, you can open the configuration user interface for the
new adapter in the integration flow editor of Integration Designer. To develop new adapters, you use Apache
Camel. You can specify the detailed set of adapter attributes as component metadata. Component metadata
defines the adapter attributes, dependencies between them and the structure of configuration interface for a
specific adapter.
For more information on the public API for adapter development, please refer to JavaDoc at: https://
cp.hana.ondemand.com/dps/d/preview/java9f7e0f1e48ef9cb24533ae257970/1.0/en-US/index.html.

1.1

Adapter Development Process

Prerequisites
You are aware of the technical details of component/domain that you have to connect with SAP HCI through
the newly developed adapter type.
You have Java 7 version.
You are familiar with using Apache Camel and Java.
You have the Camel component and its dependencies as OSGi bundles.

Procedure
1. Install the Adapter SDK for SAP HCI.
For more information, see Installation Instructions
2. Open Eclipse and choose the Integration Designer perspective.
3. Create a new adapter project using the following sub-steps:
1. Select
2. Choose

File

New

Project .

SAP Hana Cloud Integration

Adapter Project in the New Project wizard.

3. Choose Next.

Developing Adapters
Developing Adapters

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

4. Enter details in the New Adapter Project wizard.


5. Choose Finish .

Note
You should not add sender and receiver words in the adapter name.
4. Develop camel component.
5. Add one mandatory camel component .jar file in component folder and the other additional (optional)
dependent .jar files in libs folder.

Note
You must add only those jar files that are valid OSGi bundles. Component jar is a camel based component
bundle. Dependent jars are the osgi bundles that are required by camel component. To create an OSGi
bundle from a normal jar component with extra manifest headers, see Creating OSGi Bundle [page 5].
6. Right click on the new adapter project or the component folder and select Generate Component Metadata to
generate a sample component metadata.

Note
Generate component metadata works only if annotations are marked in the camel bundle.
Annotations:
@UriParam : used to generate the attributes and belongs to org.apache.camel.spi.UriParam
@Required : used to make the field mandatory and belongs to the package org.apache.camel.spi.Required
Example: @UriParam
@Required
private String testField;
7. Adapt the component metadata file according to the requirements of the new adapter type.
For more details refer to documentation of component metadata [page 6].
8. If you want to verify if the adapter project has valid contents such as component metadata in metadata folder
and jar files in the libs and component folder, right click on the project and choose Execute Checks.
9. If you want to build your project locally, right click on the project and choose Build Adapter Project.

Note
Once you build locally, the system creates target.build directory, where you can find a new adapter runtime
archive.
10. To configure the Operations Server to connect your local Eclipse tooling to the tenant, execute the following
sub-steps:
1. Select

Window

Preferences

SAP HANA Cloud Integration

Operations Server .

2. Enter the server URL.


3. Enter your SCN user and password.
11. Deploy the adapter project.
12. Check the status of your deployed project by executing the following sub-steps:

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Developing Adapters
Developing Adapters

1. In Node Explorer, choose worker node.


2. Select the Component Status View tab and check the status of the adapter project.

1.1.1 Constraints for Developing a Camel Component


Consider the following constraints while developing a camel component for an adapter:
For more details on developing a camel component refer to Apache camel guide.

1.1.2 Creating OSGi Bundle


OSGi bundles are normal jar components with extra manifest headers, which you use to develop adapters.

Prerequisites
You have the required jar file.
You have setup the eclipse with plug-in development enabled.

Procedure
1. In Eclipse, go to

File

New

Project .

2. In the New Project wizard, search for Plug-in Development and select Plug-in from Existing JAR Archives.
3. Choose Next.
4. If you have the JAR in the current workspace, then choose Add and select the JAR file from the JAR selection
dialog.
5. If you do not have the JAR in your current workspace, then choose Add External and select the required JAR
file from your local system.
6. Choose Next.
7. In the Plug-in Project Propertiesdialog, specify a name in the Project name field.
8. In the Execution Environment drop down list box, select any java version that is less than or equal to
JavaSE-1.7.
9. In the Target Platform, select an OSGi framework option.
10. Choose Finish.
11. Select the MANIFEST.MF file of your project, and go to Runtime tab.
12. Choose Add.
13. Select the required export packages.

Developing Adapters
Developing Adapters

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

14. Choose OK and save the MANIFEST.MF file.


15. Right Click on the project and choose Export.
16. In the Export wizard search for plug-in Development and choose Deployable plug-ins and fragments.
17. Choose Next.
18. Choose Browse and select the directory where you want the plug-in to be generated.
19. Choose Finish.

Results
In the directory, you can see the plug-ins folder with the OSGi bundle of jar file.

1.1.3 Component Metadata


Component metadata defines the attributes of the sender and receiver adapters that contain multiple tabs. Each
tab can contain multiple attributes. You can group the attributes into multiple attribute groups within the tabs.
You can use the same attribute across the sender and receiver adapters by using attribute reference.

Component Metadata
This set of metadata allows you to define components details.
Table 1: Component Metadata
Property

Datatype

Cardinality Description

ComponentId

xsd:string

Attribute

Specifies a unique Id for the component. The following are technical identifi
ers and should not contain any space or special character.
Example: ctype::Adapter/cname::sap:dropbox/version::

1.0.0
ctype is type of component, which is adapter in this particular example
cname is component name, which is sap:dropbox in this example. Here, sap
is namespace and dropbox is name
version is 1.0.0
ComponentName

xsd:string

Specifies the adapter name.

Adapter Name
Example: dropbox

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Developing Adapters
Developing Adapters

Property

Datatype

Cardinality Description

MetadataVersion

xsd:string

Attribute

This attribute is used to indicate all the version of the metadata. Default
value is 2.0.

Variant

Groups

Child Ele

Different variants for a specific component type - for example: Sender and

ment

Receiver variants of an adapter

Child Ele
ment

Collection of attributes defining metadata, properties at component level are

hci:RuntimeCompo xsd:string
nentBaseUri

usually defined for extensions or elements with no variants


This attribute specifies the name with which the component is identified. If
not added, then the baseUri value is taken from TP.
Example for specifiying attribute in the CMD:

Sample Code
<ComponentMetadata ComponentId="ctype::Adapter/
cname::sap:sampleadapter/version::1.0.0"
ComponentName="sap:sampleadapter"
UIElementType="Adapter"
IsDefaultGenerator="true"
hci:RuntimeComponentBaseUri="dropbox">
Example for generated bean.xml containing camel:from

Sample Code
<camel:from id="MessageFlow_1_1435812482630"
uri="dropbox:foo?path=/input/test.txt&amp;
method=get&amp;sendEmptyMessageWhenIdle=false
&amp;
initialDelay=1000&amp;greedy=false&amp;startS
cheduler=false&amp;timeUnit=MILLISECONDS&amp;
useFixedDelay=false&amp;delay=500&amp;runLogg
ingLevel=TRACE"/>

IsRequestResponse

xsd:string

hci:FirstUriPart

xsd:string

This attribute is used for enabling the component to allow the service call for
Request Reply. Default value is false.
Attribute

Specifies the initial part of the URI. Customer can provide custom values for
the first part of the URI string. Default value is 'foo'.

Note
IsDefaultGenerator="true" is a mandatory attribute and should never be set to false, if you wish to use the
default generator for generating route information.

Note
Metadata Version attribute is generated with default value as 2.0.

Developing Adapters
Developing Adapters

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Variants
This set of metadata allows you to define variants for a component.
Table 2: Variants
Property

Datatype Cardinal
ity

Description

Id

xsd:string

Provides a unique Id for the component variant.


Example: ctype::AdapterVariant/cname::sap:dropbox/

tp::dropbox/mp::dropbox/direction::Sender
tp stands for transport protocol
mp stands for message protocol
direction refers to Sender or Receiver system
Version in the format of major.minor.micro (where micro stands for changes that
have no impact on the component, minor stands for all compatible changes and
major for incompatible changes for older CMD's default value of 1.0.0 will be de
fined.)
Name

xsd:string

Specifies the variant name.


Examples:

<Adapter Name> Sender


<Adapter Name> Receiver
Input Content
Tag used <Input
Content>

Child Ele
ment

Input content specifies the type of data the adapter processes.


Table 3:
Properties

Attributes/Child Ele

Description

ments
ContentType

Child Element

Actual content type


Supported content
types: Xml, String, Boo
lean, Base64Encoder,
Any, Json, Binary, Zip
and Text.

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Developing Adapters
Developing Adapters

Property

Datatype Cardinal
ity

Description

Output Content

Child Ele

Output content specifies the type of data the adapter produces. Example: XML.

ment

Table 4:
Properties

Attributes/Child Ele

Description

ments
ContentType

Child Element

Actual content type


Supported content
types: Xml, String, Boo
lean, Base64Encoder,
Any, Json, Binary, Zip
and Text.

Output Content is based on specific attribute value, so additional sub-elements


can be defined for the same. E.g.If encoding is on - output is only encoded stream.
hci:FirstUriPart

xsd:string Attribute

Specifies the initial part of the URI. Customer can provide custom values for the
first part of the URI string. Default value is 'foo'.

IsRequestRes

xsd:string Attribute

This attribute is used for enabling the variant to allow the service call for Request
Reply

xsd:boo

This attribute depicts if the component has the polling behavior. (supportsPol

ponse
supportsPolling

Attribute

lean

ling). It also helps in populating the timer icon at design time when IFlow is deco
rated. Default value is false. It is applicable for sender channel only.

AttachmentBe
havior

xsd:string Attribute

This attribute helps to identify the component behavior towards attachment.

Modify - Create or update an attachment

Preserve - Pass through for the attachments

Drop - Attachment will be lost

If attachment behavior is not specified; system considers that the component lost
the attachment.

Note
If you want to rename a variant id or delete a variant from adapter, first undeploy the adapter with old variants
and then deploy updated adapter.
You can still view the older variants if you do not undeploy the adapter with old variants.

Tabs
This set of metadata allows you to specify tab pages for the adapter configuration user interface.

Developing Adapters
Developing Adapters

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Table 5: Tabs
Property

Datatype

Cardinality

Description

Id

xsd:string

Specifies the tab identifier.

GuiLabels

xsd:string

Specifies a language-specific GUILabel. Sample GUILabel is shown below:

<GuiLabels>
<Label language="EN">Address</Label>
</GuiLabels>
Here, Label language = "EN" represents that the text of guilabel is in english. Ad
dress is the text for the attribute name.
Currently, guilabel supports only English language.

Attribute Group
This set of metadata allows you to group adapter attributes.
Table 6: Attribute Group
Property

Datatype

Name

xsd:string

Id

xsd:string

Cardinality Description

Specifies the attribute group identifier.


Examples:

Dropbox Endpoint
Dropbox Security Settings
AttributeRe
ference

Child Ele
ment

GuiLabels

Specifies ReferenceName, ErrorMessage, Restriction, and Description


Specifies a language-specific GUI label.

Value - Data

Child Ele

type

ment

Datatype for value


xsd:string
xsd:integer
xsd:boolean
xsd:long
xsd:password

The sample attribute group is shown below:


<AttributeGroup id = "Connection Details">
<GuiLabels>
<Label language="EN">Connection Details</Label>
</GuiLabels>
<AttributeReference>
<ReferenceName>address</ReferenceName>
<!-- Restriction tag defines java regular expression for field value -->

10

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Developing Adapters
Developing Adapters

<Restriction>Constraint.isValidRegex([A-Za-z]+[0-9_~\\-\\.]*)
&& Constraint.isAlphaNumeric && Constraint.isStartsWithLetter |
| Constraint.isValidXpath && Constraint.isValidNCName &&
Constraint.isValidURIString
&& Constraint.isValidXMLString+</Restriction>
<!-- This tag defines message to be displayed if field value is invalid -->
<ErrorMessage>Enter a valid address. E.g. /file</ErrorMessage>
<!-- Description tag defines tool tip for field value -->
<description>Relative endpoint address on which..</description>
</AttributeReference>
<AttributeReference>
<ReferenceName>wsdlURL</ReferenceName>
<Restriction>Constraint.isValidRegex(^(https://){1}(.)+)</Restriction>
<ErrorMessage>Enter a valid URL. E.g. /wsdl/abc.wsdl;</ErrorMessage>
<description>URL to the WSDL.</description>
</AttributeReference>
<AttributeReference>
<ReferenceName>cxfOnewayRobust</ReferenceName>
<description>Used for reliable one-way message exchanges.</description>
</AttributeReference>
</AttributeGroup>

Attribute Reference
Table 7: Attribute Reference
Property

Data Type

ReferenceName

xsd:string

Cardinality

Description
Specifies that in the CMD
there is a definition associ
ated with this reference
name.

description

xsd:string

Brief description of the attrib


ute, which is shown as the
tool tip.

Restriction

xsd:string

Details given below in the ta


ble.

ErrorMessage

xsd:string

If the constraint specified in


the restriction tag fails, the
system shows the error mes
sage set in this tag. If this field
is not set, then the system
shows a default error mes
sage at the time of check fail
ure.

Developing Adapters
Developing Adapters

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

11

Table 8: List of Constraints that are supported for Restriction tag


Constraint

Description

isValidRegex

Method will check a value against a passed regex. Returns


true in case value matches regex

isAlphaNumeric

Checks whether the pass value is alphanumeric

isStartsWithLetter

Checks the passed value starts with Letter

isValidURIString

Returns true if it is valid URI String. It can start with http(s),


ftp, file or ldap

isValidXMLString

Returns true if passed string is a valid XML String

isValidNCName

Return true if passed string value is valid NCName

isValidXpath

Returns true if passed string value is valid xpath expression

Attribute Metadata
This set of metadata allows you to define the details of all adapter attributes. This includes, for example, also the
definition of fixed values for input help, and the kind of user interface element used for an adapter attribute (for
example if it is a checkbox or a dropdown list).
The sample attribute metadata should be as shown below:
<AttributeMetadata>
<Name>address</Name>
<Usage>true</Usage>
<Default>/BSN/paymentOrder</Default>
<DataType>xsd:string</DataType>
<isparameterized>true</isparameterized>
<Length>200</Length>
<FixedValues>
<FixedValue>
<Value>Atleast Once</Value>
<GuiLabels>
<Label language="EN">Atleast Once</Label>
</GuiLabels>
</FixedValue>
</FixedValues>
<GuiLabels>
<Label language="EN">Address</Label>
</GuiLabels>
</AttributeMetadata>
Table 9: Attribute Metadata
Property

Datatype

Name

xsd:string

Cardinality

Description
Specifies the parameter id.
Example: address

12

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Developing Adapters
Developing Adapters

Property

Datatype

Cardinality

Description

Usage

xsd:boo
lean

Specifies if the field is mandatory or not. If the value is true then usage of field is
mandatory. If the value is false then usage of field is not mandatory.

Default

xsd:string

Specifies a default value.


Example: /BSN/paymentOrder

Datatype

Specifies the datatype for the value.


Examples:

xsd:string
xsd:integer
xsd:password (used to mark parameters as security relevant)
If you mark a particular field as password, then that field refers to security parame
ter artifact. For more details refer to documentation of deploying and editing a se
cure parameter artifact [page 16].
Length

xsd:inte
ger

Minlength

xsd:inte
ger

Specifies the character length for field values.

Child Ele
ment

GUILabel

Child Ele
ment

Specifies a language-specific GUI label.

Fixed
Value(s)

Child Ele
ment

Specifies a fixed list of allowed values.

FixedValue

Child Ele
ment

Fixed list of allowed values. Multiple FixedValue tags together are called a combo. If
the value has data type as <xsd:choice> then it is treated as Radio Button.

Attribute

Child Ele

Name of the attribute

Name

ment

Attribute

Child Ele

Value

ment

Developing Adapters
Developing Adapters

Value of the attribute

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

13

Property

Datatype

Cardinality

Description

AndCondi

Child Ele

Attribute Reference Property

tion

ment

This is complex constraint that is used when there are two or more complex or basic
constraints that need to be satisfied to achieve certain criteria.
Example of Complex condition

Sample Code
<AndCondition>
<EditCondition>
AttributeName>

<AttributeName>reference1</
<AttributeValue>reference1value</

AttributeValue>
</EditCondition>
<EditCondition>
AttributeName>

<AttributeName>reference2</

<AttributeValue>reference2value</
AttributeValue>
</EditCondition>
</AndCOndition>

As you can see in the above example AndCondition is complex condition that con
tains two or more EditConditions(basic conditions) and for the condition to be satis
fied both of these basic conditions is satisfied.
OrCondition

Child Ele
ment

Attribute Reference Property


This is complex constraint that is used when satisfaction of any one of the nested
complex or basic constraint is required to achieve certain criteria
The structure of OrCondition is similar to And condition, with only change from
<AndCondition> to <OrCondition>.

14

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Developing Adapters
Developing Adapters

Property

Datatype

Cardinality

Description

NotCondi

Child Ele

Attribute Reference Property

tion

ment

This is complex constraint that is mostly used with other complex constraints, this
constraint reverses the result returned by the nested complex or basic condition
Not condition can contain only one edit condition but multiple complex conditions.
These complex conditions can be used with each other.

Sample Code
<AndCondition>
EditCondition>
EditCondition>

EditCondition>

<OrCondition>
<EditCondition></
<EditCondition></
</OrCondition>
<NotCondition>
<EditCondition></

</NotCondition>
</AndCondition>

EditCondi

Child Ele

tion

ment

Attribute Reference Property


Constraint to be executed, this is on top of base constraint defined at Attribute Level
Environment Variables: If the Attribute Name starts with $ then next part is consid
ered as an Environment variable. There can be two types of variables:
a) $PROFILE.NAME - environment variables starting with profile are properties
fetched on profile configured for project
b) $ENV.VARIABLE - environment variables starting with env are system properties
for vm

AttributeBe

xsd:string

havior

Child Ele

If you assign AttributeBehavior as SecureAlias for a particular field, then the

ment

field refers to alias of ssecurity parameter artifact. For more details refer to docu
mentation of deploying and editing a secure parameter artifact [page 16].

Table 10: Attribute Table Metadata


Property

Data Type

Name

xsd:string

Usage

xsd:boolean

Developing Adapters
Developing Adapters

Cardinality

Description

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

15

Property

Data Type

Cardinality

AttributeReference

Description
Specifies reference name that
is header of the column.

Note
Each reference name con
stitutes to one column in
the table.

Guilabels

xsd:string

Specifies the label of the ta


ble.

The sample attribute table metadata should be as shown below:

Sample Code
<AttributeTableMetadata>
<Name>clientCertificates</Name>
<Usage>true</Usage>
<GuiLabels guid="01c2bd59-8dd1-4efb-b795-869851eb979b">
<Label language="EN">Client Certificate Authorization</Label>
<Label language="DE">Client Certificate Authorization</Label>
</GuiLabels>
<AttributeReference>
<ReferenceName>clientCertificate.subjectDN</ReferenceName>
</AttributeReference>
<AttributeReference>
<ReferenceName>clientCertificate.issuerDN</ReferenceName>
</AttributeReference>
</AttributeTableMetadata>

1.1.4 Deploying and Editing a Secure Parameter Artifact


You use the Secure Parameter Artifact to deploy confidential data for custom adapters.

Prerequisites
In the Node Explorer you have selected a tenant, in the context menu you have selected Deploy Artifacts, and you
have specified Secure Parameter as the Artifact Type.

16

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Developing Adapters
Developing Adapters

Context
You can store secure data like password in secure store and use alias name to access this data in integration flow.
Secure parameter artifact contains this alias name and confidential data.
You can deploy artifact on the tenant by following the procedure mentioned below.

Procedure
1. Specify the attributes on the wizard page.
Option

Description

Name

Provide a name for the artifact.


The artifact name is used as alias for the confidential data assigned by this parameter.

Description

Provide a more elaborate description of the artifact.

Secure Parameter

Enter the confidential value of the attribute.

Repeat Secure Parameter

Repeat the confidential value of the attribute.

Note
You should mark attribute(s) as xsd:password in component metadata.
2. Choose Finish.

Note
If correct alias is configured in the integration flow, then the runtime framework passes the secured artifact
value to the component at runtime from secure store.

1.2

Programming Guidelines

Following are the guidelines that your need to understand and follow while developing adapters:
Camel Component Scheme and Name - Make sure that you use a unique camel component scheme to avoid
runtime collisions with other registered schemes. For example, camel component scheme is dropbox and the
name is DropboxComponent.
Secure Programming Secure parameters set on field level contain security relevant information (for example: OAuth tokens,
user/password, secrets). Secure parameters are stored in secure store and accessed through the alias
configured in adapter.
Deploy the secure parameters by choosing Deploy option in the Node Explorer that allows to register an
unique alias (Name*) together with the secure content (Secure Parameter, Repeat Secure Parameter)

Developing Adapters
Developing Adapters

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

17

If you have configured the respective field types in CMD as "xsd:password", instead of string and int, then
the system treats these fields as "secure parameters" by hiding the field content and treating it as alias
that has to match one of the deployed secure parameters.

Sample Code
<AttributeMetadata>
<Name>accessToken</Name>
<Usage>false</Usage>
<DataType>xsd:password</DataType>
<Default></Default>
<Flag>nonTransportable</Flag>
<Length></Length>
<GuiLabels guid="bc58f2bd-7e5a-4bf2-be44-42096f4d5a3c">
<Label language="EN">Access Token</Label>
<Label language="DE">Access Token</Label>
</GuiLabels>
</AttributeMetadata>
Security Aspects Always scan for virus in the Adapter workspace / project before deployment.
The Adapter design time content bundle cannot contain any confidential information (For example: hardcoded secrets, passwords, users or documents). You can use existing tools and hooks for configuration
of secure material `Secure Parameter Wizard" to deploy secure parameters.
Perform fortify and jlin checks.
Logging - Use Slf4j logging
Version - Provide fixed versions according to the versioning concept. Version number must adhere to strict
compatibility guidelines for maintaining semantic version of adapter. This rule is valid for Adapter projects
and Apache Camel Components. Convention: <major.minor.micro> version on manifest file (For example:
1.0.0)
Rules:
Major version increment on incompatible changes. - 2.0.0 to 3.0.0. Example: Adding mandatory fields
Minor version increment on every release (compatible enhancements) - 2.3.0 to 2.4.0. Example: Adding
non mandatory fields
Micro version increment on patches (bug fixes) - 2.3.0 to 2.3.1. Example: Modifying labels and tool tips
API Consumption - Guides on consuming APIs offered by the platform in an adapter and how to test them
with and without SAP infrastructure. To consume the APIs, you need to use the code snippet
ITAiFactory.getApi(apiType, context); wherein, apiType is the class of the requested API interface
and context represents context for the determination of the API. The context can be null if it is not required for
a particular API.
For Example: For accessing KeystoreService, use ITApiFactory.getApi(KeystoreService.class, context)
Manifest.MF + Whitelisting - The HCI runtime library packages are not accessible by default (apart from
exceptions like the ADK services and the Logging). However, if required (For example: for OSGi), you can
import packages specified in the ADK design time artifacts Manifest.MF as import-packages, which are
checked during the processing for packages that are not allowed.

18

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Developing Adapters
Developing Adapters

1.3

Deleting Adapters

You delete an adapter once an adapter is no more required in the system.


Once you create an adapter, it is also available in the integration flow. You can delete an adapter, but the adapter
will still be available in local cache. Hence, you must delete it from integration flow also. You can locate this
adapter in local folder inside cmd folder. The cmd folder exists in the same folder where you extract eclipse
application.

Note
If you do not delete an adapter but some other user deletes the adapter and still the metadata is available
in integration flow, then you must restart the system.
You must undeploy the integration flows using the relevant adapter before undeploying adapter.

Developing Adapters
Developing Adapters

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

19

Important Disclaimers and Legal Information

Coding Samples
Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system
environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and
completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, unless damages were caused by SAP
intentionally or by SAP's gross negligence.

Accessibility
The information contained in the SAP documentation represents SAP's current view of accessibility criteria as of the date of publication; it is in no way intended to be a
binding guideline on how to ensure accessibility of software products. SAP in particular disclaims any liability in relation to this document. This disclaimer, however, does
not apply in cases of wilful misconduct or gross negligence of SAP. Furthermore, this document does not result in any direct or indirect contractual obligations of SAP.

Gender-Neutral Language
As far as possible, SAP documentation is gender neutral. Depending on the context, the reader is addressed directly with "you", or a gender-neutral noun (such as "sales
person" or "working days") is used. If when referring to members of both sexes, however, the third-person singular cannot be avoided or a gender-neutral noun does not
exist, SAP reserves the right to use the masculine form of the noun and pronoun. This is to ensure that the documentation remains comprehensible.

Internet Hyperlinks
The SAP documentation may contain hyperlinks to the Internet. These hyperlinks are intended to serve as a hint about where to find related information. SAP does not
warrant the availability and correctness of this related information or the ability of this information to serve a particular purpose. SAP shall not be liable for any damages
caused by the use of related information unless damages have been caused by SAP's gross negligence or willful misconduct. All links are categorized for transparency
(see: http://help.sap.com/disclaimer).

20

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

Developing Adapters
Important Disclaimers and Legal Information

Developing Adapters
Important Disclaimers and Legal Information

PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.

21

www.sap.com/contactsap

2015 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any
form or for any purpose without the express permission of SAP SE
or an SAP affiliate company. The information contained herein may
be changed without prior notice.
Some software products marketed by SAP SE and its distributors
contain proprietary software components of other software
vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company
for informational purposes only, without representation or warranty
of any kind, and SAP or its affiliated companies shall not be liable for
errors or omissions with respect to the materials. The only
warranties for SAP or SAP affiliate company products and services
are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein
should be construed as constituting an additional warranty.
SAP and other SAP products and services mentioned herein as well
as their respective logos are trademarks or registered trademarks
of SAP SE (or an SAP affiliate company) in Germany and other
countries. All other product and service names mentioned are the
trademarks of their respective companies.
Please see http://www.sap.com/corporate-en/legal/copyright/
index.epx for additional trademark information and notices.

Anda mungkin juga menyukai