you can try this:
MetaDataUtil.getMetaData(node).setActivated();

i am not sure if it works.

if not you have to call a existing command or your own. here an example:

                String parentPath = 
StringUtils.substringBeforeLast(node.getHandle(), "/");
                Syndicator syndicator = 
Components.getComponentProvider().newInstance(Syndicator.class);
                
                DataActivateAllCommand cmd = new DataActivateAllCommand();
                cmd.setRepository("data");
                cmd.setPath(node.getHandle());
                
                Rule rule = new Rule();
                syndicator.init(MgnlContext.getUser(), "data", 
node.getWorkspace().getName(), rule);                    
                syndicator.activate(parentPath, node);

                cmd.setPath(node.getHandle());
                cmd.setSyndicator(syndicator);
 
                cmd.execute(ctx);
                cmd.release();
                
                // only if you are using the workflow module
                InFlowWorkItem workItem = 
WorkflowUtil.getWorkItem(this.flowItemId);
                
WorkflowUtil.getWorkItemStore().removeWorkItem(workItem.getId());

 hope this helps

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=3c519731-aa88-43b6-9e16-1982a47b664f


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to