portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r330359 - in /portals/jetspeed-2/trunk: applications/pam/src/java/org/apache/jetspeed/portlets/site/ components/page-manager/src/java/JETSPEED-INF/castor/ components/page-manager/src/java/JETSPEED-INF/ojb/ components/page-manager/src/java/o...
Date Wed, 02 Nov 2005 21:05:21 GMT
Author: rwatler
Date: Wed Nov  2 13:05:08 2005
New Revision: 330359

URL: http://svn.apache.org/viewcvs?rev=330359&view=rev
Log:
- Cleanup some PM APIs
- Snapshot DB PM work: adding metadata/titles and rounding out member support on Page/Folder/Fragment


Added:
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderMetadataLocalizedFieldImpl.java   (with props)
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/PageLocalizedFieldImpl.java
      - copied, changed from r330126, portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageLocalizedFieldImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/PageMetadataImpl.java
      - copied, changed from r330126, portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageMetadataImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageMetadataLocalizedFieldImpl.java   (with props)
Removed:
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageLocalizedFieldImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageMetadataImpl.java
Modified:
    portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/FolderProxyBean.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/JETSPEED-INF/castor/page-mapping.xml
    portals/jetspeed-2/trunk/components/page-manager/src/java/JETSPEED-INF/ojb/page-manager-repository.xml
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuMetadataImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentPageImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/BaseElementImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/NodeImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/AbstractNode.java
    portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java
    portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestDatabasePageManager.java
    portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
    portals/jetspeed-2/trunk/etc/schema/phase2-schema.xml
    portals/jetspeed-2/trunk/etc/sql/drop.sql
    portals/jetspeed-2/trunk/etc/sql/oracle/drop.sql
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/folder/Folder.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/document/Node.java

Modified: portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/FolderProxyBean.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/FolderProxyBean.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/FolderProxyBean.java (original)
+++ portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/FolderProxyBean.java Wed Nov  2 13:05:08 2005
@@ -119,7 +119,7 @@
                 this.folder = pageManager.getFolder(key);    
                 setTitle(folder.getTitle());                
                 setShortTitle(folder.getShortTitle());
