portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r332163 - in /portals/jetspeed-2/trunk/components/page-manager/src/java: JETSPEED-INF/castor/ JETSPEED-INF/ojb/ org/apache/jetspeed/om/folder/psml/ org/apache/jetspeed/om/page/ org/apache/jetspeed/om/page/impl/ org/apache/jetspeed/om/page/p...
Date Wed, 09 Nov 2005 22:26:19 GMT
Author: taylor
Date: Wed Nov  9 14:26:13 2005
New Revision: 332163

URL: http://svn.apache.org/viewcvs?rev=332163&view=rev
Log:
added Version attribute to Document (Page, Link, PageSecurity, FolderMetadata)

Added:
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/DocumentImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/DocumentImpl.java
Modified:
    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/psml/FolderMetaDataImpl.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/PageImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageSecurityImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/LinkImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageSecurityImpl.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java

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=332163&r1=332162&r2=332163&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  9 14:26:13 2005
@@ -16,6 +16,10 @@
       <bind-xml name="security-constraints"/>
     </field>
 
+    <field name="version" type="java.lang.String">
+      <bind-xml name="version" node="attribute"/>
+    </field>
+
     <field name="title" type="java.lang.String">
       <bind-xml name="title"/>
     </field>
@@ -131,6 +135,10 @@
       <bind-xml name="hidden" node="attribute"/>
     </field>
 
+    <field name="version" type="java.lang.String">
+      <bind-xml name="version" node="attribute"/>
+    </field>
+
     <field name="securityConstraints"
            type="org.apache.jetspeed.om.page.psml.SecurityConstraintsImpl">
       <bind-xml name="security-constraints"/>
@@ -166,6 +174,10 @@
            type="org.apache.jetspeed.om.page.psml.SecurityConstraintsImpl">
       <bind-xml name="security-constraints"/>
     </field>
+
+    <field name="version" type="java.lang.String">
+      <bind-xml name="version" node="attribute"/>
+    </field>
     
     <field name="title" type="java.lang.String">
       <bind-xml name="title"/>
@@ -435,6 +447,10 @@
 
   <class name="org.apache.jetspeed.om.page.psml.PageSecurityImpl">
     <map-to xml="page-security"/>
+
+    <field name="version" type="java.lang.String">
+      <bind-xml name="version" node="attribute"/>
+    </field>
 
     <field name="securityConstraintsDefs"
            type="org.apache.jetspeed.om.page.SecurityConstraintsDefImpl"

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=332163&r1=332162&r2=332163&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  9 14:26:13 2005
@@ -400,6 +400,12 @@
       />
 
       <field-descriptor
+         name="version"
+         column="VERSION"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
          name="title"
          column="TITLE"
          jdbc-type="VARCHAR"
@@ -918,6 +924,12 @@
       <field-descriptor
          name="name"
          column="NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="version"
+         column="VERSION"
          jdbc-type="VARCHAR"
       />
 

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderMetaDataImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderMetaDataImpl.java?rev=332163&r1=332162&r2=332163&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderMetaDataImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderMetaDataImpl.java
Wed Nov  9 14:26:13 2005
@@ -20,7 +20,7 @@
 import java.util.List;
 
 import org.apache.jetspeed.om.page.Document;
-import org.apache.jetspeed.page.document.psml.AbstractNode;
+import org.apache.jetspeed.om.page.psml.DocumentImpl;
 
 /**
  * <p>
@@ -34,7 +34,7 @@
  * @version $Id$
  *  
  */
-public class FolderMetaDataImpl extends AbstractNode implements Document
+public class FolderMetaDataImpl extends DocumentImpl implements Document
 {
     public static String DOCUMENT_TYPE = "folder.metadata";
 

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=332163&r1=332162&r2=332163&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  9 14:26:13 2005
@@ -370,4 +370,14 @@
     {
         return page;
     }
+    
+    public String getVersion()
+    {
+        return page.getVersion();
+    }
+    
+    public void setVersion(String version)
+    {
+        page.setVersion(version);
+    }
 }

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=332163&r1=332162&r2=332163&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  9 14:26:13 2005
@@ -24,7 +24,7 @@
 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;
