随笔 - 571  文章 - 4  评论 - 253  阅读 - 72万

IREP_SOA Integration程序注释语法Annotations(概念)

20150506 Created By BaoXinjian

一、摘要


在将程序发布成SOA Integration接口时,需要在书写程序时,在描述中需通过规定的语法书写SOA接口,并发发布为WSDL

每种不同类型的程序,其对应语法稍不用

1. 语法可以参考Metalink:

Oracle E-Business Suite Integrated SOA Gateway Developer's Guide

Integration Repository Annotation Standards

2. 对应的程序类型

(1). Java Annotations

(2). PL/SQL Annotations

(3). Concurrent Program Annotations

(4). XML Gateway Annotations

(5). Business Event Annotations

(6). Business Entity Annotations

(7). Composite Service - BPEL Annotations

(8). Glossary of Annotations

3. 介绍常用的三种Java、PLSQL、Concurrent Program

 

二、PL/SQL Annotations标记


可以使用pls或pkh文件作为注释对象

注释PL/SQL packages时,只需要注释Package Header即可,无需处理Package Body

1. Package层面必须填写内容Required Class-level Annotations

must begin with description sentence(s)
rep:scope
rep:product
rep:displayname
rep:category
    --Use BUSINESS_ENTITY at the class level only if all underlying methods have the same business entity. 
    --In those cases, you do not need to repeat the annotation at the method level.
rep:businessevent (if an event is raised)

2. Package层面可选填写内容Optional Class-level Annotations

link
see
rep:lifecycle
rep:compatibility
rep:ihelp
rep:metalink
rep:doccd

3. Procedure层面必须填写内容Required Method-level Annotations

must begin with description sentence(s)
param
--Use only when applicable and when other tags such as @see and @rep:metalink do not provide parameter explanations.
return (if applicable)
rep:displayname
rep:paraminfo
rep:businessevent (if an event is raised)

4. Procedure层面可以填写内容Optional Method-level Annotations

复制代码
link
see
rep:scope
rep:lifecycle
rep:compatibility
rep:category
--Use BUSINESS_ENTITY at the method level only when a class methods have heterogeneous business entities.
rep:ihelp
rep:metalink
rep:doccd
rep:appscontext
rep:primaryinstance
复制代码

5. 实践案例

复制代码
create or replace package WF_ENGINE as
/*#
 * This is the public interface for the Workflow engine.  It allows
 * execution of various WF engine functions.
 * @rep:scope public
 * @rep:product WF
 * @rep:displayname Workflow Engine
 * @rep:lifecycle active
 * @rep:compatibility S
 * @rep:category BUSINESS_ENTITY WF_WORKFLOW_ENGINE
 */
g_nid number;          -- current notification id
g_text varchar2(2000); -- text information
/*#
 * Adds Item Attribute
 * @param itemtype item type
 * @param itemkey item key
 * @param aname attribute name
 * @param text_value add text value to it if provided.
 * @param number_value add number value to it if provided.
 * @param date_value add date value to it if provided.
 * @rep:scope public
 * @rep:lifecycle active
 * @rep:displayname Add Item Attribute
 */
procedure AddItemAttr(itemtype in varchar2,
                      itemkey in varchar2,
                      aname in varchar2,
                      text_value   in varchar2 default null,
                      number_value in number   default null,
                      date_value   in date     default null);
END WF_ENGINE;
/

commit;
exit;
复制代码

 

三、Concurrent Program Annotations标记


需要将并发程序通过FND_LOAD下载为并解析为ldt文件,再进行注释写法

1. 并发程序级别必须填写内容Required Class-level Annotations

must begin with description sentence(s)
--The annotation takes precedence over the concurrent program own definition in the LDT. One or the other must exist; otherwise, interface generation will fail.
rep:scope
rep:product
rep:displayname
--The annotation takes precedence over the concurrent program own definition in the LDT. One or the other must exist; otherwise, interface generation will fail.
rep:category
rep:businessevent (if an event is raised)

2. 并发程序级别可选填写内容Optional Class-level Annotations

复制代码
link
see
rep:lifecycle
rep:compatibility
rep:ihelp
rep:metalink
rep:doccd
rep:usestable
rep:usesmap
复制代码

3. 没有程序级别的注释concurrent programs

4. 实践案例

复制代码
/**
 * Executes the Open Interface for Accounts Payable Invoices.  It uses the
 * following tables: AP_INVOICES_INTERFACE, AP_INVOICE_LINES_INTERFACE.
 * @rep:scope public
 * @rep:product AP
 * @rep:lifecycle active
 * @rep:category OPEN_INTERFACES AP_INVOICES_INTERFACE 1
 * @rep:usestable AP_INVOICES_INTERFACE 2 IN
 * @rep:usestable AP_INVOICE_LINES_INTERFACE 3 IN
 * @rep:category BUSINESS_ENTITY AP_INVOICE
 */
