[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Is the INHERITANCE_COL value useful ?



On 07/11/2013 05:05 AM, Emmanuel LÃcharny wrote:
in the OrgUnitTestData, we declare all the elements with such a value :
"", /* INHERITANCE_COL */

which is used by the getInheritances() method. In other words, this
value is always "". So my question : is there a case where we would like
to add a non-empty value ?


The inheritance column is used to define inheritance relationships between organizational hierarchies during junit test cases. In Fortress there are three ways to add inheritance relationship (this applies to roles, adminRoles and organizations):

1. addAscendant - This command creates a new parent, and inserts it in the hierarchy as an immediate ascendant of the existing child node. 2. addDescendant - This command creates a new child, and inserts it in the hierarchy as an immediate descendant of the existing parent. 3. addInheritance - This command establishes a new immediate inheritance relationship with parent <<-- child

For these different ways of modifying a relationship, the INHERITANCE_COL applies to #3 above. That is to say it adds a relationship between two existing nodes, as opposed to one or the other already being present.

As of today the INHERITANCE_COL is not actually being used by the organizational junit tests, rather the relationships are being constructed during tests using #1 or #2 means. That being said the organizational test functions interrogate the value of INHERITANCE_COL and will call the #3 API if/when that field gets set. For some reason we never actually added test cases that use it. We will need to correct this mistake. Thanks for bringing it to my attention.

Shawn