Listing modules available to a crawl

Call the IasCrawler.listModules() method to return a list of modules you can include in a crawl. Modules include the default crawl types provided by IAS and any data source extensions and manipulator extensions you may have created using the IAS Extension API.

The syntax of the method is:
IasCrawler.listModules(ModuleType moduleType)
where moduleType is an enumeration value of either:
  • SOURCE to return data sources
  • MANIPULATOR to return manipulators

The method returns a List<ModuleInfo> object, which has zero or more ModuleInfo objects. Each ModuleInfo has the name and ID of a data source or manipulator.

To list the modules available to a crawl:

  1. Make sure that you have created a connection to the IAS Server. (An IasCrawler object named crawler is used in this example.)
  2. Call the IasCrawler.listModules() method and specify an enumeration value to return either data sources or manipulators.
    For example:
    List<ModuleInfo> modules = crawler.listModules(ModuleType.SOURCE);
  3. For each ModuleInfo object:
    1. Call the ModuleInfo.getModuleId() method to get the ID of the module (the data source or manipulator).
    2. Call the ModuleInfo.getModuleType() method to get the type of the module (the data source or manipulator).
    3. Call the ModuleInfo.getDescription() method to get the description of the module (the data source or manipulator).
    4. Call the ModuleInfo.getDisplayName() method to get the display name of the module (the data source or manipulator).
    For example:
    List<ModuleInfo> moduleInfoList = modules.getModuleInfo();
    for (ModuleInfo moduleInfo : moduleInfoList) {
       System.out.println(moduleInfo.getDisplayName());
       System.out.println(" *Id: "+ moduleInfo.getModuleId().getId());
       System.out.println(" *Type: "+ moduleInfo.getModuleType());
       System.out.println(" *Description: " + moduleInfo.getDescription());
       System.out.println();
    }

The IasCrawler.listModules() method does not throw checked exceptions if it fails.