Page History
...
Code Block | ||
---|---|---|
| ||
 contentManager.delete(contentId);
|
Move content
The following example shows how to move content between content managers:
Code Block | ||
---|---|---|
| ||
// Get the active user data
IUserData userData = context.getSessionScope().getActiveUser();
// Pre-emptive check if the both content managers are the of the same implemation so we can check if can move the files.
// This is should also be done in the move function of the IContentManager.
if (!sourceContentManager.getImplementation().getClass().equals(targetImplementation.getImplementation().getClass())) {
// Both content managers require the same implementation to perform a direct move.
return null;
}
GUID newContentId = sourceContentManager.move(targetContentManager, contentId, userData); |
Overview
Content Tools