Hi
If I am not mistaken this is how it works: if a node type (mixin or not) is
defined to be the super type of another node type, that node type inherits the
characteristic of the super type (mixin or not)... in case of a mixin that
mixin then doesn't need to be added explicitly.
In other words: if Node n is of type 'nt', which extends from 'mixin', then
n.isNodeType('mixin') will return true.
Here the javadoc of Node.isNodeType(String):
/**
* Returns <code>true</code> if this node is of the specified primary node
* type or mixin type, or a subtype thereof. Returns <code>false</code>
* otherwise.
* <p>
* This method respects the effective node type of the node.
*
* @param nodeTypeName the name of a node type.
* @return <code>true</code> If this node is of the specified primary node
* type or mixin type, or a subtype thereof. Returns
* <code>false</code> otherwise.
* @throws RepositoryException if an error occurs.
*/
public boolean isNodeType(String nodeTypeName) throws RepositoryException;
hope that helps
angela
________________________________
From: Andreas Schaefer <[email protected]>
Sent: Thursday, March 12, 2020 4:32 PM
To: [email protected] <[email protected]>
Subject: Mixins and Super Types
Hi
I created a Mixin and added it to Node Types as super type. Then I tried to add
it as Mixin with Node.addMixin(mixin-name) but that does nothing. Looking at
the TreeUtil.addMixin() I see that in that case no mixin is added.
My question is that when a mixin is a super type of a node type then there is
no need to add it as jar:mxinTypes?
- Andy