-                setDefaultPage(folder.getDefaultPage(true));
+                setDefaultPage(folder.getDefaultPage());
                 setKey(key);
                 isNew = false;
             }

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/JETSPEED-INF/castor/page-mapping.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/JETSPEED-INF/castor/page-mapping.xml?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/JETSPEED-INF/castor/page-mapping.xml (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/JETSPEED-INF/castor/page-mapping.xml Wed Nov  2 13:05:08 2005
@@ -35,7 +35,7 @@
     </field>
 
 	<field name="metadataFields"
-           type="org.apache.jetspeed.om.page.psml.PageLocalizedFieldImpl" 
+           type="org.apache.jetspeed.om.page.PageLocalizedFieldImpl" 
            collection="collection">
       <bind-xml name="metadata"/>
     </field>
@@ -47,7 +47,7 @@
     </field>
   </class>
   
-  <class name="org.apache.jetspeed.om.page.psml.PageLocalizedFieldImpl">
+  <class name="org.apache.jetspeed.om.page.PageLocalizedFieldImpl">
     <map-to xml="metadata"/>
 
 	<field name="name" type="java.lang.String">
@@ -144,7 +144,7 @@
     </field>
     
  	<field name="metadataFields"
-           type="org.apache.jetspeed.om.page.psml.PageLocalizedFieldImpl" 
+           type="org.apache.jetspeed.om.page.PageLocalizedFieldImpl" 
            collection="collection">
       <bind-xml name="metadata"/>
     </field>
@@ -181,7 +181,7 @@
     </field>    
 
 	<field name="metadataFields"
-           type="org.apache.jetspeed.om.page.psml.PageLocalizedFieldImpl" 
+           type="org.apache.jetspeed.om.page.PageLocalizedFieldImpl" 
            collection="collection">
       <bind-xml name="metadata"/>
     </field>
@@ -237,7 +237,7 @@
     </field>
     
 	<field name="metadataFields"
-           type="org.apache.jetspeed.om.page.psml.PageLocalizedFieldImpl" 
+           type="org.apache.jetspeed.om.page.PageLocalizedFieldImpl" 
            collection="collection">
       <bind-xml name="metadata"/>
     </field>
@@ -330,7 +330,7 @@
     </field>
     
 	<field name="metadataFields"
-           type="org.apache.jetspeed.om.page.psml.PageLocalizedFieldImpl" 
+           type="org.apache.jetspeed.om.page.PageLocalizedFieldImpl" 
            collection="collection">
       <bind-xml name="metadata"/>
     </field>

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/JETSPEED-INF/ojb/page-manager-repository.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/JETSPEED-INF/ojb/page-manager-repository.xml?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/JETSPEED-INF/ojb/page-manager-repository.xml (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/JETSPEED-INF/ojb/page-manager-repository.xml Wed Nov  2 13:05:08 2005
@@ -70,6 +70,17 @@
          <inverse-foreignkey field-ref="parentId"/>
       </collection-descriptor>
 
+      <collection-descriptor
+          name="metadataFields"
+          element-class-ref="org.apache.jetspeed.om.folder.impl.FolderMetadataLocalizedFieldImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          proxy="true"
+      >
+         <inverse-foreignkey field-ref="folderId"/>
+      </collection-descriptor>
+
       <field-descriptor
          name="attributes::path"
          column="PATH"
@@ -89,6 +100,25 @@
       />
 
       <field-descriptor
+         name="shortTitle"
+         column="SHORT_TITLE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="hidden"
+         column="IS_HIDDEN"
+         jdbc-type="INTEGER"
+         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+      />
+
+      <field-descriptor
+         name="defaultPage"
+         column="DEFAULT_PAGE_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
          name="attributes::subsite"
          column="SUBSITE"
          jdbc-type="VARCHAR"
@@ -137,6 +167,45 @@
       />
    </class-descriptor>
 
+   <class-descriptor
+      class="org.apache.jetspeed.om.folder.impl.FolderMetadataLocalizedFieldImpl"
+      table="FOLDER_METADATA"
+   >
+      <field-descriptor
+         name="id"
+         column="METADATA_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+        name="folderId"
+        column="FOLDER_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
+      />
+
+      <field-descriptor
+         name="name"
+         column="NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="locale"
+         column="LOCALE"
+         jdbc-type="VARCHAR"
+         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
+      />
+
+      <field-descriptor
+         name="value"
+         column="VALUE"
+         jdbc-type="VARCHAR"
+      />
+   </class-descriptor>
+
    <!-- Page mapping -->
 
    <class-descriptor
@@ -180,6 +249,17 @@
          <inverse-foreignkey field-ref="pageId"/>
       </collection-descriptor>
 
+      <collection-descriptor
+          name="metadataFields"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageMetadataLocalizedFieldImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          proxy="true"
+      >
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
       <field-descriptor
          name="attributes::path"
          column="PATH"
@@ -199,20 +279,33 @@
       />
 
       <field-descriptor
+         name="shortTitle"
+         column="SHORT_TITLE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="hidden"
+         column="IS_HIDDEN"
+         jdbc-type="INTEGER"
+         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+      />
+
+      <field-descriptor
          name="skin"
          column="SKIN"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="decorator"
-         column="DECORATOR"
+         name="defaultLayoutDecorator"
+         column="DEFAULT_LAYOUT_DECORATOR"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="defaultFragmentDecorator"
-         column="DEFAULT_FRAGMENT_DECORATOR"
+         name="defaultPortletDecorator"
+         column="DEFAULT_PORTLET_DECORATOR"
          jdbc-type="VARCHAR"
       />
 
@@ -265,6 +358,45 @@
       />
    </class-descriptor>
 
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.PageMetadataLocalizedFieldImpl"
+      table="PAGE_METADATA"
+   >
+      <field-descriptor
+         name="id"
+         column="METADATA_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+        name="pageId"
+        column="PAGE_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
+      />
+
+      <field-descriptor
+         name="name"
+         column="NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="locale"
+         column="LOCALE"
+         jdbc-type="VARCHAR"
+         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
+      />
+
+      <field-descriptor
+         name="value"
+         column="VALUE"
+         jdbc-type="VARCHAR"
+      />
+   </class-descriptor>
+
    <!-- Fragment mapping -->
 
    <class-descriptor
@@ -313,6 +445,12 @@
       <field-descriptor
          name="title"
          column="TITLE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="shortTitle"
+         column="SHORT_TITLE"
          jdbc-type="VARCHAR"
       />
 

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java Wed Nov  2 13:05:08 2005
@@ -16,6 +16,7 @@
 package org.apache.jetspeed.om.folder.impl;
 
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 
 import org.apache.jetspeed.om.folder.Folder;
@@ -23,6 +24,7 @@
 import org.apache.jetspeed.om.folder.FolderNotFoundException;
 import org.apache.jetspeed.om.page.Link;
 import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.om.page.PageMetadataImpl;
 import org.apache.jetspeed.om.page.PageSecurity;
 import org.apache.jetspeed.om.page.impl.PageImpl;
 import org.apache.jetspeed.page.PageNotFoundException;
@@ -42,6 +44,7 @@
  */
 public class FolderImpl extends NodeImpl implements Folder
 {
+    private String defaultPage;
     private List folders;
     private List pages;
 
@@ -132,6 +135,16 @@
     }
 
     /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.impl.NodeImpl#newPageMetadata(java.util.List)
+     */
+    public PageMetadataImpl newPageMetadata(List fields)
+    {
+        PageMetadataImpl pageMetadata = new PageMetadataImpl(FolderMetadataLocalizedFieldImpl.class);
+        pageMetadata.setFields(fields);
+        return pageMetadata;
+    }
+
+    /* (non-Javadoc)
      * @see org.apache.jetspeed.om.folder.Folder#isRootFolder()
      */
     public boolean isRootFolder()
@@ -141,11 +154,11 @@
     }
 
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.om.folder.Folder#getDefaultPage(boolean)
+     * @see org.apache.jetspeed.om.folder.Folder#getDefaultPage()
      */
-    public String getDefaultPage(boolean allowDefaulting)
+    public String getDefaultPage()
     {
-        return null; // NYI
+        return defaultPage;
     }
     
     /* (non-Javadoc)
@@ -153,7 +166,7 @@
      */
     public void setDefaultPage(String defaultPage)
     {
-        // NYI
+        this.defaultPage = defaultPage;
     }
 
     /* (non-Javadoc)
@@ -317,7 +330,8 @@
      */
     public boolean isReserved()
     {
-        return false; // NYI
+        // folders are always concrete in this implementation
+        return false;
     }
     
     /* (non-Javadoc)
@@ -325,6 +339,15 @@
      */
     public int getReservedType()
     {
-        return -1; // NYI
+        // folders are always concrete in this implementation
+        return RESERVED_FOLDER_NONE;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#getType()
+     */
+    public String getType()
+    {
+        return FOLDER_TYPE;
     }
 }

Added: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderMetadataLocalizedFieldImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderMetadataLocalizedFieldImpl.java?rev=330359&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderMetadataLocalizedFieldImpl.java (added)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderMetadataLocalizedFieldImpl.java Wed Nov  2 13:05:08 2005
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.om.folder.impl;
+
+import org.apache.jetspeed.om.page.PageLocalizedFieldImpl;
+
+/**
+ * FolderMetadataLocalizedFieldImpl
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public class FolderMetadataLocalizedFieldImpl extends PageLocalizedFieldImpl
+{
+    // new class defined only to facilitate OJB table/class mapping
+}

Propchange: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderMetadataLocalizedFieldImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java Wed Nov  2 13:05:08 2005
@@ -111,47 +111,14 @@
         return getPath().equals(PATH_SEPARATOR);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.om.folder.Folder#getDefaultPage(boolean)
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.folder.Folder#getDefaultPage()
      */
-    public String getDefaultPage(boolean allowDefaulting)
+    public String getDefaultPage()
     {
-        try
-        {   
-            String defaultPage = metadata.getDefaultPage();
-            if(defaultPage == null)
-            {
-                defaultPage = FALLBACK_DEFAULT_PAGE;
-            }
-            return getPage(defaultPage, false).getName();
-        }
-        catch (NodeException e)
-        {
-            if (allowDefaulting)
-            {
-                try
-                {
-                    Iterator pagesIter = getPages(false).iterator();
-                    if (pagesIter.hasNext())
-                    {
-                        return ((Page) pagesIter.next()).getName();
-                    }
-                    else
-                    {
-                        return PAGE_NOT_FOUND_PAGE;
-                    }
-                }
-                catch (NodeException e1)
-                {
-                    return PAGE_NOT_FOUND_PAGE;
-                }
-            }
-        }
-        return null;
+        return metadata.getDefaultPage();
     }
-
+    
     /*
      * (non-Javadoc)
      * 

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuMetadataImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuMetadataImpl.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuMetadataImpl.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/MenuMetadataImpl.java Wed Nov  2 13:05:08 2005
@@ -19,7 +19,7 @@
 import java.util.Locale;
 
 import org.apache.jetspeed.om.common.GenericMetadata;
-import org.apache.jetspeed.om.page.psml.PageMetadataImpl;
+import org.apache.jetspeed.om.page.PageMetadataImpl;
 
 /**
  * This class implements metadata protocols for menu

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentPageImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentPageImpl.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentPageImpl.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentPageImpl.java Wed Nov  2 13:05:08 2005
@@ -228,6 +228,15 @@
     }
 
     /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#setHidden(boolean)
+     */
+    public void setHidden(boolean hidden)
+    {
+        
+        page.setHidden(hidden);
+    }
+
+    /* (non-Javadoc)
      * @see org.apache.jetspeed.page.document.Node#setParent(org.apache.jetspeed.page.document.Node)
      */
     public void setParent(Node parent)

Copied: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/PageLocalizedFieldImpl.java (from r330126, portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageLocalizedFieldImpl.java)
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/PageLocalizedFieldImpl.java?p2=portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/PageLocalizedFieldImpl.java&p1=portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageLocalizedFieldImpl.java&r1=330126&r2=330359&rev=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageLocalizedFieldImpl.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/PageLocalizedFieldImpl.java Wed Nov  2 13:05:08 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2004 The Apache Software Foundation.
+ * Copyright 2000-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jetspeed.om.page.psml;
+package org.apache.jetspeed.om.page;
 
 import org.apache.jetspeed.om.impl.LocalizedFieldImpl;
 
@@ -23,5 +23,4 @@
  */
 public class PageLocalizedFieldImpl extends LocalizedFieldImpl
 {
-
 }

Copied: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/PageMetadataImpl.java (from r330126, portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageMetadataImpl.java)
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/PageMetadataImpl.java?p2=portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/PageMetadataImpl.java&p1=portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageMetadataImpl.java&r1=330126&r2=330359&rev=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageMetadataImpl.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/PageMetadataImpl.java Wed Nov  2 13:05:08 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2004 The Apache Software Foundation.
+ * Copyright 2000-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jetspeed.om.page.psml;
+package org.apache.jetspeed.om.page;
 
 import java.util.Collection;
 import java.util.HashMap;
@@ -31,6 +31,18 @@
  */
 public class PageMetadataImpl extends GenericMetadataImpl
 {
+    private Class fieldImplClass = PageLocalizedFieldImpl.class;
+
+    public PageMetadataImpl()
+    {
+    }
+
+    public PageMetadataImpl(Class fieldImplClass)
+    {
+        this();
+        this.fieldImplClass = fieldImplClass;
+    }
+
     /**
      * localizedText - cached text metadata
      */
@@ -41,7 +53,14 @@
      */
     public LocalizedField createLocalizedField()
     {
-        return new PageLocalizedFieldImpl();
+        try
+        {
+            return (LocalizedField)fieldImplClass.newInstance();
+        }
+        catch (Exception e)
+        {
+            throw new RuntimeException("Failed to create LocalizedField object: " + fieldImplClass.getName(), e);
+        }
     }
 
     /**

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/BaseElementImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/BaseElementImpl.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/BaseElementImpl.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/BaseElementImpl.java Wed Nov  2 13:05:08 2005
@@ -29,6 +29,7 @@
     private int id;
     private String name;
     private String title;
+    private String shortTitle;
 
     /**
      * getName
@@ -135,7 +136,7 @@
      */
     public String getShortTitle()
     {
-        return null; // NYI
+        return shortTitle;
     }
 
     /* (non-Javadoc)
@@ -143,6 +144,6 @@
      */
     public void setShortTitle(String title)
     {
-        // NYI
+        shortTitle = title;
     }
 }

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageImpl.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageImpl.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageImpl.java Wed Nov  2 13:05:08 2005
@@ -23,6 +23,7 @@
 import org.apache.jetspeed.om.page.Defaults;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.om.page.PageMetadataImpl;
 import org.apache.jetspeed.page.document.impl.NodeImpl;
 
 /**
@@ -35,8 +36,18 @@
 {
     private List fragments;
     private String skin;
-    private String decorator;
-    private String defaultFragmentDecorator;
+    private String defaultLayoutDecorator;
+    private String defaultPortletDecorator;
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.impl.NodeImpl#newPageMetadata(java.util.List)
+     */
+    public PageMetadataImpl newPageMetadata(List fields)
+    {
+        PageMetadataImpl pageMetadata = new PageMetadataImpl(PageMetadataLocalizedFieldImpl.class);
+        pageMetadata.setFields(fields);
+        return pageMetadata;
+    }
 
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.page.Page#getDefaultSkin()
@@ -59,7 +70,19 @@
      */
     public String getDefaultDecorator(String fragmentType)
     {
-        return null; // NYI
+        // retrieve supported decorator types
+        if (fragmentType != null)
+        {
+            if (fragmentType.equals(Fragment.LAYOUT))
+            {
+                return defaultLayoutDecorator; 
+            }
+            if (fragmentType.equals(Fragment.PORTLET))
+            {
+                return defaultPortletDecorator; 
+            }
+        }
+        return null;
     }
     
     /* (non-Javadoc)
@@ -67,7 +90,18 @@
      */
     public void setDefaultDecorator(String decoratorName, String fragmentType)
     {
-        // NYI
+        // save supported decorator types
+        if (fragmentType != null)
+        {
+            if (fragmentType.equals(Fragment.LAYOUT))
+            {
+                defaultLayoutDecorator = decoratorName; 
+            }
+            if (fragmentType.equals(Fragment.PORTLET))
+            {
+                defaultPortletDecorator = decoratorName; 
+            }
+        }
     }
 
     /* (non-Javadoc)
@@ -176,4 +210,12 @@
     {
         return null; // NYI
     }    
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#getType()
+     */
+    public String getType()
+    {
+        return DOCUMENT_TYPE;
+    }
 }

