The filter is used to define what parts of the JCR repository will be inport or export during package installation or un-installation.
The filter.xml file is present under META-INF/vault. filter.xml has below structure. It consist a set of filter elements which is having a mandatory root attribute and optional include and exclude child elements.
<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<filter root="/apps/techiearchive">
<exclude pattern="/apps/techiearchive/install" />
</filter>
<filter root="/etc/clientlibs/techiearchive"/>
<filter root="/etc/notification/email/html/techiearchive"/>
</workspaceFilter>
Filter elements
The filter elements are independent of each other and define include and exclude patters for subtrees. The root of a subtree is defined by the root attribute, which must be an absolute path.
The filter element can have an optional mode attribute which specified the import mode used when importing content. the following values are possible:
This is the normal behavior. Existing content is replaced completely by the imported content, i.e. is overridden or deleted accordingly.
Existing content is not modified, i.e. only new content is added and none is deleted or modified.
Existing content is updated, new content is added and none is deleted.