Sample CMSManager interface usage

Use the CMSManager interface to gather the data that is configured in the content_management_system_properties.xml file. To use these methods, you do not need to implement single sign-on to content management systems.

See IBM® Javadoc Documentation to view all of the available information on the parameters, returns, exceptions, and syntax for the CMSManager interface.

This sample code shows how to retrieve the CMSManager object from the context and use it to retrieve a list of configured repositories.
Context ctx = null;
try
{
 	ctx = PIMContextFactory.getContext("Admin", "xxx", "MyCompany");
	CMSManager CMSMgr = ctx.getCMSManager();
	Collection<String> listOfCMS = CMSMgr. getRepositoryNames();
}
catch (PIMAuthorizationException ae)
{
 	// Expected a failure
       	System.out.println("Authorization Failure");
       	return;
}
catch(PIMInternalException ie)
{
	System.out.println(" Internal Error ");
	return;
}


Last updated: November 6, 2015