deprecated abstract class %iKnow.Source.Lister extends %Library.RegisteredObject
Deprecation note: Direct use of this class is still supported, but it is recommended to use either Domain Definitions (cf %iKnow.DomainDefinition) to manage a domain's contents or use the shorthand methods in %SYSTEM.iKnow to work with an existing domain not managed through a domain definition class.
This is the base class for any Lister implementations. Lister classes are used at the start of the load process to identify the sources that need to be loaded. Each Lister implemenation is specifically designed to be able to scan a certain type of source locations, for example a filesystem for %iKnow.Source.File.Lister and a SQL query for %iKnow.Source.SQL.Lister
Each Lister implementation class defines a set of Lister Parameters, specifying how to reach the sources in the particular type of location this Lister class is designed to work with. For a file lister, this would include parameters such as the directory where to look and the type of files to load from that directory. These Lister Parameters are documented by each Lister implementation in its class documentation.
These Lister Parameters are to be provided to the AddListToBatch() method, when configuring a list for Batch Loading, or to the ProcessList() method when executing Direct Loads.
This method is used to register a list the Lister implementation will later on scan through as part of the execution of the %iKnow.Source.Loader ProcessBatch process. This method takes this Lister implementations Lister Parameters as its arguments, as specified in the class documentation of this Lister implementation.
This method will assemble an External ID, starting from the lister ID, group ID and local reference.
The exact implementation of combining the group name and local reference into a full reference is delegated to BuildFullRef() method of the specific Lister implementation referenced by the listerId.
This method will, assuming it is called for the appropriate Lister class, build the External ID based on the group name and local reference.
WARNING: this method will throw an error if called from the abstract Lister class, as this combination of groupName and localRef is specific to the Lister implementation class.
This method returns the default %iKnow.Source.Processor class to use (without any parameters) if none was registered explicitly through calls to SetProcessor(). By default, this selects (if it exists) a class called Processor in the same package as this Lister implementation, but subclasses might wish to override this and hardcode a specific default Processor to use.()
This method should be overridden by subclasses, implementing how they scan through the particular type of source location or structures they specialize in. The arguments for this method are the same Lister Parameters as those used when issuing the corresponding AddListToBatch() call and are specified and documented by the Lister implementation.
When expanding the list, the Lister should build a "Composite reference": a %List containing the lister ID, the group ID and the local reference for each (candidate) source it found and pass that to either a StoreRef(), StoreTemp() or StoreTempStream() call. Optionally, it can store metadata for each of these refs using the SetMetadataValues() method.
NOTE: This method is used by the iKnow loading frameworkand should never be called by custom code.
Utility method to format the parameter string passed in AddList for display by the %iKnow.Source.Loader.GetCurrentLists() method. Defaults to $lts() but should be overridden to nicen up complex datatypes in the parameter list.
This method returns the simple alias for this Lister class, to be prefixed with a colon. If this method returns the empty string, the Lister Reference will start with the full Lister class name rather than this alias (prefixed with a colon)
Utility method to retrieve the group ID corresponding to a partiular Group Name, for a given domain and lister ID, or zero when the group name is not recognized.
Utility method to retrieve the Group Name corresponding to a particular group ID, for a given domain and lister ID. An error is passed through the sc output parameter if no group was found for this ID.
Shorthand method invoking SetConfig(), SetProcessor() and SetConverter() in one call. A Lister can be re-initialized between calls to AddListToBatch() or ProcessList(), resulting in different settings to be used for the respective lists.
Wrapper method to process a single List in one call. This method instantiates a %iKnow.Source.Loader object, registers itself with it and then calls the ProcessList methodon the Loader with the supplied parameters.
This method takes the Lister Parameters for this particular Lister implementation.
Same as ProcessList(), but sources will be added as Virtual Sources.
Registers the %iKnow.Source.Configuration name to use when indexing sources from from the lists registered through AddListToBatch() or ProcessList() calls onwards. Using this method to set a different Configuration between two AddListToBatch() calls will not impact any lists already registered in earlier calls.
Registers the %iKnow.Source.Converter class and parameters to use when indexing sources from from the lists registered through AddListToBatch() or ProcessList() calls onwards. Using this method to set a different Converter between two AddListToBatch() calls will not impact any lists already registered in earlier calls.
Registers the %iKnow.Source.Processor class and parameters to use when indexing sources from from the lists registered through AddListToBatch() or ProcessList() calls onwards. Using this method to set a different Processor between two AddListToBatch() calls will not impact any lists already registered in earlier calls.
This method will split a complete External ID into the lister reference, group name and local reference and return the corresponding lister ID, group ID and local reference.
The exact implementation of splitting the full reference into a group name and local reference is delegated to SplitFullRef() method of the specific Lister implementation as referenced by the lister reference, which is the first part of the full External ID.
This method is called at the start of ProcessList() and AddListToBatch() to validate the supplied Lister Parameters. Subclasses should override this method to execute the validation logic specific to their Lister Parameters.