[jboss-cvs] jboss-portal/core/src/main/org/jboss/portal/core/portlet/management/actions ...
Julien Viet
julien at jboss.com
Thu Aug 10 20:24:36 EDT 2006
User: julien
Date: 06/08/10 20:24:36
Modified: core/src/main/org/jboss/portal/core/portlet/management/actions
PortalAction.java
Log:
create correct initial portal state from the management portlet
Revision Changes Path
1.3 +16 -3 jboss-portal/core/src/main/org/jboss/portal/core/portlet/management/actions/PortalAction.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PortalAction.java
===================================================================
RCS file: /cvsroot/jboss/jboss-portal/core/src/main/org/jboss/portal/core/portlet/management/actions/PortalAction.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- PortalAction.java 28 Jul 2006 10:45:16 -0000 1.2
+++ PortalAction.java 11 Aug 2006 00:24:36 -0000 1.3
@@ -32,6 +32,8 @@
import org.jboss.portal.security.SecurityConstants;
import org.jboss.portal.theme.ThemeConstants;
import org.jboss.portal.server.PortalConstants;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.Mode;
import javax.faces.context.FacesContext;
import javax.faces.component.UIComponent;
@@ -44,7 +46,7 @@
/**
* @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw Dawidowicz</a>
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class PortalAction
{
@@ -145,7 +147,7 @@
Portal portal = context.createPortal(portalName);
DomainConfigurator configurator = pomgr.getDomainConfigurator();
- //initial portal permissions
+ // Initial portal permissions
Set actions = new HashSet();
actions.add(PortalObjectPermission.VIEW_ACTION);
actions.add(PortalObjectPermission.PERSONALIZE_RECURSIVE_ACTION);
@@ -153,12 +155,23 @@
Set constraints = Collections.singleton(binding);
configurator.setBindings(portal.getId(), constraints);
- //we need to add initial layout sets to avoid problems...
+ // We need to add initial layout sets to avoid problems...
portal.setDeclaredProperty(ThemeConstants.PORTAL_PROP_LAYOUT, "generic");
portal.setDeclaredProperty(ThemeConstants.PORTAL_PROP_THEME, "Nphalanx");
portal.setDeclaredProperty(ThemeConstants.PORTAL_PROP_RENDERSET, "divRenderer");
portal.setDeclaredProperty(ThemeConstants.PORTAL_PROP_STRATEGY, "maximizedRegion");
+ //
+ portal.getSupportedWindowStates().add(WindowState.MAXIMIZED);
+ portal.getSupportedWindowStates().add(WindowState.MINIMIZED);
+ portal.getSupportedWindowStates().add(WindowState.NORMAL);
+
+ //
+ portal.getSupportedModes().add(Mode.EDIT);
+ portal.getSupportedModes().add(Mode.HELP);
+ portal.getSupportedModes().add(Mode.VIEW);
+
+ // Create the default page
Page page = portal.createPage("default");
constraints = Collections.singleton(new RoleSecurityBinding(PortalObjectPermission.VIEW_RECURSIVE_ACTION, SecurityConstants.UNCHECKED_ROLE_NAME));
configurator.setBindings(page.getId(), constraints);
More information about the jboss-cvs-commits
mailing list