3.2.5.2 Generate New Classification Properties

This action is performed on a single file and a list of Property Definition Instances for that file. It results in an updated version of that list of Property Definition Instances.

To perform this action, the server MUST perform the following steps in sequence:

  1. The server builds a list of all classification rules that have Enabled/Disabled set to enabled. This list is referred to as classification rules.

  2. The server builds a list of all classification modules that have Enabled/Disabled set to enabled. This list is referred to as classification modules.

  3. If the list of classification modules is empty, the result of this action is the input list of Property Definition Instances.

  4. If the list of classification rules is empty, the result of this action is the input list of Property Definition Instances.

  5. For each classification rule in classification rules, the server performs the following steps:

    1. If the file extension of the file does not match any of the classification module's Supported extensions, the server skips the classification module.

    2. If the classification rule's execution option is Evaluate unset and the file already has a Property Definition Instance with the property definition instance.Name that is the same as the classification rule's property affected, then the server does not execute the classification module specified by the rule's Module definition name for this and the server goes to the next classification rule.

    3. Refer to the classification module in the list of classification modules with the property definition instance.Name as provided by the rule's Module definition name as the relevant classification module.

    4. The server executes the software module identified by the ModuleClsid of the classification module. The software module is executed in a process specified by Module Definition.Account. The parameters for the software module are the given local file path, the rule's Rule.Parameters, and instructions to determine the value for the name specified by the classification rule's property affected. If the classification module's Needs file content is true, the server provides the contents of the file as an additional parameter.

    5. If the relevant classification module's Module Definition.Parameters contains a value that is "StaticModuleName=Folder Classifier", the executed software module MUST return true.

    6. If the relevant classification module's Module Definition.Parameters contains a value that is "StaticModuleName=Content Classifier", the executed software module MUST perform the following steps in sequence:

      1. The executed software module builds a list of all values in the rule's Rule.Parameters that start with "String=" but stores only the remainder of the value after "String=" in the list and refers to this list as the Parameter string list. The executed software module builds a list of all values in the rule's Rule.Parameters that start with "StringWithCase=" but stores only the remainder of the value after "StringWithCase=" in the list and refers to this list as Parameter case-sensitive string list.

      2. The executed software module builds a list of all values in the rule's Rule.Parameters that start with "RegularExpression=" but stores only the remainder of the value after "RegularExpression=" in the list and refers to this list as the Parameter regular expression list.

      3. For each string in Parameter regular expression list, the executed software module searches the contents of the file for any occurrence of the string, regardless of case, and, if found, removes the string from Parameter string list.

      4. For each string in Parameter case-sensitive string list, the executed software module searches the contents of the file for any occurrence of the string, considering case, and, if found, removes the string from Parameter case-sensitive string list.

      5. For each regular expression (represented as a string) in Parameter regular expression list, the executed software module searches the contents of the file for any matches of the regular expression (see [MSDN-RegEx] for information about matching regular expressions) and, if found, removes the regular expression from Parameter regular expression list. If there is a value in the relevant classification module's Module Definition.Parameters that starts with "MaxTimeoutSeconds=", the remainder of that value after "MaxTimeoutSeconds=" will be referred to as the regex time-out period. If there is a regex time-out period, the executed software module MUST stop attempting to find a match for a single regular expression in the contents of the file after the regex time-out period (in seconds) has elapsed.<80>

      6. If Parameter string list, Parameter case-sensitive string list, and Parameter regular expression list are empty, the executed software module MUST return true.

      7. If the Relevant classification module's Module Definition.Parameters does not contain a value that is "StaticModuleName=Folder Classifier" or "StaticModuleName=Content Classifier", the software module returns a value to the server for the classification rule's property affected.

    7. If the classification module's Needs explicit value is true and the value returned from the classification module is false, the server SHOULD<81> set ClearProperty to true and go to the next classification rule. If the classification module's Needs explicit value is true and the value returned from the classification module is true, the server assumes that the classification module returned the classification rule's Rule.Value for the rest of the steps processing this classification rule. If the classification module's Needs explicit value is false, and the classification module returns no value for the Property affected, the server SHOULD <82>set ClearProperty to true.

    8. If the classification rule execution option is Evaluate unset and the file does not have a Property Definition Instance with the property definition instance.Name that is the same as the classification rule property affected, the server affected creates a new Property Definition Instance; sets property definition instance.Name to the classification rule's property affected and property definition instance.value to the value returned from the classification module; and, if the file has not yet been added to the Report item list, adds the file to the Report item list.

    9. If the classification rule's execution option is Reevaluate and consider existing, the server aggregates (section 3.2.4.5) the value returned from the classification module with the existing Property Definition Instance for the classification rule's property affected and, if the file has not yet been added to the Report item list, adds the file to the Report item list.

    10. If the classification rule's execution option is Reevaluate and ignore existing, the server replaces the existing property definition instance.value for the classification rule's property affected with the value returned from the classification module and, if the file has not yet been added to the Report item list, adds the file to the Report item list. The server SHOULD<83> set ClearProperty to true.

    11. If the property definition instance.value equals or contains the value returned from the classification module, the FsrmPropertyFlags_SetByClassifier flag is added to the property definition instance.flags using a bitwise-OR and Property Definition Instance's sources is cleared and the name of the classification module and classification rule are added to it.

    12. If property definition instance.flags contains the flags FsrmPropertyFlags_Existing and FsrmPropertyFlags_SetByClassifier using a bitwise-AND comparison and property definition instance.value differs from the value supplied from the storage modules, the flag FsrmPropertyFlags_Reclassified is added to the property definition instance.flags using a bitwise-OR.

    13. If the rule type is Classification and ClearProperty is set to true, the server SHOULD<84> do the following:

      1. If the property definition instance.flags contains the flag FsrmPropertyFlags_SetByClassifier, and Rule.ClearAutoProperty is true, the server MUST clear the property value for the property definition instance.

      2. If the property definition instance.flags doesn't contain the flag FsrmPropertyFlags_SetByClassifier, and Rule.ClearManualProperty is true, the server MUST clear the property value for the property definition instance.

  6. The server now has a list of Property Definition Instances with unique names for the file that have come from the storage modules. This is the result of the action.