Added: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageMetadataLocalizedFieldImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageMetadataLocalizedFieldImpl.java?rev=330359&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageMetadataLocalizedFieldImpl.java (added)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageMetadataLocalizedFieldImpl.java Wed Nov  2 13:05:08 2005
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.om.page.impl;
+
+import org.apache.jetspeed.om.page.PageLocalizedFieldImpl;
+
+/**
+ * PageMetadataLocalizedFieldImpl
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public class PageMetadataLocalizedFieldImpl extends PageLocalizedFieldImpl
+{
+    // new class defined only to facilitate OJB table/class mapping
+}

Propchange: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageMetadataLocalizedFieldImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/NodeImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/NodeImpl.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/NodeImpl.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/NodeImpl.java Wed Nov  2 13:05:08 2005
@@ -15,10 +15,13 @@
  */
 package org.apache.jetspeed.page.document.impl;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Locale;
 
 import org.apache.jetspeed.om.common.GenericMetadata;
 import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.om.page.PageMetadataImpl;
 import org.apache.jetspeed.om.page.impl.BaseElementImpl;
 import org.apache.jetspeed.page.document.Node;
 
@@ -31,7 +34,11 @@
 public abstract class NodeImpl extends BaseElementImpl implements Node
 {
     private Node parent;
+    private boolean hidden;
     private NodeAttributes attributes;
+    private List metadataFields;
+
+    private PageMetadataImpl pageMetadata;
 
     public NodeImpl()
     {
@@ -52,6 +59,36 @@
         return attributes.getPath().equals(Folder.PATH_SEPARATOR);
     }
 
+    /**
+     * newPageMetadata
+     *
+     * Construct page manager specific metadata implementation.
+     *
+     * @param fields mutable fields collection
+     * @return page metadata
+     */
+    public abstract PageMetadataImpl newPageMetadata(List fields);
+
+    /**
+     * getPageMetadata
+     *
+     * Get page manager specific metadata implementation.
+     *
+     * @return page metadata
+     */
+    public PageMetadataImpl getPageMetadata()
+    {
+        if (pageMetadata == null)
+        {
+            if (metadataFields == null)
+            {
+                metadataFields = new ArrayList(4);
+            }
+            pageMetadata = newPageMetadata(metadataFields);
+        }
+        return pageMetadata;
+    }
+
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.page.impl.BaseElementImpl#getName()
      */
@@ -178,11 +215,11 @@
     }
 
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.page.document.Node#getmetadata()
+     * @see org.apache.jetspeed.page.document.Node#getMetadata()
      */
     public GenericMetadata getMetadata()
     {
-        return null; // NYI
+        return getPageMetadata();
     }
     
     /* (non-Javadoc)
@@ -190,7 +227,13 @@
      */
     public String getTitle(Locale locale)
     {
-        return null; // NYI
+        // get title from metadata or use default title
+        String title = getPageMetadata().getText("title", locale);
+        if (title == null)
+        {
+            title = getTitle();
+        }
+        return title;
     }
     
     /* (non-Javadoc)
@@ -198,23 +241,35 @@
      */
     public String getShortTitle(Locale locale)
     {
-        return null; // NYI
+        // get short title from metadata or use title from metadata,
+        // default short title, or default title
+        String shortTitle = getPageMetadata().getText("short-title", locale);
+        if (shortTitle == null)
+        {
+            shortTitle = getPageMetadata().getText("title", locale);
+            if (shortTitle == null)
+            {
+                shortTitle = getShortTitle();
+                if (shortTitle == null)
+                {
+                    shortTitle = getTitle();
+                }
+            }
+        }
+        return shortTitle;
     }
     
     /* (non-Javadoc)
      * @see org.apache.jetspeed.page.document.Node#getType()
      */
