1、添加ODI驱动
在ODI11G中需要将数据jdbc驱动拷贝到以下两个位置:
$HOME(一般在windows的系统文件夹,如:C:\Users\Administrator\AppData\Roaming\odi\oracledi\)/.odi/oracledi/userlib-----用于statio的数据集成;
ODI_HOME/oracledi/agent/drivers/----用于代理的数据集成;
王珂
2、添加自定义插件
首先将待添加的open tools jar包放到上述ODI驱动的位置下。
打开ODIstadio之后,在odi菜单项,选择添加或删除open tools
添加完成后:
附相关代码如下:
/**
*
*/
package com.dataonv.OpenTools;
import javax.swing.JOptionPane; /* Needed for the message box used in this example*/
import oracle.odi.sdk.opentools.IOpenTool; /* All Open Tool classes need these three classes */
import oracle.odi.sdk.opentools.IOpenToolParameter;
import oracle.odi.sdk.opentools.OpenToolAbstract;
import oracle.odi.sdk.opentools.OpenToolExecutionException;
import oracle.odi.sdk.opentools.OpenToolParameter; /* The class used for parameters */
/**
* @author Administrator
*
*/
public class SimpleMessageBox extends OpenToolAbstract {
private static final IOpenToolParameter[] mParameters = new IOpenToolParameter[] {
new OpenToolParameter("-TEXT", "Message text",
"Text to show in the messagebox(Mandatory).", true),
new OpenToolParameter("-TITLE", "Messagebox title",
"Title of the messagebox.", false) };
public IOpenToolParameter[] getParameters() {
return mParameters;
}
public String getDescription() {
return "弹出对话框";
}
public String getVersion() {
return "v1.0";
}
public String getProvider() {
return "公司名称.";
}
public String getSyntax() {
return "SimpleMessageBox \"-TEXT=<text message>\" \"-TITLE=<window title>\"";
}
public String getIcon(int pIconType) {
switch (pIconType) {
case IOpenTool.SMALL_ICON:
return "/com/dataonv/OpenTools/haishu16.gif";
case IOpenTool.BIG_ICON:
return "/com/dataonv/OpenTools/haishu32.gif";
default:
return "";
}
}
public void execute() throws OpenToolExecutionException {
try {
if (getParameterValue("-TITLE") == null
|| getParameterValue("-TITLE").equals("")) /*
* title was not
* filled in by
* user
*/
{
JOptionPane.showMessageDialog(null,
(String) getParameterValue("-TEXT"),
(String) "Message", JOptionPane.INFORMATION_MESSAGE);
} else {
JOptionPane.showMessageDialog(null,
(String) getParameterValue("-TEXT"),
(String) getParameterValue("-TITLE"),
JOptionPane.INFORMATION_MESSAGE);
}
}
/* Traps any exception and throw them as OpenToolExecutionException */
catch (IllegalArgumentException e) {
throw new OpenToolExecutionException(e);
}
}
}
代理启动命令:
1、linux:./agent.sh -PORT=20300 -NAME=agent_001 -PROTOCOL=http
2、windows:agent.bat "-PORT=20300" "-NAME=agent_001" "-PROTOCOL=http"
ODI中新增插件(Open Tools)介绍,布布扣,bubuko.com
ODI中新增插件(Open Tools)介绍
原文:http://blog.csdn.net/dataonv/article/details/20577621