public Collection<JcrPropertyDefinition> getMandatoryPropertyDefinitions( Name primaryType,
                                                                              Set<Name> mixinTypes ) {
        if (mixinTypes.isEmpty()) {
            return mandatoryPropertiesNodeTypes.get(primaryType);
        }
        Set<JcrPropertyDefinition> defn = new HashSet<JcrPropertyDefinition>();
        defn.addAll(mandatoryPropertiesNodeTypes.get(primaryType));
        for (Name mixinType : mixinTypes) {
            defn.addAll(mandatoryPropertiesNodeTypes.get(mixinType));
        }
        return defn;
    }
public Collection < JcrPropertyDefinition > getMandatoryPropertyDefinitions ( Name primaryType , Set < Name > mixinTypes ) { if ( mixinTypes . isEmpty ( ) ) { return mandatoryPropertiesNodeTypes . get ( primaryType ) ; } Set < JcrPropertyDefinition > defn = new HashSet < JcrPropertyDefinition > ( ) ; defn . addAll ( mandatoryPropertiesNodeTypes . get ( primaryType ) ) ; for ( Name mixinType : mixinTypes ) { defn . addAll ( mandatoryPropertiesNodeTypes . get ( mixinType ) ) ; } return defn ; }
Get the mandatory property definitions for a node with the named primary type and mixin types. Note that the
{@link #hasMandatoryPropertyDefinitions(Name, Set)} method should first be called with the primary type and mixin types; if
that method returns <code>true</code>, then this method will never return an empty collection.

@param primaryType the primary type name; may not be null
@param mixinTypes the mixin type names; may not be null but may be empty
@return the collection of mandatory property definitions; never null but possibly empty