-    public String getType()
-    {
-        return null; // NYI
-    }
+    public abstract String getType();
     
     /* (non-Javadoc)
      * @see org.apache.jetspeed.page.document.Node#getUrl()
      */
     public String getUrl()
     {
-        return null; // NYI
+        return getPath();
     }
     
     /* (non-Javadoc)
@@ -222,6 +277,14 @@
      */
     public boolean isHidden()
     {
-        return false; // NYI
+        return hidden;
+    }    
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#setHidden(boolean)
+     */
+    public void setHidden(boolean hidden)
+    {
+        this.hidden = hidden;
     }    
 }

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/AbstractNode.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/AbstractNode.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/AbstractNode.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/AbstractNode.java Wed Nov  2 13:05:08 2005
@@ -23,8 +23,8 @@
 import org.apache.jetspeed.om.common.LocalizedField;
 import org.apache.jetspeed.om.common.SecuredResource;
 import org.apache.jetspeed.om.common.SecurityConstraints;
+import org.apache.jetspeed.om.page.PageMetadataImpl;
 import org.apache.jetspeed.om.page.psml.AbstractBaseElement;
-import org.apache.jetspeed.om.page.psml.PageMetadataImpl;
 import org.apache.jetspeed.om.page.psml.SecurityConstraintsImpl;
 import org.apache.jetspeed.page.document.Node;
 

