com.greenpepper.confluence.actions.execution.ChildrenExecutionAction Maven / Gradle / Ivy
package com.greenpepper.confluence.actions.execution;
import java.util.List;
import com.atlassian.confluence.pages.Page;
/**
* ChildrenExecutionAction class.
*
* @author oaouattara
* @version $Id: $Id
*/
@SuppressWarnings("serial")
public class ChildrenExecutionAction extends AbstractListExecutionAction
{
protected boolean allChildren;
/**
* buildExecutableList.
*/
@SuppressWarnings("unchecked")
public void buildExecutableList()
{
fillExecutableList(page);
}
/**
* Getter for the field allChildren
.
*
* @return a boolean.
*/
public boolean getAllChildren()
{
return allChildren;
}
/**
* Setter for the field allChildren
.
*
* @param allChildren a boolean.
*/
public void setAllChildren(boolean allChildren)
{
this.allChildren = allChildren;
}
private void fillExecutableList(Page page)
{
List pageChildren = getPermittedChildren(page);
for(Page child : pageChildren)
{
if(gpUtil.isExecutable(child))
{
executableList.add(child);
}
if(getAllChildren())
{
fillExecutableList(child);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy