Module - Trivial Datasource (Trivial Datasource)

Offers functional but trivial implementations for some datasource interfaces. In particular implementations are offered for categorization and report logging.

Categories

How to define them

Example XML:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns3:category-definition xmlns:ns2="http://grid.trendmicro.com/services/level-0" xmlns:ns3="urn:com.trendmicro.grid.acl.ds.trivial.Categories" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:com.trendmicro.grid.acl.ds.trivial.Categories categories.xsd">
    <availableLocales>
        <locale>en_US</locale>
        <locale>de_DE</locale>
        <locale>fr_FR</locale>
    </availableLocales>
    <category displayName="Test" locale="en" name="test">
        <tagQueryExpression>tag01 -tag02</tagQueryExpression>
        <tagQueryExpressionVersion>1.0</tagQueryExpressionVersion>
    </category>
    <translations>
        <displayName locale="de">Täst</displayName>
    </translations>
</ns3:category-definition>

L10N

I18N (regional differentiation)

Categories are visible in all regions and countries by default. While this default behaviour may be suitable for some categories, it's not a reasonable approach when categories describe something that highly depends on the culture of the majority of citizens of a certain region. "Parental Control" is just one example where categories (or more important the tag query that drives them) may differ between countries.

Regional differentiation is realized by setting the tag "availableLocales" and add a list of ISO language & country code locales where the category should be available.

Defining multiple tag queries for an equally named category is supported by creating multiple categories that share the same display name but do not intersect in the definition of availableLocales. Within views

Category Views

Views define how categories are presented depending on regional and functional differences. Logically a view is a locale sensitive definition of a category tree.

How to define them

Views are defined in a sub folder called "views" located below the path that is used to define the categories themselves. Similar to categories, views are defined using XML files that should follow the same naming conventions as categories do.

Example Structure:

  views/
    default.xml
    client-application-control.europe.xml
    client-application-control.north-america.xml
    ...

Note: A view definition called "default.xml" must exist inside the views directory in order to avoid that the default view including categories are created. This auto-creation feature is implemented to simplify the definition of own views and categories however it leads to this naming requirement when used in production systems.

Example XML:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns3:category-view-definition xmlns:ns2="http://grid.trendmicro.com/services/level-0" xmlns:ns3="urn:com.trendmicro.grid.acl.ds.trivial.Categories" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="default" xsi:schemaLocation="urn:com.trendmicro.grid.acl.ds.trivial.Categories categories.xsd">
    <category name="Category01">
        <category name="Child01Category01"/>
        <category name="Child02Category01"/>
    </category>
    <category name="Category02">
        <category name="Child01Category02"/>
        <category name="Child02Category02"/>
    </category>
    <category name="Category03">
        <category name="Child01Category03"/>
        <category name="Child02Category03"/>
    </category>
    <category name="test">
        <availableLocales>
            <locale>en_US</locale>
            <locale>de_DE</locale>
            <locale>fr_FR</locale>
        </availableLocales>
    </category>
</ns3:category-view-definition>

The name attribute used in category tags must match a defined category. An exception will be thrown when using names of undefined categories.

L10N

Views do not require any localization. However they can be internationalized.

I18N (regional differentiation)

I18N is realized in the same way as with categories. The definition of "availableLocales" sets the regional visibility of a single tree node or the complete view (when used as a top level element).