![]() | InDesign SDK 20.5 |
#include <IPreflightRuleManager.h>

Public Types | |
| enum | { kDefaultIID = IID_IPREFLIGHTRULEMANAGER } |
Public Member Functions | |
| virtual void | Startup ()=0 |
| virtual void | Shutdown ()=0 |
| virtual bool16 | RegisterMissingRuleService (const ClassID &providerClassID, const PreflightRuleID &ruleID=PreflightRuleID())=0 |
| virtual PreflightRuleIDVector | GetAllRuleIDs () const =0 |
| virtual IPreflightRuleService * | QueryRuleService (const PreflightRuleID &ruleID) const =0 |
| virtual IPreflightRuleInfo * | CreateRule (PreflightRuleID ruleID, IDataBase *db) const =0 |
| virtual void | GetAllCategories (K2Vector< PMString > &allCategories) const =0 |
| virtual void | GetRulesInCategory (const PMString &category, PreflightRuleIDVector &rules) const =0 |
| virtual PMString | GetRuleCategory (const PreflightRuleID &ruleID) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface sits on the session and provides "manager level" access to the database that it maintains about the rules that it knows about (via rule services). Normally you get one of these via
InterfacePtr<IPreflightRuleManager> iRuleMgr(Utils<IPreflightUtils>()->QueryRuleManager());
The idea is that preflight rule services register all the rules they know about. This manager collates this information and provides the API to access rules as if they are derived from a "super service." (Ie, you don't have to talk to the services directly.)
| pure virtual |
Given a rule ID, create a rule boss in the specified database (nil for in-memory).
| ruleID | is the specified rule ID. |
| db | is the database in which to create the rule |
| pure virtual |
Get a list of all rule categories. Note that rules declare their own categories; this is simply the union of all the returned strings. Also note: Rules that do not wish to appear in the UI return an empty category string. This method does not return an empty category string in the list of categories.
| allCategories | OUT Receives the vector of strings. It's cleared before adding the entries. |
| pure virtual |
| pure virtual |
Get the category a rule belongs to. Note: Rule categories are the domain of Rule UI, which may not be available in a server environment or if the preflight UI plugin isn't present. Thus you should only assume that categories are valid for UI purposes.
| ruleID | IN The rule you're interested in. |
| pure virtual |
Get a list of all the rule IDs declared under a given category. Note: Rule categories are the domain of Rule UI, which may not be available in a server environment or if the preflight UI plugin isn't present. Thus you should only assume that categories are valid for UI purposes.
| category | IN The category you're interested in. Pass an empty string if you want to get a list of all the rules that returned an empty category string, ie they do not wish to appear in the UI. |
| rules | OUT Recevies the vector of rules. It's cleared before adding the entries. |
| pure virtual |
Given a rule ID, returns the service responsible for it.
| ruleID | is the specified rule ID. |
| pure virtual |
Register a rule service that failed during startup. Ror example, all script-based rules failed during startup since they require the scripting serivces and scripting info database to be completed first. This does not happen until the app completes all startup tasks. The calling client call this method to finish registering the rules.
| providerClassID | is the service class ID for this rule service. |
| ruleID | is the missing rule ID to register. If the ruleID spcified is a null string, then all rules associated with the specified service should be register. |