HP WBEM Services Software Developer's Kit for HP-UX Provider and Client Developer's Guide A.01
CIM Naming Guidelines
Classes
Appendix A 117
Subclassing to Specialize
The normal case for subclassing is when a class represents a subset of
instances of its superclass. In these cases, the most important naming
convention is to use the most descriptive and precise name possible.
Creating intermediate subclasses should be considered if applicable.
One should also consider the potential for definition of additional
subclasses in some future schema release. Pitfalls to avoid include:
• Class name too general: a provider of another (parallel) subclass
could have instances that overlap with the subclass being defined. In
this case a more specific name should have been selected.
• Class name too specific: a provider of another (parallel) subclass
would define identical properties. In this case, a more general
intermediate subclass should have been defined, and then another
subclass derived from it with any specific properties/methods.
When extending the schema, prefixes should reflect the context within
which the class is applicable. If a class would be applicable to Linux
systems only, a Linux_ prefix is appropriate. A class specific to all ACME
systems would have an ACME_ prefix. Classes specific to various
operating systems supported by the ACME Corporation would be
prefixed with ACMEUnix_, ACMELinux_, and ACMEWin_.
An example of subclassing would be an ACME-specific Fast Ethernet
provider. The fictitious ACME Corporation could create a subclass of
CIM_EthernetPort called ACME_EthernetPort that would have
ACME-specific properties and methods. Then a subclass of
ACME_EthernetPort could be called ACME_FastEthernetPort that has
any attributes specific to a Fast Ethernet device. This would leave open
the option of defining a separate subclass of ACME_EthernetPort called
ACME_GigabitEthernetPort.
A second example for use of an intermediate class would be that ofkernel
parameters for ACME’s Unix system. ACMEUnix_KernelParameter could
be subclassed from CIM_Setting. Then from this intermediate class,
several additional subclasses could be defined, for example:
• ACMEUnix_BaseKernelParameter,
• ACMEUnix_PrivateBaseKernelParameter,
• ACMEUnix_DerivedKernelParameter, and
• ACMEUnix_PrivateDerivedKernelParameter.