ECM Filenet API - Get ObjectStore

I. Giới thiệu

ECM Filenet là một hệ thống content management hữu dụng cho các doanh nghiệp.

Object Store trong ECM Filenet như một store để lưu trữ những thông tin chung của các cấu phần trong ECM như:

- Folder

- ChoiceList

- Class Definition

- Document

- Property Template

- ...

Object Store giống như một schema trong Oracle DB.

Một hệ thống ECM có thể có nhiều Object Store khác nhau.

Bài dưới đây sẽ hướng dẫn cách connect đến một object store thông qua api.

II. Chuẩn bị

Chuẩn bị các thư viện theo bài hướng dẫn: ecm filenet dependency

III. Sử dụng
        
    import com.filenet.api.constants.RefreshMode;
    import com.filenet.api.core.Factory;
    import com.filenet.api.core.ObjectStore;
    import com.filenet.api.core.Connection;
    import com.filenet.api.core.Domain;

    public Connection getConnection() {
        String uri = "http://ip:port/wsi/FNCEWS40MTOM";
        Connection conn = Factory.Connection.getConnection(uri);
        return conn;
    }
      
    public ObjectStore getObjectStore(Connection conn) {
        // Get the default domain
        Domain domain = Factory.Domain.getInstance(conn, null);
        // Get an object store
        ObjectStore os = Factory.ObjectStore.fetchInstance(domain, "ObjectStoreName", null);
        return os;
    }
    
    public void test(){
        ObjectStore objectStore = getObjectStore(getConnection())
    }
        
      

Nhận xét

Bài đăng phổ biến từ blog này

IBM BPM - Date

BPM WebSphere - Create Datasource (Connect to DB via JDBC)

IBM BPM - Error: Save error