-
- if(content instanceof JcrContent) {
- Node context = ((JcrContent)content).getJcrNode();
- try {
- // mixins
- Set<String> types = new TreeSet<>();
- for (NodeType mixinType : context.getMixinNodeTypes()) {
- String mixinTypeName = mixinType.getName();
- if (byType.containsKey(mixinTypeName)) {
- types.add(mixinTypeName);
+
+ if (content instanceof JcrContent) {
+ Node context = ((JcrContent) content).getJcrNode();
+ try {
+ // mixins
+ Set<String> types = new TreeSet<>();
+ for (NodeType mixinType : context.getMixinNodeTypes()) {
+ String mixinTypeName = mixinType.getName();
+ if (byType.containsKey(mixinTypeName)) {
+ types.add(mixinTypeName);
+ }
+ for (NodeType superType : mixinType.getDeclaredSupertypes()) {
+ if (byType.containsKey(superType.getName())) {
+ types.add(superType.getName());
+ }
+ }
+ }
+ // primary node type
+ NodeType primaryType = context.getPrimaryNodeType();
+ String primaryTypeName = primaryType.getName();
+ if (byType.containsKey(primaryTypeName)) {
+ types.add(primaryTypeName);