How to get list of all repository names on a documentum server

1k Views Asked by At

I am trying to make a dynamic application using dfc, in which I want to fetch all the repository names that exists on a server.

For example if there are 3 repositories, i.e. r1, r2 and r3. How can I fetch the names in my program?

3

There are 3 best solutions below

0
On

You would have to ask the docbroker to get a list of docbases known. See the DFC docs for information on this. You can also get the server names for each docbase, but there is no way around querying docbrokers if you want to use DFC. Note that docbases could reside on other servers than the docbroker.

0
On

You can deploy the Documentum Restful services and you specify server names as host in the Restful DFC properties file, it will give you XMl/JSON response on the following URL -

XMl Response - URL/DctmRest/repositories

JSON Response - URL/DctmRest/repositories.json

0
On

In DFC you can obtain list of repositories like this:

IDfDocbaseMap docbaseMap = DfClient.getLocalClient().getDocbaseMap();
for (int i = 0; i < docbaseMap.getDocbaseCount(); i++) {
    processRepository(docbaseMap.getDocbaseId(i), 
        docbaseMap.getDocbaseName(i);
        docbaseMap.getDocbaseDescription(i));
}

But it is a list of repositories registered to the Docbroker where each repository can run on a different server.

I'm afraid that without session to each repository you are not able to filter them per server. With session you can do it for example by:

((StrongSessionHandle) session).getDocbaseConnection().getServer().getName()

or

session.getServerConfig().getString("object_name")