Modified: portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java Wed Nov  2 13:05:08 2005
@@ -460,12 +460,11 @@
         Iterator childItr = folder1.getFolders().iterator();
         // Test that the folders are naturally orderd
         Folder folder2 = (Folder) childItr.next();
-        assertEquals("default-page.psml", folder2.getDefaultPage(true));
         assertEquals("/folder1/folder2", folder2.getPath());
         assertEquals("folder2", folder2.getName());
         Folder folder3 = (Folder) childItr.next();
         assertEquals("/folder1/folder3", folder3.getPath());
-        assertEquals("test001.psml", folder3.getDefaultPage(true));
+        assertEquals("test001.psml", folder3.getDefaultPage());
 
         assertEquals(1, folder2.getPages().size());
         assertEquals(2, folder3.getPages().size());

Modified: portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestDatabasePageManager.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestDatabasePageManager.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestDatabasePageManager.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestDatabasePageManager.java Wed Nov  2 13:05:08 2005
@@ -15,13 +15,15 @@
  */
 package org.apache.jetspeed.page;
 
+import java.util.Locale;
+
 import org.apache.jetspeed.components.test.AbstractSpringTestCase;
+import org.apache.jetspeed.om.common.GenericMetadata;
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.FolderNotFoundException;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.Page;
 
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
@@ -118,6 +120,8 @@
             folder.setDefaultPage("default-page.psml");
             folder.setDefaultTheme("Blue Theme");
             folder.setShortTitle("Root");
