OK, I found it... looked in jboss-service.xml and then the stuff below works if you wrap in a transaction.
MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
customManager = (CustomizationManager)MBeanProxy.get(CustomizationManager.class,
new ObjectName("portal:service=CustomizationManager"), mbeanServer);
userModule = (UserModule)MBeanProxy.get(UserModule.class,
new ObjectName("portal:service=Module,type=User"), mbeanServer);
User user = userModule.findUserByUserName(request.getRemoteUser());
Portal portal = customManager.getDashboard(user);
What are you trying to achieve ?
We are trying to replace the edit dashboard screen with a simple drop-down panel that would allow one to add a portlet to a dashboard page.
We've also added a delete button to the window decoration for dashboard portlets to allow folks to easily remove a portlet.
Ajax extension, wow cool, if you do it, please give us your stuff, we could integrate them with portal.
You should use core commands to achieve the different effects as the WindowMoveCommand do. That way you would have a WindowDestroyCommand and probably a WindowAddCommand.
While the example I referenced before was for dashboards, I'd hope that something like this would work with non-dashboard pages. I've not tried this however, as we define static portal pages via the portal-object.xml. This example assumes you want to implement via a servlet, rather than a portlet.
MBeanServer mbeanServer = MBeanServerLocator.locateJBoss(); portalObjectContainer = (PortalObjectContainer)MBeanProxy.get(PortalObjectContainer.class, new ObjectName("portal:container=PortalObject"), mbeanServer); Portal portal = portalObjectContainer.getContext().getPortal(portalName); Page page = portal.getPage(pageName); Window win = page.createWindow(winName, ContentType.PORTLET, instanceID); win.setDeclaredProperty("theme.region", "left"); win.setDeclaredProperty("theme.order", "0");