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

Julien Viet julien at jboss.com
Tue Jul 11 16:50:26 EDT 2006


  User: julien  
  Date: 06/07/11 16:50:26

  Modified:    cms/src/main/org/jboss/portal/cms/impl/jcr/command  
                        DeleteCommand.java FileGetCommand.java
  Log:
  - make cms cache work
  - improve portal object deployment in ha mode
  
  Revision  Changes    Path
  1.2       +5 -1      jboss-portal/cms/src/main/org/jboss/portal/cms/impl/jcr/command/DeleteCommand.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DeleteCommand.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/cms/src/main/org/jboss/portal/cms/impl/jcr/command/DeleteCommand.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- DeleteCommand.java	15 May 2006 12:47:05 -0000	1.1
  +++ DeleteCommand.java	11 Jul 2006 20:50:26 -0000	1.2
  @@ -36,10 +36,14 @@
      private static final long serialVersionUID = -3714090346539111871L;
      String msPath;
   
  +   public String getPath()
  +   {
  +      return msPath;
  +   }
  +
      public DeleteCommand(String sPath)
      {
         this.msPath = sPath;
  -      setAttribute("path", sPath);
      }
   
      public Object execute()
  
  
  
  1.2       +26 -15    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.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- FileGetCommand.java	15 May 2006 12:47:05 -0000	1.1
  +++ FileGetCommand.java	11 Jul 2006 20:50:26 -0000	1.2
  @@ -40,9 +40,9 @@
   {
      /** The serialVersionUID */
      private static final long serialVersionUID = 7912459435886700650L;
  -   String msPath;
  -   String msVersionNumber;
  -   Locale mlocale;
  +   String path;
  +   String versionNumber;
  +   Locale locale;
   
      /**
       * Retrieves the "LIVE" version of the file. Useful for serving content.
  @@ -63,13 +63,24 @@
       */
      public FileGetCommand(String sPath, String sVersionNumber, Locale locale)
      {
  -      setAttribute("path", sPath);
  -      setAttribute("versionNumber", sVersionNumber);
  -      setAttribute("locale", locale);
  -      
  -      this.msPath = sPath;
  -      this.msVersionNumber = sVersionNumber;
  -      this.mlocale = locale;
  +      this.path = sPath;
  +      this.versionNumber = sVersionNumber;
  +      this.locale = locale;
  +   }
  +
  +   public String getPath()
  +   {
  +      return path;
  +   }
  +
  +   public String getVersionNumber()
  +   {
  +      return versionNumber;
  +   }
  +
  +   public Locale getLocale()
  +   {
  +      return locale;
      }
   
      public Object execute()
  @@ -80,20 +91,20 @@
            File file = new FileImpl();
            Session session = context.getSession();
   
  -         Node fileNode = (Node) session.getItem(this.msPath);
  -         fileNode = (Node) session.getItem(this.msPath);
  +         Node fileNode = (Node) session.getItem(this.path);
  +         fileNode = (Node) session.getItem(this.path);
            file.setCreationDate(fileNode.getProperty("jcr:created").getDate().getTime());
            file.setLastModified(fileNode.getProperty("jcr:lastModified").getDate().getTime());
  -         file.setBasePath(this.msPath);
  +         file.setBasePath(this.path);
            file.setName(fileNode.getName());
   
            // get content
            Content content = null;
            try
            {
  -            JCRCommand contentGetCMD = (JCRCommand) context.getCommandFactory().createContentGetCommand(this.msPath, this.msVersionNumber, this.mlocale);
  +            JCRCommand contentGetCMD = (JCRCommand) context.getCommandFactory().createContentGetCommand(this.path, this.versionNumber, this.locale);
               content = (Content) context.execute(contentGetCMD);
  -            file.setContent(this.mlocale, content);
  +            file.setContent(this.locale, content);
            }
            catch (Exception ignore)
            {
  
  
  



More information about the jboss-cvs-commits mailing list