+            GenericMetadata metadata = folder.getMetadata();
+            metadata.addField(Locale.FRENCH, "title", "[fr] Root Folder");
             pageManager.updateFolder(folder);
             
             assertNull(folder.getParent());
@@ -128,6 +132,9 @@
             page.setDefaultDecorator("blue-gradient", Fragment.PORTLET);
             page.setDefaultSkin("skin-1");
             page.setShortTitle("Default");
+            metadata = page.getMetadata();
+            metadata.addField(Locale.FRENCH, "title", "[fr] Default Page");
+            metadata.addField(Locale.JAPANESE, "title", "[ja] Default Page");
 
             Fragment root = page.getRootFragment();
             root.setDecorator("blue-gradient");

Modified: portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java (original)
+++ portals/jetspeed-2/trunk/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java Wed Nov  2 13:05:08 2005
@@ -392,34 +392,37 @@
                     // page is available to choose from
                     if (requestFolderPages.size() > 1)
                     {
-                        String defaultPageName = requestFolder.getDefaultPage(false);
-                        if (defaultPageName != null)
+                        String defaultPageName = requestFolder.getDefaultPage();
+                        if (defaultPageName == null)
                         {
-                            try
-                            {
-                                // save last visited non-hidden page for folder proxy
-                                // path, (proxies are hashed by their path), and
-                                // return default page
-                                requestPage = requestFolder.getPage(defaultPageName);
-                                if (!requestPage.isHidden())
-                                {
-                                    folderPageHistory.put(requestFolder, requestPage);
-                                }
-
-                                // log selected request page
-                                if (log.isDebugEnabled())
-                                {
-                                    log.debug("Selected folder default page: path=" + view.getManagedPage(requestPage).getPath());
-                                }
-                                return requestPage;
-                            }
-                            catch (NodeException ne)
+                            // use fallback default if default page
+                            // not explicitly specified
+                            defaultPageName = Folder.FALLBACK_DEFAULT_PAGE;
+                        }
+                        try
+                        {
+                            // save last visited non-hidden page for folder proxy
+                            // path, (proxies are hashed by their path), and
+                            // return default page
+                            requestPage = requestFolder.getPage(defaultPageName);
+                            if (!requestPage.isHidden())
                             {
+                                folderPageHistory.put(requestFolder, requestPage);
                             }
-                            catch (SecurityException se)
+                            
+                            // log selected request page
+                            if (log.isDebugEnabled())
                             {
-                                accessException = se;
+                                log.debug("Selected folder default page: path=" + view.getManagedPage(requestPage).getPath());
                             }
+                            return requestPage;
+                        }
+                        catch (NodeException ne)
+                        {
+                        }
+                        catch (SecurityException se)
+                        {
+                            accessException = se;
                         }
                     }
                     

