[jboss-cvs] jboss-portal/core/src/main/org/jboss/portal/core/cms/command ...

Roy Russo russo at jboss.com
Tue Jul 11 17:07:00 EDT 2006


  User: russo   
  Date: 06/07/11 17:07:00

  Modified:    core/src/main/org/jboss/portal/core/cms/command 
                        StreamContentCommand.java
  Log:
  JBPORTAL-947 - done.
  
  Revision  Changes    Path
  1.14      +11 -2     jboss-portal/core/src/main/org/jboss/portal/core/cms/command/StreamContentCommand.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: StreamContentCommand.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/core/src/main/org/jboss/portal/core/cms/command/StreamContentCommand.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- StreamContentCommand.java	15 May 2006 12:44:30 -0000	1.13
  +++ StreamContentCommand.java	11 Jul 2006 21:07:00 -0000	1.14
  @@ -27,10 +27,10 @@
   import org.jboss.portal.cms.Command;
   import org.jboss.portal.cms.model.Content;
   import org.jboss.portal.cms.model.File;
  +import org.jboss.portal.common.invocation.InvocationException;
   import org.jboss.portal.core.command.CommandInfo;
   import org.jboss.portal.core.command.ControllerCommand;
   import org.jboss.portal.server.ServerInvocation;
  -import org.jboss.portal.common.invocation.InvocationException;
   
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
  @@ -78,6 +78,7 @@
            MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
            CMS CMSService = (CMS) MBeanProxy.get(CMS.class, new ObjectName("portal:service=CMS"), mbeanServer);
   
  +/*
            Command itemExistsCMD = CMSService.getCommandFactory().createItemExistsCommand(path + "/" + serverInvocation.getRequest().getLocale().getLanguage());
            Boolean bExists = (Boolean) CMSService.execute(itemExistsCMD);
            Command getCMD;
  @@ -89,8 +90,16 @@
            {
               getCMD = CMSService.getCommandFactory().createFileGetCommand(path, new Locale(CMSService.getDefaultLocale()));
            }
  -
  +*/
  +         Command getCMD = CMSService.getCommandFactory().createFileGetCommand(path, serverInvocation.getRequest().getLocale());
            File file = (File) CMSService.execute(getCMD);
  +         if(file == null)
  +         {
  +            getCMD = CMSService.getCommandFactory().createFileGetCommand(path, new Locale(CMSService.getDefaultLocale()));
  +            file = (File) CMSService.execute(getCMD);
  +         }
  +
  +//         File file = (File) CMSService.execute(getCMD);
            Content content = file.getContent();
   
            resp.setContentType(content.getMimeType());
  
  
  



More information about the jboss-cvs-commits mailing list