[jboss-cvs] jboss-portal/cms/src/main/org/jboss/portal/cms/impl/jcr/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:    cms/src/main/org/jboss/portal/cms/impl/jcr/command 
                        FileGetCommand.java
  Log:
  JBPORTAL-947 - done.
  
  Revision  Changes    Path
  1.3       +7 -0      jboss-portal/cms/src/main/org/jboss/portal/cms/impl/jcr/command/FileGetCommand.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: FileGetCommand.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/cms/src/main/org/jboss/portal/cms/impl/jcr/command/FileGetCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- FileGetCommand.java	11 Jul 2006 20:50:26 -0000	1.2
  +++ FileGetCommand.java	11 Jul 2006 21:07:00 -0000	1.3
  @@ -30,6 +30,7 @@
   import org.jboss.portal.cms.impl.jcr.JCRCommand;
   import org.jboss.portal.cms.model.Content;
   import org.jboss.portal.cms.model.File;
  +import org.jboss.portal.cms.util.FileUtil;
   
   /**
    * Retrieves a file and its versioned, localized content.
  @@ -91,6 +92,12 @@
            File file = new FileImpl();
            Session session = context.getSession();
   
  +         boolean exists = session.itemExists(FileUtil.cleanDoubleSlashes(this.path + "/" + this.locale.getLanguage()));
  +         if (!exists)
  +         {
  +            return null;
  +         }
  +
            Node fileNode = (Node) session.getItem(this.path);
            fileNode = (Node) session.getItem(this.path);
            file.setCreationDate(fileNode.getProperty("jcr:created").getDate().getTime());
  
  
  



More information about the jboss-cvs-commits mailing list