incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r159735 - in incubator/graffito/trunk/components: ./ src/java/META-INF/ src/java/org/apache/portals/graffito/impl/ src/java/org/apache/portals/graffito/util/ src/test/org/apache/portals/graffito/impl/ src/test/org/apache/portals/graffito/util/
Date Fri, 01 Apr 2005 21:35:14 GMT
Author: clombart
Date: Fri Apr  1 13:35:13 2005
New Revision: 159735

URL: http://svn.apache.org/viewcvs?view=rev&rev=159735
Log:
* Create a new subproject : graffito commons which contains common classes used in other Graffito
projects :
- Common exception
- Common util classes

Removed:
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/util/
    incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/util/
Modified:
    incubator/graffito/trunk/components/project.xml
    incubator/graffito/trunk/components/src/java/META-INF/repository_graffito.xml
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentModelServiceImpl.java
    incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentModelService.java

Modified: incubator/graffito/trunk/components/project.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/project.xml?view=diff&r1=159734&r2=159735
==============================================================================
--- incubator/graffito/trunk/components/project.xml (original)
+++ incubator/graffito/trunk/components/project.xml Fri Apr  1 13:35:13 2005
@@ -38,6 +38,12 @@
   <dependencies>  
     
     <dependency>  
+      <id>graffito-commons</id>
+      <groupId>graffito</groupId>
+      <version>1.0-a1-dev</version>
+    </dependency>
+		
+    <dependency>  
       <id>graffito-api</id>
       <groupId>graffito</groupId>
       <version>1.0-a1-dev</version>

Modified: incubator/graffito/trunk/components/src/java/META-INF/repository_graffito.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/META-INF/repository_graffito.xml?view=diff&r1=159734&r2=159735
==============================================================================
--- incubator/graffito/trunk/components/src/java/META-INF/repository_graffito.xml (original)
+++ incubator/graffito/trunk/components/src/java/META-INF/repository_graffito.xml Fri Apr
 1 13:35:13 2005
@@ -14,7 +14,7 @@
   limitations under the License.
  -->
  <!--
-    G R A F F I T  I     S T O R E 
+    G R A F F I TO     S T O R E 
 -->	
 <descriptor-repository version="1.0">
 

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentModelServiceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentModelServiceImpl.java?view=diff&r1=159734&r2=159735
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentModelServiceImpl.java
(original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentModelServiceImpl.java
Fri Apr  1 13:35:13 2005
@@ -22,7 +22,8 @@
 
 
 import org.apache.portals.graffito.persistence.ContentPersistenceService;
-import org.apache.portals.graffito.util.CmsUtil;
+import org.apache.portals.graffito.util.UriUtil;
+
 import org.apache.portals.graffito.model.*;
 
 import org.apache.portals.graffito.ContentModelService;
@@ -98,7 +99,7 @@
 
             
             // Check if the parent folder uri is correct
-            String parentUri = CmsUtil.getParentUri(folder.getUri());
+            String parentUri = UriUtil.getParentUri(folder.getUri());
             
             //parentUri is null when the folder uri match to a server scope         
             if (parentUri ==null)
@@ -348,7 +349,7 @@
             }
             
             // Check if the parent folder uri is correct
-            String parentUri = CmsUtil.getParentUri(document.getUri());
+            String parentUri = UriUtil.getParentUri(document.getUri());
             
             //parentUri is null when the document uri match to a server scope         
             if (parentUri ==null)
@@ -515,7 +516,7 @@
     private void validateUri(String uri) throws CmsInvalidObjectException
     {
         // Check the cms object URI
-        if (! CmsUtil.isValidUri(uri))
+        if (! UriUtil.isValidUri(uri))
         {
             String message = "Failed to insert/update document object in ContentModelServiceImpl
: incorrect Uri";
             throw new CmsInvalidObjectException(message);             
@@ -527,9 +528,9 @@
      * Check if the cms object parent folder is correct
      * 
      * @param cmsObject to validate
-     * @throws CmsInvalidObjectException when the parent folder is not correct
+     * @throws CmsInvalidUriException when the parent folder is not correct
      */
-    private void validateParentFolder(CmsObject cmsObject) throws CmsInvalidObjectException
+    private void validateParentFolder(CmsObject cmsObject) throws CmsInvalidUriException
     {
         // If the object has not parent, end of validations
         if (cmsObject.getParentFolder() == null)
@@ -538,11 +539,11 @@
         }
 
         // Check if Cms object uri start with the parent uri path
-        String parentUri = CmsUtil.getParentUri(cmsObject.getUri());        
+        String parentUri = UriUtil.getParentUri(cmsObject.getUri());        
         if (! parentUri.equals(cmsObject.getParentFolder().getUri()))
         {
             String message = "Failed to insert/update document object in ContentModelServiceImpl
: incorrect Parent Uri";
-            throw new CmsInvalidObjectException(message);                    
+            throw new CmsInvalidUriException(message);                    
         }
         
     }  

Modified: incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentModelService.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentModelService.java?view=diff&r1=159734&r2=159735
==============================================================================
--- incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentModelService.java
(original)
+++ incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentModelService.java
Fri Apr  1 13:35:13 2005
@@ -42,8 +42,6 @@
 /**
  * Test Persistence Service
  * 
- * IMPORTANT NOTE : the transaction delimitation are only necessary for the unit tests.
- * When running inside Spring, you can use the declarative transaction management.
  * 
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  * 



Mime
View raw message