use of com.agiletec.aps.system.common.tree.ITreeNode in project entando-core by entando.
the class TestHypertextAttributeAction method testConfigPageLink_1.
public void testConfigPageLink_1() throws Throwable {
this.initIntroPageLink("admin", "ART1");
ITreeNode root = ((PageTreeAction) this.getAction()).getAllowedTreeRootNode();
assertNotNull(root);
assertEquals("homepage", root.getCode());
assertEquals(3, root.getChildrenCodes().length);
}
use of com.agiletec.aps.system.common.tree.ITreeNode in project entando-core by entando.
the class TestHypertextAttributeAction method checkTestOpenPageTree_ART102.
private void checkTestOpenPageTree_ART102() throws Throwable {
ITreeNode root = ((PageTreeAction) this.getAction()).getAllowedTreeRootNode();
assertNotNull(root);
assertEquals("homepage", root.getCode());
assertEquals(4, root.getChildrenCodes().length);
ITreeNode showableRoot = ((PageTreeAction) this.getAction()).getShowableTree();
assertEquals("homepage", showableRoot.getCode());
assertEquals(4, showableRoot.getChildrenCodes().length);
}
use of com.agiletec.aps.system.common.tree.ITreeNode in project entando-core by entando.
the class TestHypertextAttributeAction method testOpenPageTree_1.
public void testOpenPageTree_1() throws Throwable {
this.openTree("admin", "ART1", "homepage");
ITreeNode root = ((PageTreeAction) this.getAction()).getAllowedTreeRootNode();
assertNotNull(root);
assertEquals("homepage", root.getCode());
assertEquals(3, root.getChildrenCodes().length);
ITreeNode showableRoot = ((PageTreeAction) this.getAction()).getShowableTree();
assertEquals("homepage", showableRoot.getCode());
assertEquals(3, showableRoot.getChildrenCodes().length);
}
use of com.agiletec.aps.system.common.tree.ITreeNode in project entando-core by entando.
the class TestPageLinkAction method testConfigPageLink_1.
public void testConfigPageLink_1() throws Throwable {
String contentOnSessionMarker = this.initJoinLinkTest("admin", "ART1", "VediAnche", "it");
this.initContentAction("/do/jacms/Content/Link", "configPageLink", contentOnSessionMarker);
String result = this.executeAction();
assertEquals(Action.SUCCESS, result);
ITreeNode root = ((PageTreeAction) this.getAction()).getAllowedTreeRootNode();
assertNotNull(root);
assertEquals("homepage", root.getCode());
assertEquals(3, root.getChildrenCodes().length);
ITreeNode showableRoot = ((PageTreeAction) this.getAction()).getShowableTree();
assertEquals("homepage", showableRoot.getCode());
assertEquals(0, showableRoot.getChildrenCodes().length);
}
use of com.agiletec.aps.system.common.tree.ITreeNode in project entando-core by entando.
the class PageFinderAction method getShowableTree.
@Override
public ITreeNode getShowableTree() {
ITreeNode node = null;
try {
this.searchPages();
ITreeNode allowedTree = this.getAllowedTreeRootNode();
node = this.getTreeHelper().getShowableTree(this.getTreeNodesToOpen(), allowedTree, this.getActualAllowedGroupCodes());
} catch (Throwable t) {
_logger.error("error in getShowableTree", t);
}
return node;
}
Aggregations