中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> Bea专区 > AquaLogic Data Services Platfo
关于Custom Function的定制
作者:丘晓斌 时间:2005-09-15 20:21 出处:互连网 责编:小渔
              摘要:在Data View Builder中带了很多标准的函数,但这些标准函数不可能实现所有客户的需求,使用Custom Function可以实现标准函数不能实现的功能,提高Liquid Data应用的灵活性。
在Data View Builder中带了很多标准的函数,但这些标准函数不可能实现所有客户的需求,使用Custom Function可以实现标准函数不能实现的功能,提高Liquid Data应用的灵活性。

创建配置Custom Function的步骤如下:
1. 编程实现Custom Function的具体功能。
注:实现Custom Function的Java方法必须定义为静态的(Static)
例程:
package sample.ld.cf;

import java.io.Serializable;

public class CustomFunctionSample implements Serializable
{
public CustomFunctionSample(){}

public static String getDate(String dateString)
{
return dateString.substring(0,10);
}
}

2. 将编译好的class文件用jar命令加到一个Jar文件中,如:ld_sample_cf.jar。

3. 编写客户化函数库定义(CFLD----Custom Function Library Definition)文件。
例:
<?xml version="1.0" encoding="UTF-8"?>
<definitions>
<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
</xs:schema>
</types>
<functions>
<function name="getDate" return_type="xs:string"
class="sample.ld.cf.CustomFunctionSample" method="getDate"
asynchronous="false">
<argument type="xs:string"/>
<presentation group="Sample Custom Function"/>
<description>Function to get the 10 char of date string</description>
</function>
</functions>
</definitions>

4. 将Jar文件和CFLD文件复制到Liquid Data Repository下的相应目录。Jar文件存放在custom_lib目录下,CFLD文件存放在custom_functions目录下。





5. 进入WebLoigc Domain控制台,在Configuration分页下的General分页设置Custom Functions Classpath。将Jar文件(ld_sample_cf.jar)的路径添加到Custom Functions Classpath设置项中。




6. 创建Custom Function。



 作者简介
丘晓斌是(dev2dev ID: andy) BEA Channel System Enginner
关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有