portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl FolderImpl.java
Date Wed, 08 Sep 2004 20:48:06 GMT
weaver      2004/09/08 13:48:06

  Modified:    components/page-manager/src/java/META-INF page-mapping.xml
               components/page-manager/testdata/pages/folder1/folder3
                        default-page.psml folder.metadata Jetspeed2.link
               components/page-manager/src/test/org/apache/jetspeed/page
                        TestCastorXmlPageManager.java
               components/page-manager/src/java/org/apache/jetspeed/page/document
                        CastorFileSystemDocumentHandler.java
                        AbstractNode.java
               components/page-manager/src/java/org/apache/jetspeed/om/folder/impl
                        FolderImpl.java
  Log:
  Added support for hidden nodes (Folder, Page and Link).
  
  Revision  Changes    Path
  1.4       +12 -0     jakarta-jetspeed-2/components/page-manager/src/java/META-INF/page-mapping.xml
  
  Index: page-mapping.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/page-manager/src/java/META-INF/page-mapping.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- page-mapping.xml	3 Sep 2004 13:19:45 -0000	1.3
  +++ page-mapping.xml	8 Sep 2004 20:48:06 -0000	1.4
  @@ -10,6 +10,10 @@
       <field name="acl" type="java.lang.String">
         <bind-xml name="acl" node="attribute"/>
       </field>
  +    
  +    <field name="hidden" type="boolean">
  +      <bind-xml name="hidden" node="attribute"/>
  +    </field>
   
       <field name="title" type="java.lang.String">
         <bind-xml name="title"/>
  @@ -108,6 +112,10 @@
       <field name="target" type="java.lang.String">
         <bind-xml name="target" node="attribute"/>
       </field>
  +    
  +     <field name="hidden" type="boolean">
  +      <bind-xml name="hidden" node="attribute"/>
  +    </field>
   
       <field name="title" type="java.lang.String">
         <bind-xml name="title"/>
  @@ -125,6 +133,10 @@
   
       <field name="acl" type="java.lang.String">
         <bind-xml name="acl" node="attribute"/>
  +    </field>
  +    
  +     <field name="hidden" type="boolean">
  +      <bind-xml name="hidden" node="attribute"/>
       </field>    
   
       <field name="title" type="java.lang.String">
  
  
  
  1.2       +1 -1      jakarta-jetspeed-2/components/page-manager/testdata/pages/folder1/folder3/default-page.psml
  
  Index: default-page.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/page-manager/testdata/pages/folder1/folder3/default-page.psml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- default-page.psml	14 Jul 2004 21:09:54 -0000	1.1
  +++ default-page.psml	8 Sep 2004 20:48:06 -0000	1.2
  @@ -14,7 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
   -->
  -<page id="p001">
  +<page id="p001" hidden="true">
     <defaults
        skin="light-blue"
        layout-decorator="clear"
  
  
  
  1.2       +1 -1      jakarta-jetspeed-2/components/page-manager/testdata/pages/folder1/folder3/folder.metadata
  
  Index: folder.metadata
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/page-manager/testdata/pages/folder1/folder3/folder.metadata,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- folder.metadata	3 Sep 2004 13:22:06 -0000	1.1
  +++ folder.metadata	8 Sep 2004 20:48:06 -0000	1.2
  @@ -1,5 +1,5 @@
   <?xml version="1.0" encoding="UTF-8"?>
  -<folder>
  +<folder hidden="true">
     <title >Folder 3</title>  
     <documentOrder>Jetspeed2Wiki.link</documentOrder>
     <documentOrder>Jetspeed2.link</documentOrder>  
  
  
  
  1.2       +1 -1      jakarta-jetspeed-2/components/page-manager/testdata/pages/folder1/folder3/Jetspeed2.link
  
  Index: Jetspeed2.link
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/page-manager/testdata/pages/folder1/folder3/Jetspeed2.link,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Jetspeed2.link	3 Sep 2004 13:22:06 -0000	1.1
  +++ Jetspeed2.link	8 Sep 2004 20:48:06 -0000	1.2
  @@ -1,4 +1,4 @@
  -<link target="top">
  +<link target="top" hidden="true">
    <title>Jetspeed 2 Home Page</title>
    <url>http://portals.apache.org/jetspeed-2/</url>
   </link>
  
  
  
  1.11      +4 -1      jakarta-jetspeed-2/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java
  
  Index: TestCastorXmlPageManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TestCastorXmlPageManager.java	3 Sep 2004 13:22:06 -0000	1.10
  +++ TestCastorXmlPageManager.java	8 Sep 2004 20:48:06 -0000	1.11
  @@ -367,7 +367,10 @@
           assertNotNull(folder3.getPages().get("test001.psml"));
           assertEquals("test001.psml", folder3.getPages().get("folder1/folder3/test001.psml").getName());
           
  -        //Test relative name
  +        assertTrue(folder3.isHidden());
  +        assertTrue(folder3.getPage("default-page.psml").isHidden());
  +        assertTrue(folder3.getLinks().get("Jetspeed2.link").isHidden());
  +        assertFalse(folder3.getLinks().get("apache.link").isHidden());
           
   
       }
  
  
  
  1.4       +2 -3      jakarta-jetspeed-2/components/page-manager/src/java/org/apache/jetspeed/page/document/CastorFileSystemDocumentHandler.java
  
  Index: CastorFileSystemDocumentHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/page-manager/src/java/org/apache/jetspeed/page/document/CastorFileSystemDocumentHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CastorFileSystemDocumentHandler.java	8 Sep 2004 13:54:54 -0000	1.3
  +++ CastorFileSystemDocumentHandler.java	8 Sep 2004 20:48:06 -0000	1.4
  @@ -245,8 +245,7 @@
               Unmarshaller unmarshaller = new Unmarshaller(this.mapping);
               document = (Document) unmarshaller.unmarshal(reader);
               document.setId(path);
  -            document.setPath(path);            
  -
  +            document.setPath(path);
           }
           catch (IOException e)
           {
  
  
  
  1.2       +25 -5     jakarta-jetspeed-2/components/page-manager/src/java/org/apache/jetspeed/page/document/AbstractNode.java
  
  Index: AbstractNode.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/page-manager/src/java/org/apache/jetspeed/page/document/AbstractNode.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractNode.java	3 Sep 2004 13:22:06 -0000	1.1
  +++ AbstractNode.java	8 Sep 2004 20:48:06 -0000	1.2
  @@ -48,6 +48,7 @@
       private Map localizedTitles;
       private Node parent;
       private String path;
  +    private boolean hidden=false;
   
       public AbstractNode()
       {
  @@ -177,16 +178,16 @@
        */
       public String getName()
       {
  -        String id = getId();
  +        String path = getPath();
           String parentName = getParent().getPath()+"/";
           
  -        if(id.indexOf(parentName) > -1)
  +        if(path.indexOf(parentName) > -1)
           {
  -            return id.substring(parentName.length());
  +            return path.substring(parentName.length());
           }
           else
           {
  -            return id;
  +            return path;
           }
       }
   
  @@ -217,5 +218,24 @@
       public String getUrl()
       {
           return getPath();
  +    }
  +    /**
  +     * <p>
  +     * isHidden
  +     * </p>
  +     *
  +     * @see org.apache.jetspeed.page.document.Node#isHidden()
  +     * @return
  +     */
  +    public boolean isHidden()
  +    {
  +        return hidden;
  +    }
  +    /**
  +     * @param hidden The hidden to set.
  +     */
  +    public void setHidden( boolean hidden )
  +    {
  +        this.hidden = hidden;
       }
   }
  
  
  
  1.12      +25 -1     jakarta-jetspeed-2/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java
  
  Index: FolderImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- FolderImpl.java	3 Sep 2004 13:22:06 -0000	1.11
  +++ FolderImpl.java	8 Sep 2004 20:48:06 -0000	1.12
  @@ -363,4 +363,28 @@
       {
           return FOLDER_TYPE;
       }
  +    /**
  +     * <p>
  +     * isHidden
  +     * </p>
  +     *
  +     * @see org.apache.jetspeed.page.document.Node#isHidden()
  +     * @return
  +     */
  +    public boolean isHidden()
  +    {
  +        return metadata.isHidden();
  +    }
  +    /**
  +     * <p>
  +     * setHidden
  +     * </p>
  +     *
  +     * @see org.apache.jetspeed.page.document.AbstractNode#setHidden(boolean)
  +     * @param hidden
  +     */
  +    public void setHidden( boolean hidden )
  +    {        
  +        ((AbstractNode)metadata).setHidden(hidden);
  +    }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message