Class RoleUtil
java.lang.Object
io.wcm.devops.conga.generator.util.RoleUtil
Helper methods for managing roles.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanmatchesRoleFile(RoleFile roleFile, List<String> variants) Checks if the given role file should be generated for the given set of variants.Resolve role inheritance.
-
Method Details
-
resolveRole
public static Map<String,Role> resolveRole(String roleName, String environmentContext, Map<String, Role> roles) throws GeneratorExceptionResolve role inheritance. As a result one or multiple roles are returned that reflect the inheritanceship. File that are generated by both the sub and the super role are eliminated in the super role.- Parameters:
roleName- Role name - role may contain inheritance relationsenvironmentContext- Context information.roles- All roles for the system- Returns:
- Resolved role(s) without pending inheritance relations.
- Throws:
GeneratorException- when role or any of it's inheritance relations is not found
-
matchesRoleFile
Checks if the given role file should be generated for the given set of variants.- Parameters:
roleFile- Role filevariants- Variants select for a node- Returns:
- true if file should be rendered
-