ヘッダーをスキップ
Oracle® Fusion Middleware Oracle Enterprise Repository統合ガイド
11g リリース1(11.1.1.7)
B72433-01
  目次へ移動
目次
索引へ移動
索引

前
 
次
 

24 通知API

この章では、通知APIのユースケースについて説明します。このユースケースで、新しい読込み通知置換リストを作成する方法およびOracle Enterprise Repositoryの通知を作成する方法について解説します。

この章では、次の項目について説明します。

24.1 概要

通知サブシステムは、Oracle Enterprise Repositoryの通知を作成する場合に使用する、Webサービス・ベースのメカニズムを提供します。

24.2 ユースケース

この項では、通知APIを使用するユースケースについて説明します。内容は次のとおりです。

24.2.1 ユースケース: 読込み通知置換リストの作成と通知の作成

説明

読込み通知置換リストを作成し、Oracle Enterprise Repositoryの通知を作成します。

サンプル・コード

例24-1 ユースケース: 読込み通知置換リストの作成と通知の作成

    String[] lSubstitutions = null;
    String[] lRecipients = null;
    String lTemplateType = "asset_registered";
    NameValue[] lNameValues = null;
 
    
    lRecipients = new String[] {"recipient@xyz.com"};
            
    try {
      //////////////////////////
      // read the existing substitutions based on the given template
      lSubstitutions = mFlashlineRegistry.notificationSubstitutionsRead(mAuthToken, lTemplateType);               
      
      //////////////////////////
      // create an array of namevalue pairs; a namevalue pair for each required substitution
      lNameValues = new NameValue[lSubstitutions.length];
            
      // populate the namevalues
      for(int i=0; i<lSubstitutions.length; i++) {
        lNameValues[i] = new NameValue();
        lNameValues[i].setName(lSubstitutions[i]);
        lNameValues[i].setValue("valueof-"+lSubstitutions[i]);
      }
 
      ////////////////////////////////////////////
      // create the notification
      mFlashlineRegistry.notificationCreate(mAuthToken, lTemplateType, lRecipients, lNameValues);
           
    } catch(Exception e) {
      fail(e.getMessage());
    }