uCosminexus DocumentBroker Version 3 Standard GUI Development Kit
文書を作成,取得,削除する場合のコーディング例を,次に示します。
1 //////////////////////////////////////////////////////////// 2 // decmFactory : DecmFactoryインスタンス 3 // fldOiid : 登録先フォルダOIID 4 // filePath : 登録するローカルファイルパス 5 // localPath : 取得先ローカルパス 6 //////////////////////////////////////////////////////////// 7 8 // 文書操作用のインスタンスを取得 9 DecmDoc doc = decmFactory.createDecmDoc(); 10 11 // プロパティ操作用インスタンスを取得 12 DecmDocProp docProp = decmFactory.createDecmDocProp(); 13 14 // プロパティを設定 15 docProp.setStrProp( "esysProp_Name", "会議資料" ); doc.setDocProp( docProp ); 16 17 // 登録先フォルダ設定 18 doc.setFolderOiid( fldOiid ); 19 20 // ファイル設定 21 doc.setFilePath( filePath ); 22 23 // 文書作成 24 String oiid = doc.createDoc( false, true ); 26 // ダウンロード 27 doc.downloadContent( null, 28 localPath, 29 true, 30 true );
1 ////////////////////////////////////////////////////////////// 2 // decmFactory : DecmFactoryインスタンス 3 // fldOiid : 登録先フォルダOIID 4 // filePath : 主ファイルに登録するローカルファイルパス 5 // subFilePath1 : 関連ファイルに登録するローカルファイルパス 6 // subFilePath2 : 関連ファイルに登録するローカルファイルパス 7 // downloadMasterPath : 主ファイルの取得先ローカルパス 8 // downloadSubPath : 関連ファイルの取得先ローカルパス 9 ////////////////////////////////////////////////////////////// 10 11 // 文書操作用のインスタンスを取得 12 DecmDoc doc = decmFactory.createDecmDoc(); 13 // プロパティ操作用インスタンスを取得 14 DecmDocProp docProp = decmFactory.createDecmDocProp(); 15 16 // プロパティを設定 17 docProp.setStrProp( "esysProp_Name", "会議資料" ); 18 doc.setDocProp( docProp ); 19 20 // 登録先フォルダ設定 21 doc.setFolderOiid( fldOiid ); 22 23 // ファイル設定 24 doc.setFilePath( masterFilePath ); 25 26 // 関連ファイル操作用インスタンスを取得 27 DecmSubFile subFile1 = decmFactory.createDecmSubFile(); 28 DecmSubFile subFile2 = decmFactory.createDecmSubFile(); 29 30 // 関連ファイルリストを設定 31 subFile1.setFilePath( subFilePath1 ); 32 subFile2.setFilePath( subFilePath2 ); 33 Vector<DecmSubFile> subFileList = new Vector<DecmSubFile>(); 34 subFileList.add( subFile1 ); 36 subFileList.add( subFile2 ); 37 doc.setSubFileList( subFileList ); 38 39 // 文書作成 40 String oiid = doc.createDoc( false, 41 true ); 42 43 // 主ファイルをダウンロード 44 doc.downloadContent( null, 45 downloadMasterPath, 46 true, 47 true ); 48 49 // 関連ファイルをダウンロード 50 Vector<DecmSubFile> subFileList = doc.fetchSubFile( null ); 51 subFileList.get( 0 ).downloadContent( downloadSubPath, 52 true, 53 true );
1 //////////////////////////////////////////////////////////// 2 // decmFactory : DecmFactoryインスタンス 3 // docOiid : 操作対象文書のバージョニングOIID 4 //////////////////////////////////////////////////////////// 5 6 // 文書操作用のインスタンスを取得 7 DecmDoc doc = decmFactory.createDecmDoc(); 8 9 // 文書に接続 10 doc.setOiid( docOiid ); 11 12 // 文書削除 13 doc.deleteDoc( true );
All Rights Reserved. Copyright (C) 2009, Hitachi Systems & Services, Ltd.