复制代码

 

四、Java Annotations标记


1. Class级别必须填写的内容注释:Required Class-level Annotations

must begin with description sentence(s)
rep:scope
rep:product
rep:implementation (only required for Java business service objects; not required for plain Java or SDOs)
rep:displayname
rep:service
rep:servicedoc

2. Class级别可选填写的内容注释:Optional Class-level Annotations

复制代码
link
see
rep:lifecycle
rep:category
--Use BUSINESS_ENTITY at the class level only if all underlying methods have the same business entity. In those cases, you do not need to repeat the annotation at the method level.
rep:compatibility
rep:standard
rep:ihelp
rep:metalink
rep:doccd
rep:synchronicity
复制代码

3. 程序级别必须填写的内容注释:Required Method-level Annotations

must begin with description sentence(s)
param
--Use only when applicable and when other tags such as @see and @rep:metalink do not provide parameter explanations.
return (if applicable)
rep:paraminfo
rep:displayname
rep:businessevent (if an event is raised)

4. 程序级别可选的填写的内容注释:Optional Method-level Annotations

复制代码
link
see
rep:scope
rep:lifecycle
rep:compatibility
rep:category
--Use BUSINESS_ENTITY at the method level only when a class methods have heterogeneous business entities.
rep:ihelp
rep:metalink
rep:doccd
rep:appscontext
rep:synchronicity
rep:primaryinstance
复制代码

5. 时间案例

复制代码
/*===========================================================================+
 |      Copyright (c) 2004 Oracle Corporation, Redwood Shores, CA, USA       |
 |                         All rights reserved.                              |
 +===========================================================================+
 |  HISTORY                                                                  |
 +===========================================================================*/
package oracle.apps.po.tutorial;

import oracle.jbo.domain.Number;

import oracle.svc.data.DataObjectImpl;
import oracle.svc.data.DataList;

/**
 * The Purchase Order Data Object holds the purchase order data including 
 * nested data objects such as lines and shipments.
 * 
 * @see oracle.apps.fnd.framework.toolbox.tutorial.PurchaseOrderLineSDO
 * 
 * @rep:scope public
 * @rep:displayname Purchase Order Data Object
 * @rep:product PO
 * @rep:category BUSINESS_ENTITY PO_PURCHASE_ORDER
 * @rep:servicedoc 
 */
public class PurchaseOrderSDO extends DataObjectImpl
{
  public PurchaseOrderSDO ()
  {
    super();
  }

  /**
   * Returns the purchase order header id.
   *  
   * @return purchase order header id.
   */
  public Number getHeaderId()
  {
    return (Number)getAttribute("HeaderId");
  }

  /**
   * Sets the purchase order header id.
   *  
   * @param value purchase order header id.
   * @rep:paraminfo {@rep:precision 5} {@rep:required}
   */
  public void setHeaderId(Number value)
  {
    setAttribute("HeaderId", value);
  }

  /**
   * Returns the purchase order name.
   *  
   * @return purchase order name.
   * @rep:paraminfo {rep:precision 80}
   */
  public String getName()
  {
    return (String)getAttribute("Name");
  }
  
  /**
   * Sets the purchase order header name.
   *  
   * @param value purchase order header name.
   * @rep:paraminfo {@rep:precision 80}
   */
  public void setName(String value)
  {
    setAttribute("Name", value);
  }

  /**
   * Returns the purchase order description.
   *  
   * @return purchase order description.
   * @rep:paraminfo {rep:precision 120}
   */
  public String getDescription()
  {
    return (String)getAttribute("Description");
  }

  /**
   * Sets the purchase order header description.
   *  
   * @param value purchase order header description.
   * @rep:paraminfo {@rep:precision 80}
   */
  public void setDescription(String value)
  {
    setAttribute("Description", value);
  }

  /**
   * @return the purchase order lines DataList.
   * @rep:paraminfo {@rep:innertype oracle.apps.fnd.framework.toolbox.tutorial.PurchaseOrderLineSDO}
   */
  public DataList getLines()
  {
    return (DataList)getAttribute("Lines");
  }

  /**
   * @param list the putrchase order lines DataList.
   * @rep:paraminfo {@rep:innertype oracle.apps.fnd.framework.toolbox.tutorial.PurchaseOrderLineSDO}
   */
  public void setLines(DataList list)
  {
    setAttribute("Lines", list);
  }

}
复制代码

 

Thanks and Regards

参考:http://docs.oracle.com/cd/E18727_01/doc.121/e12065/T511473T545912.htm#5466320

posted on   东方瀚海  阅读(507)  评论(0编辑  收藏  举报
编辑推荐:
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?

点击右上角即可分享
微信分享提示