2.15.3.1. Migration of navigation node URL

Using free form node

The previous code for creating navigation node was:

String uri = Util.getPortalRequestContext().getPortalURI() + "home";

The new code will look like:

PortalURL nodeURL = nodeurl();

NavigationResource resource = new NavigationResource(SiteType.PORTAL, pcontext.getPortalOwner(), "home");
String uri = nodeURL.setResource(resource).toString();

Using UserNode object

The previous code for creating navigation node was:

UserNode node = ...;

String uri = Util.getPortalRequestContext().getPortalURI() + node.getURI()";

The new code will look like:

UserNode node = ...;

PortalURL nodeURL = nodeurl();
String uri = nodeURL.setNode(node).toString();
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus