com.ibm.portal.model.command.instantiation
Interface InstantiateTemplateContentNodeCommand
- All Superinterfaces:
- Command, Disposable
public interface InstantiateTemplateContentNodeCommand
- extends Command
This interface defines a command that is called when a template page is
instantiated.
Implementations of this interface must use the ContentModelController
provided by InstantiateTemplateContentNodeCommand.Context.getContentModelController()
to modify the content
model as the new ContentNode has been inserted into that model but the
insertion is not yet committed.
Implementations must not call commit() or dispose() on that model.
Implementations for the InstantiateTemplateContentNodeCommand
need to
provide an implementation of interface CommandInstantiator
as well.
That CommandInstantiator implementation needs to be registered at plug point
com.ibm.portal.model.command.provider.instantiation
as shown in
sample below.
Example fragment of a plugin.xml
that registers the associated
Instantiator implementation for interface
<extension
point="com.ibm.portal.model.command.provider.instantiation"
id="MyTemplateInstantiationCommand">
<factory
class="MyCommandInstantiatorClassName"/>
</extension>
- Since:
- 8.0
- Note:
This interface is designed to be implemented by clients. |
instantiatingTemplateContentNode
void instantiatingTemplateContentNode(ContentNode templateNode,
ContentNode targetNode)
throws ModelException,
SerializationException,
java.io.IOException
- This plug point's method is called after the specified targetNode has
been inserted into the target content model but before the change is
being committed. If this method throws an exception, the target
ContentModelController will not be committed.
- Parameters:
templateNode
- The ContentNode that has been instantiated, not
null
targetNode
- The newly created ContentNode, not null
- Throws:
ModelException
SerializationException
java.io.IOException