+import org.apache.jetspeed.page.document.impl.DocumentImpl;
 
 /**
  * PageImpl
@@ -32,7 +32,7 @@
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-public class PageImpl extends NodeImpl implements Page
+public class PageImpl extends DocumentImpl implements Page
 {
     private Collection fragment;
     private String skin;

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageSecurityImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageSecurityImpl.java?rev=332163&r1=332162&r2=332163&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageSecurityImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/impl/PageSecurityImpl.java
Wed Nov  9 14:26:13 2005
@@ -27,7 +27,7 @@
 import org.apache.jetspeed.om.page.SecurityConstraintImpl;
 import org.apache.jetspeed.om.page.SecurityConstraintsDef;
 import org.apache.jetspeed.om.page.SecurityConstraintsDefImpl;
-import org.apache.jetspeed.page.document.impl.NodeImpl;
+import org.apache.jetspeed.page.document.impl.DocumentImpl;
 import org.apache.ojb.broker.PersistenceBroker;
 import org.apache.ojb.broker.PersistenceBrokerException;
 
@@ -37,7 +37,7 @@
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-public class PageSecurityImpl extends NodeImpl implements PageSecurity
+public class PageSecurityImpl extends DocumentImpl implements PageSecurity
 {
     private List constraintsDefs;
     private List globalConstraintsRefs;

Added: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/DocumentImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/DocumentImpl.java?rev=332163&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/DocumentImpl.java
(added)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/DocumentImpl.java
Wed Nov  9 14:26:13 2005
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2000-2001,2004 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.psml;
+
+import org.apache.jetspeed.om.page.Document;
+import org.apache.jetspeed.page.document.psml.AbstractNode;
+
+
+/**
+ * <p>
+ * Link
+ * </p>
+ * <p>
+ *
+ * </p>
+ * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
+ * @version $Id: LinkImpl.java 314803 2005-10-12 06:35:19Z rwatler $
+ *
+ */
+public abstract class DocumentImpl extends AbstractNode implements Document 
+{
+    
+    private String version;
+    
+    /**
+     * unmarshalled - notification that this instance has been
+     *                loaded from the persistent store
+     */
+    public void unmarshalled()
+    {
+        // notify super class implementation
+        super.unmarshalled();
+
+        // default version of pages to name
+        if (getVersion() == null)
+        {
+            setVersion(getVersion());
+        }
+    }
+    /**
+     * @return Returns the version.
+     */
+    public String getVersion()
+    {
+        return version;
+    }
+    /**
+     * @param version The version to set.
+     */
+    public void setVersion(String version)
+    {
+        this.version = version;
+    }
+}

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/LinkImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/LinkImpl.java?rev=332163&r1=332162&r2=332163&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/LinkImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/LinkImpl.java
Wed Nov  9 14:26:13 2005
@@ -16,8 +16,6 @@
 package org.apache.jetspeed.om.page.psml;
 
 import org.apache.jetspeed.om.page.Link;
-import org.apache.jetspeed.page.document.psml.AbstractNode;
-
 
 /**
  * <p>
@@ -30,7 +28,7 @@
  * @version $Id$
  *
  */
-public class LinkImpl extends AbstractNode implements Link 
+public class LinkImpl extends DocumentImpl implements Link 
 {
     
     private String target;

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageImpl.java?rev=332163&r1=332162&r2=332163&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageImpl.java
Wed Nov  9 14:26:13 2005
@@ -23,12 +23,11 @@
 import org.apache.jetspeed.om.folder.psml.MenuDefinitionImpl;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.Page;
-import org.apache.jetspeed.page.document.psml.AbstractNode;
 
 /**
  * @version $Id$
  */
-public class PageImpl extends AbstractNode implements Page
+public class PageImpl extends DocumentImpl implements Page
 {
     private DefaultsImpl defaults = new DefaultsImpl();
 

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageSecurityImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageSecurityImpl.java?rev=332163&r1=332162&r2=332163&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageSecurityImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageSecurityImpl.java
Wed Nov  9 14:26:13 2005
@@ -22,8 +22,6 @@
 
 import org.apache.jetspeed.om.page.PageSecurity;
 import org.apache.jetspeed.om.page.SecurityConstraintsDef;
-import org.apache.jetspeed.page.document.psml.AbstractNode;
-
 
 /**
  * <p>
@@ -36,7 +34,7 @@
  * @version $Id$
  *
  */
-public class PageSecurityImpl extends AbstractNode implements PageSecurity
+public class PageSecurityImpl extends DocumentImpl implements PageSecurity
 {
     private List constraintsDefsList;
 

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java?rev=332163&r1=332162&r2=332163&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
(original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
Wed Nov  9 14:26:13 2005
@@ -567,6 +567,7 @@
         Page page = newPage(path);
         page.setTitle(source.getTitle());
         page.setShortTitle(source.getShortTitle());
+        page.setVersion(source.getVersion());
         page.setDefaultDecorator(source.getDefaultDecorator(Fragment.LAYOUT), Fragment.LAYOUT);
         page.setDefaultDecorator(source.getDefaultDecorator(Fragment.PORTLET), Fragment.PORTLET);
         page.setDefaultSkin(source.getDefaultSkin());
@@ -760,6 +761,7 @@
         copy.setPath(source.getPath());
 //        copy.setShortTitle(source.getTitle());        
 //        copy.setTitle(source.getTitle());
+        copy.setVersion(source.getVersion());        
         
         if (source.getSecurityConstraints() != null)
         {

Added: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/DocumentImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/DocumentImpl.java?rev=332163&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/DocumentImpl.java
(added)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/impl/DocumentImpl.java
Wed Nov  9 14:26:13 2005
@@ -0,0 +1,50 @@
+/*
+ * 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.page.document.impl;
+
+import org.apache.jetspeed.om.page.Document;
+import org.apache.jetspeed.om.page.impl.SecurityConstraintsImpl;
+
+/**
+ * DocumentImpl
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public abstract class DocumentImpl extends NodeImpl implements Document
+{
+    private String version;
+    
+    public DocumentImpl(SecurityConstraintsImpl constraints)
+    {
+        super(constraints);
+    }
+    
+    /**
+     * @return Returns the version.
+     */
+    public String getVersion()
+    {
+        return version;
+    }
+    /**
+     * @param version The version to set.
+     */
+    public void setVersion(String version)
+    {
+        this.version = version;
+    }
+}



---------------------------------------------------------------------
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