[jboss-cvs] jboss-portal/core/src/main/org/jboss/portal/core/portlet/management/actions ...

Boleslaw Dawidowicz bdaw at o2.pl
Fri Jul 28 06:45:17 EDT 2006


  User: bdaw    
  Date: 06/07/28 06:45:16

  Modified:    core/src/main/org/jboss/portal/core/portlet/management/actions 
                        PortalAction.java
  Log:
  management- creating new portal adds a default page
  
  Revision  Changes    Path
  1.2       +7 -0      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.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- PortalAction.java	27 Jul 2006 12:36:03 -0000	1.1
  +++ PortalAction.java	28 Jul 2006 10:45:16 -0000	1.2
  @@ -26,6 +26,7 @@
   import org.jboss.portal.core.model.portal.Context;
   import org.jboss.portal.core.model.portal.Portal;
   import org.jboss.portal.core.model.portal.PortalObject;
  +import org.jboss.portal.core.model.portal.Page;
   import org.jboss.portal.security.spi.provider.DomainConfigurator;
   import org.jboss.portal.security.RoleSecurityBinding;
   import org.jboss.portal.security.SecurityConstants;
  @@ -43,7 +44,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.1 $
  + * @version $Revision: 1.2 $
    */
   public class PortalAction
   {
  @@ -158,6 +159,12 @@
            portal.setDeclaredProperty(ThemeConstants.PORTAL_PROP_RENDERSET, "divRenderer");
            portal.setDeclaredProperty(ThemeConstants.PORTAL_PROP_STRATEGY, "maximizedRegion");
   
  +         Page page = portal.createPage("default");
  +         constraints = Collections.singleton(new RoleSecurityBinding(PortalObjectPermission.VIEW_RECURSIVE_ACTION, SecurityConstants.UNCHECKED_ROLE_NAME));
  +         configurator.setBindings(page.getId(), constraints);
  +
  +         portal.setDeclaredProperty(PortalObject.PORTAL_PROP_DEFAULT_OBJECT_NAME, page.getName());
  +
         }
         catch (Exception e)
         {
  
  
  



More information about the jboss-cvs-commits mailing list