Back to index

plone3  3.1.7
Public Member Functions
CMFEditions.interfaces.IRepository.ICopyModifyMergeRepository Class Reference
Inheritance diagram for CMFEditions.interfaces.IRepository.ICopyModifyMergeRepository:
Inheritance graph
[legend]
Collaboration diagram for CMFEditions.interfaces.IRepository.ICopyModifyMergeRepository:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def isVersionable
def setAutoApplyMode
def applyVersionControl
def save
def revert
def retrieve
def restore
def isUpToDate
def getHistory

Detailed Description

The simplest repository possible.

This component exposes the main API.

Definition at line 48 of file IRepository.py.


Member Function Documentation

def CMFEditions.interfaces.IRepository.ICopyModifyMergeRepository.applyVersionControl (   obj,
  comment = '',
  metadata = {} 
)
Register the content to the repository.

Must be called prior any of the other repository related methods.
Not necessary if 'autoapply' is set to a True.
'comment' preferably is a human readable string comment.
'metadata' must be a dictionary.
This operation save the current version of the working copy as
first version to the repository.

Definition at line 68 of file IRepository.py.

00068 
00069     def applyVersionControl(obj, comment='', metadata={}):
00070         """Register the content to the repository.
00071 
00072         Must be called prior any of the other repository related methods.
00073         Not necessary if 'autoapply' is set to a True.
00074         'comment' preferably is a human readable string comment.
00075         'metadata' must be a dictionary.
00076         This operation save the current version of the working copy as
00077         first version to the repository.
00078         """

def CMFEditions.interfaces.IRepository.ICopyModifyMergeRepository.getHistory (   obj,
  oldestFirst = False,
  preserve = () 
)
Returns the history of a content.

Return the oldest version first  when ``oldestFirst`` set to 
``True``. Default is ``False`` (youngest version first).

Returns a sequence (``IHistory``) of ``IVersionData`` objects.

Definition at line 118 of file IRepository.py.

00118 
00119     def getHistory(obj, oldestFirst=False, preserve=()):
00120         """Returns the history of a content.
00121 
00122         Return the oldest version first  when ``oldestFirst`` set to 
00123         ``True``. Default is ``False`` (youngest version first).
00124         
00125         Returns a sequence (``IHistory``) of ``IVersionData`` objects.
00126         """
00127 

Here is the caller graph for this function:

Returns True if the working copy is modified.

Comparison is done with the selected version.

Definition at line 112 of file IRepository.py.

00112 
00113     def isUpToDate(obj, selector=None):
00114         """Returns True if the working copy is modified.
00115         
00116         Comparison is done with the selected version.
00117         """

The simplest repository possible.

This component exposes the main API.
Return True if the content type is versionable.

Definition at line 54 of file IRepository.py.

00054 
00055     def isVersionable(obj):
00056         """Return True if the content type is versionable.
00057         """

def CMFEditions.interfaces.IRepository.ICopyModifyMergeRepository.restore (   history_id,
  selector,
  container,
  new_id = None 
)
Restore a Specific version of an Object into a Container

Usage Hint:

May be used to restore a deleted object (delted from the tree).
A version having been purged from the storage may never be restored.
A new id may be chosen.

Definition at line 102 of file IRepository.py.

00102 
00103     def restore(history_id, selector, container, new_id=None):
00104         """Restore a Specific version of an Object into a Container
00105         
00106         Usage Hint:
00107         
00108         May be used to restore a deleted object (delted from the tree).
00109         A version having been purged from the storage may never be restored.
00110         A new id may be chosen.
00111         """

def CMFEditions.interfaces.IRepository.ICopyModifyMergeRepository.retrieve (   obj,
  selector = None,
  preserve = () 
)
Returns a former version of a content without replacing the working
copy.

It returns an ``IVersionData`` object and doesn't modify the working
copy in any way.

Definition at line 94 of file IRepository.py.

00094 
00095     def retrieve(obj, selector=None, preserve=()):
00096         """Returns a former version of a content without replacing the working
00097         copy.
00098 
00099         It returns an ``IVersionData`` object and doesn't modify the working
00100         copy in any way.
00101         """

Here is the caller graph for this function:

Reverts to a former version of the content by replacing the working
copy.

Reverts to the most recently saved version if no selector
is passed.

Definition at line 86 of file IRepository.py.

00086 
00087     def revert(obj, selector=None):
00088         """Reverts to a former version of the content by replacing the working
00089         copy.
00090 
00091         Reverts to the most recently saved version if no selector
00092         is passed.
00093         """

def CMFEditions.interfaces.IRepository.ICopyModifyMergeRepository.save (   obj,
  comment = '',
  metadata = {} 
)
Saves the current version of the content.

'comment' preferably is a human readable string comment.
'metadata' must be a dictionary.

Definition at line 79 of file IRepository.py.

00079 
00080     def save(obj, comment='', metadata={}):
00081         """Saves the current version of the content.
00082 
00083         'comment' preferably is a human readable string comment.
00084         'metadata' must be a dictionary.
00085         """

Here is the caller graph for this function:

Sets the autoapply mode.

Before a repository can host a version of a content it has to be
registred.
If True the first 'save' operation will register the content
automatically and applies version control.
The default value is True.

Definition at line 58 of file IRepository.py.

00058 
00059     def setAutoApplyMode(autoapply):
00060         """Sets the autoapply mode.
00061 
00062         Before a repository can host a version of a content it has to be
00063         registred.
00064         If True the first 'save' operation will register the content
00065         automatically and applies version control.
00066         The default value is True.
00067         """


The documentation for this class was generated from the following file: