Search in sources :

Example 1 with CreateRootNodeParams

use of com.enonic.xp.node.CreateRootNodeParams in project xp by enonic.

the class LoadNodeCommand method loadRootNode.

private LoadNodeResult loadRootNode() {
    final CreateRootNodeParams createRootNodeParams = CreateRootNodeParams.create().permissions(params.getNode().getPermissions()).childOrder(params.getNode().getChildOrder()).build();
    final Node node = CreateRootNodeCommand.create(this).params(createRootNodeParams).build().execute();
    return LoadNodeResult.create().node(node).build();
}
Also used : Node(com.enonic.xp.node.Node) CreateRootNodeParams(com.enonic.xp.node.CreateRootNodeParams)

Example 2 with CreateRootNodeParams

use of com.enonic.xp.node.CreateRootNodeParams in project xp by enonic.

the class AbstractNodeTest method createDefaultRootNode.

protected Node createDefaultRootNode() {
    final AccessControlList rootPermissions = AccessControlList.of(AccessControlEntry.create().principal(TEST_DEFAULT_USER.getKey()).allowAll().build());
    final CreateRootNodeParams createRootParams = CreateRootNodeParams.create().permissions(rootPermissions).build();
    return CreateRootNodeCommand.create().params(createRootParams).indexServiceInternal(this.indexServiceInternal).storageService(this.storageService).searchService(this.searchService).build().execute();
}
Also used : AccessControlList(com.enonic.xp.security.acl.AccessControlList) CreateRootNodeParams(com.enonic.xp.node.CreateRootNodeParams)

Aggregations

CreateRootNodeParams (com.enonic.xp.node.CreateRootNodeParams)2 Node (com.enonic.xp.node.Node)1 AccessControlList (com.enonic.xp.security.acl.AccessControlList)1