User user = (managedUser == null || managedUser.getUserName() == null) ? User.anonymous() : new User(managedUser.getUserName());
final PortalContainer container = PortalContainer.getInstance();
final WebAppController controller = (WebAppController) container.getComponentInstanceOfType(WebAppController.class);
URIResolver uriResolver = new URIResolver() {
@Override
public String resolveURI(SiteId siteId) {
SiteKey siteKey = Util.from(siteId);
NavigationResource navResource = new NavigationResource(siteKey, "");
SimpleURL url = new SimpleURL(new SimpleURLContext(container, controller));