In some situations you may want to extend the properties (or
children) of a built-in type rather than create a new type. For example,
you may want to simply add some user-defined properties or actions
to a built-in type. You can achieve this by defining an extension. To define an extension that adds properties to a built-in type, you will first need to
define one or more mixins that define the
properties or children that you want to add to the built-in type,
and then reference the mixins in the extension. You can also define custom actions in an extension similar to how you define
it for a custom type.
The listing in Example 7.11: Extending a Fluent Case Built-in Type shows an
example that extends the FluentCase built-in type. It creates an extension named AcmeFluentExtension that extends FluentCase. The ModelAttributes mixin was defined in
a previous example (see Figure 7.11: ModelAttribute mixin Example). ModelAttributes defines user-defined properties
that a user will be prompted to enter values for, when a file of this
type is uploaded to EKM.
<extension name="AcmeFluentExtension" extends="FluentCase">
<mixins>
<mixin>ModelAttributes</mixin>
</mixins>
</extension>