Modified: portals/jetspeed-2/trunk/etc/schema/phase2-schema.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/schema/phase2-schema.xml?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/etc/schema/phase2-schema.xml (original)
+++ portals/jetspeed-2/trunk/etc/schema/phase2-schema.xml Wed Nov  2 13:05:08 2005
@@ -27,12 +27,15 @@
         <column name="PATH" required="true" size="160" type="VARCHAR"/>
         <column name="NAME" required="true" size="80" type="VARCHAR"/>
         <column name="TITLE" size="100" type="VARCHAR"/>
+        <column name="SHORT_TITLE" size="40" type="VARCHAR"/>
+        <column name="IS_HIDDEN" required="true" type="BOOLEANINT"/>
+        <column name="DEFAULT_PAGE_NAME" size="80" type="VARCHAR"/>
         <column name="SUBSITE" required="true" size="40" type="VARCHAR"/>
         <column name="USER_PRINCIPAL" required="true" size="40" type="VARCHAR"/>
         <column name="ROLE_PRINCIPAL" required="true" size="40" type="VARCHAR"/>
         <column name="GROUP_PRINCIPAL" required="true" size="40" type="VARCHAR"/>
         <column name="MEDIATYPE" required="true" size="15" type="VARCHAR"/>
-        <column name="LOCALE" required="true" size="10" type="VARCHAR"/>
+        <column name="LOCALE" required="true" size="20" type="VARCHAR"/>
         <column name="EXT_ATTR_NAME" required="true" size="15" type="VARCHAR"/>
         <column name="EXT_ATTR_VALUE" required="true" size="40" type="VARCHAR"/>
 		<foreign-key foreignTable="FOLDER" onDelete="cascade">
@@ -54,25 +57,44 @@
 		</unique>
     </table>
     
+    <table name="FOLDER_METADATA">
+        <column name="METADATA_ID" primaryKey="true" required="true" type="INTEGER"/>
+		<column name="FOLDER_ID" type="INTEGER" required="true"/>
+        <column name="NAME" required="true" size="15" type="VARCHAR"/>
+        <column name="LOCALE" required="true" size="20" type="VARCHAR"/>
+        <column name="VALUE" required="true" size="100" type="VARCHAR"/>
+		<foreign-key foreignTable="FOLDER" onDelete="cascade">
+			<reference foreign="FOLDER_ID" local="FOLDER_ID"/>
+		</foreign-key>
+		<unique name="UN_FOLDER_METADATA_1">
+			<unique-column name="FOLDER_ID"/>
+			<unique-column name="NAME"/>
+			<unique-column name="LOCALE"/>
+			<unique-column name="VALUE"/>
+		</unique>
+    </table>
+
     <!--
        Page Definition
     -->
 
     <table name="PAGE">
         <column name="PAGE_ID" primaryKey="true" required="true" type="INTEGER"/>
-		<column name="PARENT_ID" type="INTEGER"/>
+		<column name="PARENT_ID" type="INTEGER" required="true"/>
         <column name="PATH" required="true" size="160" type="VARCHAR"/>
         <column name="NAME" required="true" size="80" type="VARCHAR"/>
         <column name="TITLE" size="100" type="VARCHAR"/>
+        <column name="SHORT_TITLE" size="40" type="VARCHAR"/>
+        <column name="IS_HIDDEN" required="true" type="BOOLEANINT"/>
         <column name="SKIN" size="80" type="VARCHAR"/>
-        <column name="DECORATOR" size="80" type="VARCHAR"/>
-        <column name="DEFAULT_FRAGMENT_DECORATOR" size="80" type="VARCHAR"/>
+        <column name="DEFAULT_LAYOUT_DECORATOR" size="80" type="VARCHAR"/>
+        <column name="DEFAULT_PORTLET_DECORATOR" size="80" type="VARCHAR"/>
         <column name="SUBSITE" required="true" size="40" type="VARCHAR"/>
         <column name="USER_PRINCIPAL" required="true" size="40" type="VARCHAR"/>
         <column name="ROLE_PRINCIPAL" required="true" size="40" type="VARCHAR"/>
         <column name="GROUP_PRINCIPAL" required="true" size="40" type="VARCHAR"/>
         <column name="MEDIATYPE" required="true" size="15" type="VARCHAR"/>
