How to List Document Classes in IBM FileNet Content Engine

import java.util.Iterator;

import com.filenet.api.admin.ClassDefinition;
import com.filenet.api.collection.EngineCollection;
import com.filenet.api.core.Connection;
import com.filenet.api.core.Domain;
import com.filenet.api.core.Factory;
import com.filenet.api.core.ObjectStore;
import com.filenet.api.query.SearchSQL;
import com.filenet.api.query.SearchScope;

public final class FileNetSample {

  public static void main(final String[] args) {
    final Connection conn = Factory.Connection.getConnection("http://localhost:9080/wsi/FNCEWS40MTOM"); // for the SOAP transport

    final Domain domain = Factory.Domain.getInstance(conn, null);

    final ObjectStore os = Factory.ObjectStore.getInstance(domain, "Sample");

    final SearchScope scope = new SearchScope(os);

    final SearchSQL sql = new SearchSQL("SELECT * FROM ClassDefinition"); // or "SELECT * FROM ClassDefinition WHERE SuperclassDefinition = OBJECT('{...}')" to filter by superclass, for example

    final EngineCollection coll = scope.fetchObjects(sql, null, null, false);

    final Iterator<?> it = coll.iterator();

    while (it.hasNext()) {
      final ClassDefinition def = (ClassDefinition);




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s