CmsClient client = new CmsClient(logonGuid);
// import a plugin from xml definition
// file path valid on server where MS is installed
Plugin plugin = client.importPlugin("E:\\Server\\CMS\\ASP\\PlugIns\\jrql\\cancelWaitingJobs.xml");
System.out.println(plugin.getPluginGuid());
System.out.println(plugin.getName() + " " + plugin.isActive());
// assign projects to plug-in and activate
String[] guids = { "06BE79A1D9F549388F06F6B649E27152", "73671509FA5C43ED8FC4171AD0298AD2" };
plugin.assignProjects(guids);
System.out.println(plugin.isActive());
// enabling/disabling group of plug-ins
List<Plugin> enabledPlugins = client.enablePluginsByNameContains("PROD", true);
System.out.println(enabledPlugins);
List<Plugin> disabledPlugins = client.disablePluginsByNameContains("PROD", true);