-        <column name="LOCALE" required="true" size="10" type="VARCHAR"/>
+        <column name="LOCALE" required="true" size="20" type="VARCHAR"/>
         <column name="EXT_ATTR_NAME" required="true" size="15" type="VARCHAR"/>
         <column name="EXT_ATTR_VALUE" required="true" size="40" type="VARCHAR"/>
 		<foreign-key foreignTable="FOLDER" onDelete="cascade">
@@ -94,6 +116,23 @@
 		</unique>
     </table>
     
+    <table name="PAGE_METADATA">
+        <column name="METADATA_ID" primaryKey="true" required="true" type="INTEGER"/>
+		<column name="PAGE_ID" type="INTEGER" required="true"/>
+        <column name="NAME" required="true" size="15" type="VARCHAR"/>
+        <column name="LOCALE" required="true" size="20" type="VARCHAR"/>
+        <column name="VALUE" required="true" size="100" type="VARCHAR"/>
+		<foreign-key foreignTable="PAGE" onDelete="cascade">
+			<reference foreign="PAGE_ID" local="PAGE_ID"/>
+		</foreign-key>
+		<unique name="UN_PAGE_METADATA_1">
+			<unique-column name="PAGE_ID"/>
+			<unique-column name="NAME"/>
+			<unique-column name="LOCALE"/>
+			<unique-column name="VALUE"/>
+		</unique>
+    </table>
+
     <!--
        Fragment Definitions (portlets, layouts)
     -->
@@ -104,6 +143,7 @@
 		<column name="PAGE_ID" type="INTEGER"/>
         <column name="NAME" size="100" type="VARCHAR"/>
         <column name="TITLE" size="100" type="VARCHAR"/>
+        <column name="SHORT_TITLE" size="40" type="VARCHAR"/>
         <column name="TYPE" size="40" type="VARCHAR"/>
         <column name="SKIN" size="80" type="VARCHAR"/>
         <column name="DECORATOR" size="80" type="VARCHAR"/>

Modified: portals/jetspeed-2/trunk/etc/sql/drop.sql
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/sql/drop.sql?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/etc/sql/drop.sql (original)
+++ portals/jetspeed-2/trunk/etc/sql/drop.sql Wed Nov  2 13:05:08 2005
@@ -16,7 +16,9 @@
 DROP TABLE MEDIATYPE_TO_CAPABILITY;
 DROP TABLE MEDIATYPE_TO_MIMETYPE;
 DROP TABLE FRAGMENT;
+DROP TABLE PAGE_METADATA;
 DROP TABLE PAGE;
+DROP TABLE FOLDER_METADATA;
 DROP TABLE FOLDER;
 DROP TABLE RULE_CRITERION;
 DROP TABLE PRINCIPAL_RULE_ASSOC;

Modified: portals/jetspeed-2/trunk/etc/sql/oracle/drop.sql
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/sql/oracle/drop.sql?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/etc/sql/oracle/drop.sql (original)
+++ portals/jetspeed-2/trunk/etc/sql/oracle/drop.sql Wed Nov  2 13:05:08 2005
@@ -22,7 +22,9 @@
 DROP TABLE MEDIATYPE_TO_MIMETYPE;
 
 DROP TABLE FRAGMENT;
+DROP TABLE PAGE_METADATA;
 DROP TABLE PAGE;
+DROP TABLE FOLDER_METADATA;
 DROP TABLE FOLDER;
 
 DROP TABLE RULE_CRITERION;

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/folder/Folder.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/folder/Folder.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/folder/Folder.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/folder/Folder.java Wed Nov  2 13:05:08 2005
@@ -85,10 +85,9 @@
      * getDefaultPage
      * </p>
      *
-     * @param allowDefaulting flag to enable defaulting logic when not explicitly set
      * @return A String representing the default psml page for this folder
      */
-    String getDefaultPage(boolean allowDefaulting);
+    String getDefaultPage();
     
     /**
      * 

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/document/Node.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/document/Node.java?rev=330359&r1=330358&r2=330359&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/document/Node.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/document/Node.java Wed Nov  2 13:05:08 2005
@@ -155,8 +155,19 @@
      *  the presence of this node in terms of being returned in 
      *  {@link NodeSets org.apache.jetspeed.page.document.NodeSet}. 
      * </p>
-     * @return
+     * @return hidden flag
      */
     boolean isHidden();
 
+    /**
+     * 
+     * <p>
+     * setHidden
+     * </p>
+     * <p>
+     *  Whether or not this Node should be hidden in terms of the view.
+     * </p>
+     * @param hidden flag
+     */
+    void setHidden(boolean hidden);
 }



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


Mime
View raw message