Hi,
On 7/1/06, Eric Peukert <[EMAIL PROTECTED]> wrote:
I try to convert a node and its node-type after it was already created.
Does anyone have an idea how that can be achieved?
You can add or remove the mixin types of a node, but you can not
change its primary type. The best way to achieve the what you are
trying to do, is make an in-memory copy of the node content, remove
the node from the workspace, and create a new node with the copied
content but a different primary type.
What is your use case for trying to do this? The primary type is a
fundamental property of a node, even more than its name that can be
changed with Session.move(). You can think of the primary type of a
node as the class of a Java object, i.e. there is no way to change
that short of making a manual copy of the instance.
If this is common use case for you, you might want to consider having
a more generic primary type and using mixin types for dynamic node
typing.
BR,
Jukka Zitting
--
Yukatan - http://yukatan.fi/ - [EMAIL PROTECTED]
Software craftsmanship, JCR consulting, and Java development