Supported rules

The following rules are provided in the HUSACCT applications and can be validated. For each rule, the possible exceptions and the possible violation types will be given.


Property rule types

Interface convention

Each class in the specified module must implement the specified interface. An exception on this rule will exclude certain classes or packages from this rule.


Façade

Each class in the specified module must only communicate to classes outside the module via the façade.


SuperClassInheritance convention

Each class in the specified module must extend the specified class. An exception on this rule will exclude certain classes or packages from this rule.


Naming convention

All the classes and/or packages in the specified module must meet to the specified Regular Expression (see table 1). The regular expressions are case-sensitive. An exception on this rule will exclude certain classes or packages from this rule.


Regex Validates True/false
*Friends* domain.locationbased.foursquare.History
domain.locationbased.latitude.Friends
infrastructure.socialmedia.locationbased.foursquare.FriendsDAO
infrastructure.socialmedia.locationbased.foursquare.MyFriendsDAO
false
true
true
true
*Account domain.locationbased.foursquare.MyAccount
domain.locationbased.latitude.Map
infrastructure.socialmedia.locationbased.foursquare.AccountDAO
true
false
false
DAO* infrastructure.socialmedia.locationbased.foursquare.DAOFourSquare
infrastructure.socialmedia.locationbased.foursquare.IMap
domain.locationbased.foursquare.History
true
false
false

 overview of possible regexes for the naming convention rule type


The first regex enforces that a class/package must contain the word ‘Friends’ in the name.
The second regex enforces that a class/package must contain the word ‘Friends anywhere in the name.
The third regex enforces that a class/package must end with the word ‘Account’.
The fourth regex enforces that all the classes and/or packages must start with the word ‘DAO’.

Visibilty convention

All the classes and/or packages in the specified module must have the specified visibility or lower. The possible exceptions are:


Relation rule types

Is allowed to use

This rule can only be defined as exception rule. All the classes/packages between two logical modules are allowed to have a dependency. This is normally the case, so it can only be defined as an exception rule.


Is not allowed to use

This rule can only be defined as exception rule. All the classes/packages between two logical modules are allowed to have a dependency. This is normally the case, so it can only be defined as an exception rule.


Is only allowed to use

One defined logical module is only allowed to have dependencies with another defined logical module. The possible exception is to define is a ‘is allowed to use’ rule.


Is only module allowed to use

Of all defined logical modules, only one logical module may have dependencies with another specified logical module. There are no possible exception rules.


Must use

At least one class/package between two logical modules must have a dependency with each other. The possible exception is to define a ‘is allowed to use’ or a ‘is not allowed to use’ rule.


Is not allowed to make back-call

This rule can only be applied on modules of type layer (see for more information the manual of the define component). A layer may not have dependency with layers that are defined with a higher hierarchal level then the layer on which the rule is applied to. The possible exception is to define a ‘is allowed to use’ rule.


Is not allowed to make skip-call

This rule can only be applied on modules of type layer (see for more information the manual of the define component). A layer may not have dependency with layers that are defined with a lower hierarchal level then the layer on which the rule is applied to, except for the layer that is directly under the layer on which the rule is applied to. The possible exception is to define a ‘is allowed to use’ rule.