You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by cl...@apache.org on 2005/01/27 22:14:31 UTC
svn commit: r128431 - in incubator/graffito/trunk/api/src/java/org/apache/portals/graffito: . model
Author: clombart
Date: Thu Jan 27 14:14:30 2005
New Revision: 128431
URL: http://svn.apache.org/viewcvs?view=rev&rev=128431
Log:
* Move attributes isLastVersion & version num from the Document interface into the CmsObject interface. By this way, versionning can be apply on folders.
* add method getContentAsString in the Content interface
Modified:
incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/ContentModelService.java
incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/CmsObject.java
incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Content.java
incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Document.java
Modified: incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/ContentModelService.java
Url: http://svn.apache.org/viewcvs/incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/ContentModelService.java?view=diff&rev=128431&p1=incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/ContentModelService.java&r1=128430&p2=incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/ContentModelService.java&r2=128431
==============================================================================
--- incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/ContentModelService.java (original)
+++ incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/ContentModelService.java Thu Jan 27 14:14:30 2005
@@ -18,6 +18,7 @@
import java.util.Collection;
import org.apache.portals.graffito.exception.*;
+import org.apache.portals.graffito.model.CmsObject;
import org.apache.portals.graffito.model.Document;
import org.apache.portals.graffito.model.Folder;
import org.apache.portals.graffito.model.Link;
@@ -65,6 +66,14 @@
public void removeFolder(Folder folder) throws ContentManagementException;
/**
+ * Remove many cms objects
+ *
+ * @param uris an Array of uri's matching to the Cms Object to remove
+ * @throws ContentManagementException
+ */
+ public void removeAll(String[] uris) throws ContentManagementException;
+
+ /**
* Get a folder from the engine's persistent store.
*
* @param uri the uri assigned to the folder to retrieve.
@@ -216,5 +225,14 @@
* @throws ContentManagementException
*/
public Collection getFolders(String parentUri) throws ContentManagementException;
+
+ /**
+ * Get a CmsObject from the engine's persistent store.
+ *
+ * @param uri the uri assigned to the cms object to retrieve.
+ * @return The cms object found or null.
+ * @throws ContentManagementException
+ */
+ public CmsObject getCmsObject(String uri) throws ContentManagementException;
}
Modified: incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/CmsObject.java
Url: http://svn.apache.org/viewcvs/incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/CmsObject.java?view=diff&rev=128431&p1=incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/CmsObject.java&r1=128430&p2=incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/CmsObject.java&r2=128431
==============================================================================
--- incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/CmsObject.java (original)
+++ incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/CmsObject.java Thu Jan 27 14:14:30 2005
@@ -159,4 +159,34 @@
*/
void setProperty(String name, String property);
+ /**
+ * Gets the version number
+ *
+ * @return version number is a string composed of point separated digit
+ */
+ String getVersionNumber();
+
+ /**
+ * Check if the current document is the last version
+ *
+ * @return the last version attribute value
+ */
+ boolean isLastVersion();
+
+ /**
+ * Makes the current document the last version for the associated uri
+ *
+ * @param isLastVersion
+ */
+ void setLastVersion(boolean isLastVersion);
+
+ /**
+ * Sets the version number
+ *
+ * @param versionNumber version number is a string composed of point separated digit
+ */
+ void setVersionNumber(String versionNumber);
+
+
+
}
Modified: incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Content.java
Url: http://svn.apache.org/viewcvs/incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Content.java?view=diff&rev=128431&p1=incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Content.java&r1=128430&p2=incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Content.java&r2=128431
==============================================================================
--- incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Content.java (original)
+++ incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Content.java Thu Jan 27 14:14:30 2005
@@ -38,6 +38,10 @@
*/
public byte[] getContentByte();
+ /**
+ * @return Returns the content in the String format
+ */
+ public String getContentAsString();
/**
* @param stream The content to set.
Modified: incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Document.java
Url: http://svn.apache.org/viewcvs/incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Document.java?view=diff&rev=128431&p1=incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Document.java&r1=128430&p2=incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Document.java&r2=128431
==============================================================================
--- incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Document.java (original)
+++ incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/model/Document.java Thu Jan 27 14:14:30 2005
@@ -25,36 +25,7 @@
*/
public interface Document extends CmsObject, Cloneable
{
-
-
- /**
- * Gets the version number
- *
- * @return version number is a string composed of point separated digit
- */
- String getVersionNumber();
-
- /**
- * Check if the current document is the last version
- *
- * @return the last version attribute value
- */
- boolean isLastVersion();
-
- /**
- * Makes the current document the last version for the associated uri
- *
- * @param isLastVersion
- */
- void setLastVersion(boolean isLastVersion);
-
- /**
- * Sets the version number
- *
- * @param versionNumber version number is a string composed of point separated digit
- */
- void setVersionNumber(String versionNumber);
-
+
/**
* Get the content type of this document
*