View Downloadmodules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Provide the name of your resource group | |
$ResourceGroupName="**********" | |
# Provide the name of your Storage account. | |
$StorageAccountName="**************" | |
# Provide the Storage account key | |
$StorageAccountKey = '**********' | |
# Provide the name for your Azure Files share. | |
$ShareName = "modulecode3" //File share name in the storage account | |
# Provide the name for your Directory. | |
$DirectoryName = "RunbookOne" //Filename for download |
View KeyExtractor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2011 Andrew Kroh | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
View JM_SampleJavaMapping_PI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***** Standard Java Libraries ********/ | |
import java.io.BufferedReader; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; | |
View ReadDynamicConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Author: Vanamala Srinivas | |
* Website: www.sriniblog.com | |
* Note: This is just a snippet and use it as a reference. | |
* Complete Blog: http://sriniblog.com/read-write-dynamic-configuration-in-sap-pi-using-java-mapping/ | |
*/ | |
public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException | |
{ | |
trace = (AbstractTrace) getTrace(); //Capture trace object and write trace for debugging purpose. |
View JM_ReadWritePayload_PI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException { | |
try { | |
InputStream in = arg0.getInputPayload().getInputStream(); | |
OutputStream out = arg1.getOutputPayload().getOutputStream(); | |
int buffer; | |
//Read and Write back the file | |
while ((buffer = in.read()) != -1) | |
{ | |
out.write(buffer); |
View SavePayload_Module_PI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*/ | |
package com.sap.adaptermodule; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.util.Date; |
View WriteDynamicConfiguration_AdapterModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*/ | |
package com.sap.adaptermodule; | |
import javax.ejb.CreateException; | |
import javax.ejb.SessionBean; | |
import javax.ejb.SessionContext; |
View setDynamicConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean setDynamicConfiguration(String Namespace, String FieldName, String FieldValue, Container container) throws StreamTransformationException{ | |
boolean success = false; | |
try{ | |
//Get the DynamicConfiguration instance | |
DynamicConfiguration config = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); | |
//Define key to write in the Dynamic Configuration | |
DynamicConfigurationKey key1 = DynamicConfigurationKey.create(Namespace, FieldName); | |
//Write the parameter from the Dynamic Configuration based on the key |
View getDynamicFileName.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getDynamicFileName(Container container) throws StreamTransformationException{ | |
String FileValue = ""; | |
try{ | |
//Get the DynamicConfiguration instance | |
DynamicConfiguration config = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); | |
//Define key to read from the Dynamic Configuration | |
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName"); | |
//Read the FileName parameter from the Dynamic Configuration based on the key |
View setDynamicFileName.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean setDynamicFileName(String FieldValue, Container container) throws StreamTransformationException{ | |
boolean success = false; | |
try{ | |
//Get the DynamicConfiguration instance | |
DynamicConfiguration config = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); | |
//Define key to write in the Dynamic Configuration | |
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName"); | |
//Write the FileName parameter from the Dynamic Configuration based on the key |
NewerOlder