Partager via


Category

Applies To: System Center Service Manager 2010

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Represents a category definition in a management pack.

Schema Hierarchy

ManagementPack
  Categories
    Category

Syntax

<Categories>
   <Category ID=”id” Comment=”string” Target=”classtypeid” Value=”string”>…</Category>
</Categories>

Attributes and Elements

The following sections describe attributes, child elements, and the parent element of the Category element.

Attributes

Attribute Description

ID

Required attribute. Represents the identity of the element. To learn how to identify your element in a management pack, see Element Identity and Namespace Conventions.

Comment

Optional attribute. Represents commentary by the management pack author.

Target

Required attribute. Refers to the ID of the class type to which this category is applied.

Value

Required attribute. Defines the EnumerationValue that represent the category to be assigned to the target class ID.

Child Elements

Element Description

ManagementPackName

Optional element. Refers to the ID of the management pack to which this category is restricted.

ManagementPackPublicKeyToken

Optional element. Refers to the public key token of the management pack to which this category is restricted.

ManagementPackVersion

Optional element. Refers to the version of the management pack to which this category is restricted.

Parent Elements

Element Description

Categories

Contains all category definitions in a management pack

Remarks

Category definitions are used in conjunction with EnumerationValue definitions. Before defining categories, you first must either define enumeration values or choose already defined enumeration values that will serve as the value of your categories. For example, consider the following enumeration value definitions within the ServiceManager.ConfigurationManagement.Library management pack:

<EnumerationTypes>
       <!--Enumeration for Task Categorization-->
        <EnumerationValue ID="ServiceManager.ConfigurationManagement.ConfigItemFolderTasks" Accessibility="Public" Parent="SMConsole!Microsoft.EnterpriseManagement.ServiceManager.UI.Console.ConsoleTasks" />
        <EnumerationValue ID="ServiceManager.ConfigurationManagement.WindowsComputerTasks" Accessibility="Public" Parent="SMConsole!Microsoft.EnterpriseManagement.ServiceManager.UI.Console.ConsoleTasks" />
        <EnumerationValue ID="ServiceManager.ConfigurationManagement.WindowsSoftwareTasks" Accessibility="Public" Parent="SMConsole!Microsoft.EnterpriseManagement.ServiceManager.UI.Console.ConsoleTasks" />
        <EnumerationValue ID="ServiceManager.ConfigurationManagement.WindowsPrintersTasks" Accessibility="Public" Parent="SMConsole!Microsoft.EnterpriseManagement.ServiceManager.UI.Console.ConsoleTasks" />
        <EnumerationValue ID="ServiceManager.ConfigurationManagement.WindowsSoftwareUpdatesTasks" Accessibility="Public" Parent="SMConsole!Microsoft.EnterpriseManagement.ServiceManager.UI.Console.ConsoleTasks" />
 </EnumerationTypes>

The preceding enumeration values are then used as category values in the following category definitions:

<Categories>
    <!-- Task Categorization -->
    <Category ID="ServiceManager.ConfigurationManagement.GenericDeleteCategory.MultiSelect.Category" Target="ServiceManager.ConfigurationManagement.Delete.Task" Value="SMConsole!Microsoft.EnterpriseManagement.ServiceManager.UI.Console.MultiSelectTask" />
    <Category ID="ServiceManager.ConfigurationManagement.GenericDeleteCategory.DoNotShowInFormCategory" Target="ServiceManager.ConfigurationManagement.Delete.Task" Value="SMConsole!Microsoft.EnterpriseManagement.ServiceManager.UI.Console.DonotShowFormTask" />
    <Category ID="ServiceManager.ConfigurationManagement.WindowsComputer.CreateNewTask.Category" Target="Microsoft.Windows.Computer.New.Task" Value="ServiceManager.ConfigurationManagement.WindowsComputerTasks" />
    <Category ID="ServiceManager.ConfigurationManagement.WindowsSoftware.CreateNewTask.Category" Target="Microsoft.Windows.Software.New.Task" Value="ServiceManager.ConfigurationManagement.WindowsSoftwareTasks" />
    <Category ID="ServiceManager.ConfigurationManagement.WindowsPrinter.CreateNewTask.Category" Target="Microsoft.Windows.Printer.New.Task" Value="ServiceManager.ConfigurationManagement.WindowsPrintersTasks" />
    <Category ID="ServiceManager.ConfigurationManagement.WindowsSoftwareUpdates.CreateNewTask.Category" Target="Microsoft.Windows.SoftwareUpdates.New.Task" Value="ServiceManager.ConfigurationManagement.WindowsSoftwareUpdatesTasks" />
</Categories>

You can also define categories so that they are used only from within a specific management pack. You would specify the management pack as follows:

  
<Category ID="ChangeConfigurationMPSolutionCategory" Value="SMChange!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack.Solution.ChangeManagement">
   <ManagementPackName>ServiceManager.ChangeManagement.Configuration</ManagementPackName>
   <ManagementPackVersion>MOM_MANAGEMENTPACK_VERSION</ManagementPackVersion>
</Category>

See Also

Reference

Categories
EnumerationValue