org.apache.portals.graffito.services.core
Interface ContentVersionService


public interface ContentVersionService

CMS Version Service Interface

This service maintains content versions and history. The version number is composed of a Major & minor section like the following structure : "majorNum.minorNum" TODO : Later we will add branch management with content merge, content comparaison, ...

Version:
$Id: ContentVersionService.java,v 1.1 2004/12/22 21:16:12 christophe Exp $
Author:
Christophe Lombart

Method Summary
 void addInHistory(java.lang.String uri, VersionnedContent previousContent, VersionnedContent newContent)
          Add a new version in the Document history
 VersionnedContent createMajorVersion(java.lang.String uri)
          Create a new major versionned content.
 VersionnedContent createMinorVersion(java.lang.String uri)
          Create a new minor versionned content.
 HistoryElement getHistory(java.lang.String uri)
          Get the last history element associated to an uri
 HistoryElement getHistory(VersionnedContent versionnedContent)
          Get the history element associated to a specific versionned content
 

Method Detail

getHistory

HistoryElement getHistory(java.lang.String uri)
                          throws ContentManagementException
Get the last history element associated to an uri

Parameters:
uri - The uri assigned to the versioned content
Returns:
The last history element
Throws:
ContentManagementException - when it is impossible to get the history

getHistory

HistoryElement getHistory(VersionnedContent versionnedContent)
                          throws ContentManagementException
Get the history element associated to a specific versionned content

Parameters:
versionnedContent - The versionned content for which the history element is required
Returns:
The last history element
Throws:
ContentManagementException - when it is impossible to get the history

createMajorVersion

VersionnedContent createMajorVersion(java.lang.String uri)
                                     throws CmsInstantiateException
Create a new major versionned content.

Parameters:
uri - The content uri
Returns:
The new versionned content
Throws:
CmsInstantiateException

createMinorVersion

VersionnedContent createMinorVersion(java.lang.String uri)
                                     throws CmsInstantiateException
Create a new minor versionned content.

Parameters:
uri - The content uri
Returns:
The new versionned conntent
Throws:
CmsInstantiateException

addInHistory

void addInHistory(java.lang.String uri,
                  VersionnedContent previousContent,
                  VersionnedContent newContent)
                  throws CmsInstantiateException
Add a new version in the Document history

Parameters:
uri - The uri for wich the history has to be modified
previousContent - The versionned content before the new one to add
newContent - The new versionned content to insert into the history
Throws:
CmsInstantiateException


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.