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

简介: 20150506 Created By BaoXinjian 一、摘要 在将程序发布成SOA Integration接口时,需要在书写程序时,在描述中需通过规定的语法书写SOA接口,并发发布为WSDL 每种不同类型的程序,其对应语法稍不用 1.

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

ERP技术讨论群: 288307890
技术交流,技术讨论,欢迎加入
Technology Blog Created By Oracle ERP - 鲍新建
相关文章
|
7月前
|
设计模式 Java 测试技术
【设计模式】JAVA Design Patterns——Arrange/Act/Assert(安排/执行/断言模式)
【设计模式】JAVA Design Patterns——Arrange/Act/Assert(安排/执行/断言模式)
|
7月前
|
存储 JSON JavaScript
【YAML语法规范指南】从入门到精通,揭秘神秘语法,引领配置文件解析指南(基础结构篇)
"YAML Ain't Markup Language"(简称YAML)是一种专为人类设计的数据序列化语言,适用于多种现代编程语言,可广泛应用于各类日常任务。它是一种以人类可读形式呈现的、适用于多种语言的Unicode数据序列化标准。它基于敏捷编程中常见的本地数据结构,广泛应用于配置文件、互联网消息传递、对象持久化以及数据审计等多个领域。遵循Unicode标准、
714 8
【YAML语法规范指南】从入门到精通,揭秘神秘语法,引领配置文件解析指南(基础结构篇)
|
7月前
|
缓存 安全 网络协议
Envoy中Wasm Filter相关概念解释
本文旨在介绍Envoy中Wasm Filter相关概念,让用户对相关架构有更加深入的了解,可以快速开发出自己的Wasm插件。 阿里云服务网格(Service Mesh,简称ASM)提供一个全托管式的服务网格平台,兼容社区Istio开源服务网格,用于简化服务的治理,包括服务调用之间的流量路由与拆分管理、服务间通信的认证安全以及网格可观测性能力,从而极大地减轻开发与运维的工作负担。 ASM支持Wasm插件。
247 2
|
持续交付 C# 数据格式
.net持续集成cake篇之cake任务依赖、自定义配置荐及环境变量读取
.net持续集成cake篇之cake任务依赖、自定义配置荐及环境变量读取新建一个构建任务及任务依赖关系设置上节我们通过新建一个HelloWorld示例讲解了如何编写build.cake以及如何下载build.
1115 0
|
SQL
Git.Framework 框架随手记--ORM条件组合
  在上一篇中简单记录了如何对数据进行删除和修改,其用法都非常简单,在文章中提到了Where()方法,本文将详述Where() 等条件函数。     一. SQL 条件分析     对于SQL每个人应该都很熟悉,这是基础的基础,如果没有使用过SQL的本文可以直接忽略了。
944 0
|
开发框架 .NET Linux
Nancy之基于Self Hosting的补充小Demo
原文:Nancy之基于Self Hosting的补充小Demo 前面把Hosting Nancy with ASP.NET、Self Hosting Nancy和Hosting Nancy with OWIN 以demo的形式简单描述了一下。
1278 0
|
C#
使用C# (.NET Core) 实现组合设计模式 (Composite Pattern)
本文的概念性内容来自深入浅出设计模式一书. 本文需结合上一篇文章(使用C# (.NET Core) 实现迭代器设计模式)一起看. 上一篇文章我们研究了多个菜单一起使用的问题. 需求变更 就当我们感觉我们的设计已经足够好的时候, 新的需求来了, 我们不仅要支持多种菜单, 还要支持菜单下可以拥有子菜单.
1459 0
|
.NET C#
[.NET领域驱动设计实战系列]专题三:前期准备之规约模式(Specification Pattern)
原文:[.NET领域驱动设计实战系列]专题三:前期准备之规约模式(Specification Pattern) 一、前言   在专题二中已经应用DDD和SOA的思想简单构建了一个网上书店的网站,接下来的专题中将会对该网站补充更多的DDD的内容。
1261 0