Need info of updateRolloutInfo implementation of RolloutManager | Community
Skip to main content
Level 2
August 31, 2022
Solved

Need info of updateRolloutInfo implementation of RolloutManager

  • August 31, 2022
  • 1 reply
  • 864 views

In com.day.cq.wcm.msm.api.RolloutManager,  updateRolloutInfo method as per documentation it says Update rollout info on the node.

 

Can I know what are the properties in the node it is updating?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Dillibabu77

Hi,

I did not find the documentation about it.

You can decompile this bundle and check the exact implementation to know more in details.


Hi Arun 

I found in the implementation class what the method it is doing.

 

public void updateRolloutInfo(final Node node, final boolean deepUpdate, final boolean autoSave) throws WCMException {
final RolloutExceptionHandler.RolloutInfo info = new RolloutExceptionHandler.RolloutInfo();
try {
info.operation = "updateRolloutInfo";
info.src = node.getPath();
info.target = node.getPath();
info.user = node.getSession().getUserID();
if (!this.isExcludedNode(node)) {
if (node.isNodeType("cq:LiveRelationship")) {
node.setProperty("cq:lastRolledout", Calendar.getInstance());
node.setProperty("cq:lastRolledoutBy", node.getSession().getUserID());
}
if (deepUpdate) {
final NodeIterator iter = node.getNodes();
while (iter.hasNext()) {
final Node child = (Node)iter.next();
this.updateRolloutInfo(child, true, autoSave);
}
}
if (autoSave) {
node.getSession().save();
}
}
}
catch (RepositoryException re) {
if (!this.rolloutExceptionHandler.handleException((Exception)re, info)) {
RolloutManagerImpl.log.error("Error while updating rollout info", (Throwable)re);
throw new WCMException("Error while updating rollout info", (Throwable)re);
}
}
catch (WCMException we) {
if (!this.rolloutExceptionHandler.handleException((Exception)we, info)) {
throw we;
}
}
}
 
Thanks for helping me.
 
Thanks
Dillibabu

1 reply

arunpatidar
Community Advisor
Community Advisor
September 1, 2022
Page rolloutthispage = pageManager.getPage("/content/geometrixx/en/toolbar"); //source page
RolloutManager.RolloutParams rolloutparams = new RolloutManager.RolloutParams();
rolloutparams.master = rolloutthispage; 
rolloutparams.isDeep = true;
//rolloutmanager is an OSGI service so using here sling.getService to have a reference
com.day.cq.wcm.msm.api.RolloutManager rolloutManager = sling.getService(com.day.cq.wcm.msm.api.RolloutManager.class);
rolloutManager.rollout(rolloutparams);

 

void updateRolloutInfo(Node node,
                       boolean deepUpdate,
                       boolean autoSave)
                throws WCMException
Update rollout info on the node. To use after a rollout operation.
Parameters:
node - Node to update
deepUpdate - Children of the node can be updated by setting deepUpdate to true.
autoSave - Save modifications

Page rolloutthispage = pageManager.getPage("/content/livecopy/en/toolbar"); //livecopy page com.day.cq.wcm.msm.api.RolloutManager rolloutManager = sling.getService(com.day.cq.wcm.msm.api.RolloutManager.class); rolloutManager.updateRolloutInfo(rolloutthispage.adaptTo(Node.class),true,true);

 

Arun Patidar
Level 2
September 1, 2022

Hi Arun

 

I did the same  But one thing I need to know is which all properties are created or updated on the node after updateRollOutinfo.I am not able to find the exact implementation class to check those. If you can let me know, it would be helpful.

 

 

Thanks

Dillibabu

arunpatidar
Community Advisor
Community Advisor
September 1, 2022

Hi,

I did not find the documentation about it.

You can decompile this bundle and check the exact implementation to know more in details.

Arun Patidar