|
1 |
|
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
4 |
|
5 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
6 <head> |
|
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
8 <title>pyams_content.workflow package — PyAMS User Guide 0.1.0 documentation</title> |
|
9 <link rel="stylesheet" href="_static/pyramid.css" type="text/css" /> |
|
10 <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> |
|
11 <script type="text/javascript"> |
|
12 var DOCUMENTATION_OPTIONS = { |
|
13 URL_ROOT: './', |
|
14 VERSION: '0.1.0', |
|
15 COLLAPSE_INDEX: false, |
|
16 FILE_SUFFIX: '.html', |
|
17 HAS_SOURCE: true, |
|
18 SOURCELINK_SUFFIX: '.txt' |
|
19 }; |
|
20 </script> |
|
21 <script type="text/javascript" src="_static/jquery.js"></script> |
|
22 <script type="text/javascript" src="_static/underscore.js"></script> |
|
23 <script type="text/javascript" src="_static/doctools.js"></script> |
|
24 <link rel="index" title="Index" href="genindex.html" /> |
|
25 <link rel="search" title="Search" href="search.html" /> |
|
26 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Neuton&subset=latin" type="text/css" media="screen" charset="utf-8" /> |
|
27 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&subset=latin" type="text/css" media="screen" charset="utf-8" /> |
|
28 <!--[if lte IE 6]> |
|
29 <link rel="stylesheet" href="_static/ie6.css" type="text/css" media="screen" charset="utf-8" /> |
|
30 <![endif]--> |
|
31 |
|
32 </head> |
|
33 <body> |
|
34 |
|
35 <div class="related" role="navigation" aria-label="related navigation"> |
|
36 <h3>Navigation</h3> |
|
37 <ul> |
|
38 <li class="right" style="margin-right: 10px"> |
|
39 <a href="genindex.html" title="General Index" |
|
40 accesskey="I">index</a></li> |
|
41 <li class="right" > |
|
42 <a href="py-modindex.html" title="Python Module Index" |
|
43 >modules</a> |</li> |
|
44 <li class="nav-item nav-item-0"><a href="index.html">PyAMS User Guide 0.1.0 documentation</a> »</li> |
|
45 </ul> |
|
46 </div> |
|
47 |
|
48 <div class="document"> |
|
49 <div class="documentwrapper"> |
|
50 <div class="bodywrapper"> |
|
51 <div class="body" role="main"> |
|
52 |
|
53 <div class="section" id="pyams-content-workflow-package"> |
|
54 <h1>pyams_content.workflow package<a class="headerlink" href="#pyams-content-workflow-package" title="Permalink to this headline">¶</a></h1> |
|
55 <div class="section" id="subpackages"> |
|
56 <h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2> |
|
57 <div class="toctree-wrapper compound"> |
|
58 <ul> |
|
59 <li class="toctree-l1"><a class="reference internal" href="pyams_content.workflow.zmi.html">pyams_content.workflow.zmi package</a><ul> |
|
60 <li class="toctree-l2"><a class="reference internal" href="pyams_content.workflow.zmi.html#submodules">Submodules</a></li> |
|
61 <li class="toctree-l2"><a class="reference internal" href="pyams_content.workflow.zmi.html#module-pyams_content.workflow.zmi.task">pyams_content.workflow.zmi.task module</a></li> |
|
62 <li class="toctree-l2"><a class="reference internal" href="pyams_content.workflow.zmi.html#module-pyams_content.workflow.zmi">Module contents</a></li> |
|
63 </ul> |
|
64 </li> |
|
65 </ul> |
|
66 </div> |
|
67 </div> |
|
68 <div class="section" id="submodules"> |
|
69 <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2> |
|
70 </div> |
|
71 <div class="section" id="module-pyams_content.workflow.interfaces"> |
|
72 <span id="pyams-content-workflow-interfaces-module"></span><h2>pyams_content.workflow.interfaces module<a class="headerlink" href="#module-pyams_content.workflow.interfaces" title="Permalink to this headline">¶</a></h2> |
|
73 </div> |
|
74 <div class="section" id="module-pyams_content.workflow.notify"> |
|
75 <span id="pyams-content-workflow-notify-module"></span><h2>pyams_content.workflow.notify module<a class="headerlink" href="#module-pyams_content.workflow.notify" title="Permalink to this headline">¶</a></h2> |
|
76 <dl class="class"> |
|
77 <dt id="pyams_content.workflow.notify.ContentWorkflowTransitionNotificationHandler"> |
|
78 <em class="property">class </em><code class="descclassname">pyams_content.workflow.notify.</code><code class="descname">ContentWorkflowTransitionNotificationHandler</code><span class="sig-paren">(</span><em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.notify.ContentWorkflowTransitionNotificationHandler" title="Permalink to this definition">¶</a></dt> |
|
79 <dd><p>Bases: <a class="reference internal" href="pyams_utils.html#pyams_utils.adapter.ContextAdapter" title="pyams_utils.adapter.ContextAdapter"><code class="xref py py-class docutils literal"><span class="pre">pyams_utils.adapter.ContextAdapter</span></code></a></p> |
|
80 <p>Content workflow transition notification handler</p> |
|
81 <dl class="method"> |
|
82 <dt id="pyams_content.workflow.notify.ContentWorkflowTransitionNotificationHandler.get_target"> |
|
83 <code class="descname">get_target</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.notify.ContentWorkflowTransitionNotificationHandler.get_target" title="Permalink to this definition">¶</a></dt> |
|
84 <dd></dd></dl> |
|
85 |
|
86 </dd></dl> |
|
87 |
|
88 <dl class="function"> |
|
89 <dt id="pyams_content.workflow.notify.handle_workflow_event"> |
|
90 <code class="descclassname">pyams_content.workflow.notify.</code><code class="descname">handle_workflow_event</code><span class="sig-paren">(</span><em>event</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.notify.handle_workflow_event" title="Permalink to this definition">¶</a></dt> |
|
91 <dd><p>Handle workflow transition event</p> |
|
92 </dd></dl> |
|
93 |
|
94 </div> |
|
95 <div class="section" id="module-pyams_content.workflow.task"> |
|
96 <span id="pyams-content-workflow-task-module"></span><h2>pyams_content.workflow.task module<a class="headerlink" href="#module-pyams_content.workflow.task" title="Permalink to this headline">¶</a></h2> |
|
97 <dl class="class"> |
|
98 <dt id="pyams_content.workflow.task.ContentArchiverTask"> |
|
99 <em class="property">class </em><code class="descclassname">pyams_content.workflow.task.</code><code class="descname">ContentArchiverTask</code><a class="headerlink" href="#pyams_content.workflow.task.ContentArchiverTask" title="Permalink to this definition">¶</a></dt> |
|
100 <dd><p>Bases: <a class="reference internal" href="pyams_scheduler.html#pyams_scheduler.task.Task" title="pyams_scheduler.task.Task"><code class="xref py py-class docutils literal"><span class="pre">pyams_scheduler.task.Task</span></code></a></p> |
|
101 <p>“Content archiver task</p> |
|
102 <dl class="method"> |
|
103 <dt id="pyams_content.workflow.task.ContentArchiverTask.run"> |
|
104 <code class="descname">run</code><span class="sig-paren">(</span><em>report</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.task.ContentArchiverTask.run" title="Permalink to this definition">¶</a></dt> |
|
105 <dd></dd></dl> |
|
106 |
|
107 <dl class="attribute"> |
|
108 <dt id="pyams_content.workflow.task.ContentArchiverTask.settings_view_name"> |
|
109 <code class="descname">settings_view_name</code><em class="property"> = None</em><a class="headerlink" href="#pyams_content.workflow.task.ContentArchiverTask.settings_view_name" title="Permalink to this definition">¶</a></dt> |
|
110 <dd></dd></dl> |
|
111 |
|
112 </dd></dl> |
|
113 |
|
114 </div> |
|
115 <div class="section" id="module-pyams_content.workflow"> |
|
116 <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyams_content.workflow" title="Permalink to this headline">¶</a></h2> |
|
117 <dl class="class"> |
|
118 <dt id="pyams_content.workflow.ContentWorkflow"> |
|
119 <em class="property">class </em><code class="descclassname">pyams_content.workflow.</code><code class="descname">ContentWorkflow</code><span class="sig-paren">(</span><em>transitions</em>, <em>states</em>, <em>initial_state=None</em>, <em>update_states=None</em>, <em>readonly_states=None</em>, <em>protected_states=None</em>, <em>manager_states=None</em>, <em>published_states=None</em>, <em>waiting_states=None</em>, <em>retired_states=None</em>, <em>archived_states=None</em>, <em>auto_retired_state=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.ContentWorkflow" title="Permalink to this definition">¶</a></dt> |
|
120 <dd><p>Bases: <a class="reference internal" href="pyams_workflow.html#pyams_workflow.workflow.Workflow" title="pyams_workflow.workflow.Workflow"><code class="xref py py-class docutils literal"><span class="pre">pyams_workflow.workflow.Workflow</span></code></a></p> |
|
121 <p>PyAMS default content workflow</p> |
|
122 </dd></dl> |
|
123 |
|
124 <dl class="class"> |
|
125 <dt id="pyams_content.workflow.DraftWorkflowStateLabelAdapter"> |
|
126 <em class="property">class </em><code class="descclassname">pyams_content.workflow.</code><code class="descname">DraftWorkflowStateLabelAdapter</code><span class="sig-paren">(</span><em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.DraftWorkflowStateLabelAdapter" title="Permalink to this definition">¶</a></dt> |
|
127 <dd><p>Bases: <a class="reference internal" href="pyams_utils.html#pyams_utils.adapter.ContextAdapter" title="pyams_utils.adapter.ContextAdapter"><code class="xref py py-class docutils literal"><span class="pre">pyams_utils.adapter.ContextAdapter</span></code></a></p> |
|
128 <p>Draft state label adapter</p> |
|
129 <dl class="staticmethod"> |
|
130 <dt id="pyams_content.workflow.DraftWorkflowStateLabelAdapter.get_label"> |
|
131 <em class="property">static </em><code class="descname">get_label</code><span class="sig-paren">(</span><em>content</em>, <em>request=None</em>, <em>format=True</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.DraftWorkflowStateLabelAdapter.get_label" title="Permalink to this definition">¶</a></dt> |
|
132 <dd></dd></dl> |
|
133 |
|
134 </dd></dl> |
|
135 |
|
136 <dl class="data"> |
|
137 <dt id="pyams_content.workflow.MANAGER_STATES"> |
|
138 <code class="descclassname">pyams_content.workflow.</code><code class="descname">MANAGER_STATES</code><em class="property"> = ('proposed',)</em><a class="headerlink" href="#pyams_content.workflow.MANAGER_STATES" title="Permalink to this definition">¶</a></dt> |
|
139 <dd><p>Only managers can update proposed contents (if their restrictions apply)</p> |
|
140 </dd></dl> |
|
141 |
|
142 <dl class="data"> |
|
143 <dt id="pyams_content.workflow.PROTECTED_STATES"> |
|
144 <code class="descclassname">pyams_content.workflow.</code><code class="descname">PROTECTED_STATES</code><em class="property"> = ('published', 'retiring')</em><a class="headerlink" href="#pyams_content.workflow.PROTECTED_STATES" title="Permalink to this definition">¶</a></dt> |
|
145 <dd><p>Protected states are available to webmasters in update mode</p> |
|
146 </dd></dl> |
|
147 |
|
148 <dl class="data"> |
|
149 <dt id="pyams_content.workflow.READONLY_STATES"> |
|
150 <code class="descclassname">pyams_content.workflow.</code><code class="descname">READONLY_STATES</code><em class="property"> = ('retired', 'archiving', 'archived', 'deleted')</em><a class="headerlink" href="#pyams_content.workflow.READONLY_STATES" title="Permalink to this definition">¶</a></dt> |
|
151 <dd><p>Retired and archived contents can’t be modified</p> |
|
152 </dd></dl> |
|
153 |
|
154 <dl class="data"> |
|
155 <dt id="pyams_content.workflow.UPDATE_STATES"> |
|
156 <code class="descclassname">pyams_content.workflow.</code><code class="descname">UPDATE_STATES</code><em class="property"> = ('draft',)</em><a class="headerlink" href="#pyams_content.workflow.UPDATE_STATES" title="Permalink to this definition">¶</a></dt> |
|
157 <dd><p>Default state available to contributors in update mode</p> |
|
158 </dd></dl> |
|
159 |
|
160 <dl class="class"> |
|
161 <dt id="pyams_content.workflow.WorkflowStateLabelAdapter"> |
|
162 <em class="property">class </em><code class="descclassname">pyams_content.workflow.</code><code class="descname">WorkflowStateLabelAdapter</code><span class="sig-paren">(</span><em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.WorkflowStateLabelAdapter" title="Permalink to this definition">¶</a></dt> |
|
163 <dd><p>Bases: <a class="reference internal" href="pyams_utils.html#pyams_utils.adapter.ContextAdapter" title="pyams_utils.adapter.ContextAdapter"><code class="xref py py-class docutils literal"><span class="pre">pyams_utils.adapter.ContextAdapter</span></code></a></p> |
|
164 <p>Generic state label adapter</p> |
|
165 <dl class="staticmethod"> |
|
166 <dt id="pyams_content.workflow.WorkflowStateLabelAdapter.get_label"> |
|
167 <em class="property">static </em><code class="descname">get_label</code><span class="sig-paren">(</span><em>content</em>, <em>request=None</em>, <em>format=True</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.WorkflowStateLabelAdapter.get_label" title="Permalink to this definition">¶</a></dt> |
|
168 <dd></dd></dl> |
|
169 |
|
170 </dd></dl> |
|
171 |
|
172 <dl class="class"> |
|
173 <dt id="pyams_content.workflow.WorkflowUtility"> |
|
174 <em class="property">class </em><code class="descclassname">pyams_content.workflow.</code><code class="descname">WorkflowUtility</code><a class="headerlink" href="#pyams_content.workflow.WorkflowUtility" title="Permalink to this definition">¶</a></dt> |
|
175 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p> |
|
176 <p>PyAMS default workflow utility</p> |
|
177 </dd></dl> |
|
178 |
|
179 <dl class="function"> |
|
180 <dt id="pyams_content.workflow.archive_action"> |
|
181 <code class="descclassname">pyams_content.workflow.</code><code class="descname">archive_action</code><span class="sig-paren">(</span><em>wf</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.archive_action" title="Permalink to this definition">¶</a></dt> |
|
182 <dd><p>Remove readers when a content is archived</p> |
|
183 </dd></dl> |
|
184 |
|
185 <dl class="function"> |
|
186 <dt id="pyams_content.workflow.can_backdraft_content"> |
|
187 <code class="descclassname">pyams_content.workflow.</code><code class="descname">can_backdraft_content</code><span class="sig-paren">(</span><em>wf</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.can_backdraft_content" title="Permalink to this definition">¶</a></dt> |
|
188 <dd><p>Check if content can return to DRAFT state</p> |
|
189 </dd></dl> |
|
190 |
|
191 <dl class="function"> |
|
192 <dt id="pyams_content.workflow.can_cancel_operation"> |
|
193 <code class="descclassname">pyams_content.workflow.</code><code class="descname">can_cancel_operation</code><span class="sig-paren">(</span><em>wf</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.can_cancel_operation" title="Permalink to this definition">¶</a></dt> |
|
194 <dd><p>Check if we can cancel a request</p> |
|
195 </dd></dl> |
|
196 |
|
197 <dl class="function"> |
|
198 <dt id="pyams_content.workflow.can_create_new_version"> |
|
199 <code class="descclassname">pyams_content.workflow.</code><code class="descname">can_create_new_version</code><span class="sig-paren">(</span><em>wf</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.can_create_new_version" title="Permalink to this definition">¶</a></dt> |
|
200 <dd><p>Check if we can create a new version</p> |
|
201 </dd></dl> |
|
202 |
|
203 <dl class="function"> |
|
204 <dt id="pyams_content.workflow.can_delete_version"> |
|
205 <code class="descclassname">pyams_content.workflow.</code><code class="descname">can_delete_version</code><span class="sig-paren">(</span><em>wf</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.can_delete_version" title="Permalink to this definition">¶</a></dt> |
|
206 <dd><p>Check if we can delete a draft version</p> |
|
207 </dd></dl> |
|
208 |
|
209 <dl class="function"> |
|
210 <dt id="pyams_content.workflow.can_manage_content"> |
|
211 <code class="descclassname">pyams_content.workflow.</code><code class="descname">can_manage_content</code><span class="sig-paren">(</span><em>wf</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.can_manage_content" title="Permalink to this definition">¶</a></dt> |
|
212 <dd><p>Check if a manager can handle content</p> |
|
213 </dd></dl> |
|
214 |
|
215 <dl class="function"> |
|
216 <dt id="pyams_content.workflow.can_propose_content"> |
|
217 <code class="descclassname">pyams_content.workflow.</code><code class="descname">can_propose_content</code><span class="sig-paren">(</span><em>wf</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.can_propose_content" title="Permalink to this definition">¶</a></dt> |
|
218 <dd><p>Check if a content can be proposed</p> |
|
219 </dd></dl> |
|
220 |
|
221 <dl class="function"> |
|
222 <dt id="pyams_content.workflow.can_retire_content"> |
|
223 <code class="descclassname">pyams_content.workflow.</code><code class="descname">can_retire_content</code><span class="sig-paren">(</span><em>wf</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.can_retire_content" title="Permalink to this definition">¶</a></dt> |
|
224 <dd><p>Check if already published content can return to RETIRED state</p> |
|
225 </dd></dl> |
|
226 |
|
227 <dl class="function"> |
|
228 <dt id="pyams_content.workflow.clone_action"> |
|
229 <code class="descclassname">pyams_content.workflow.</code><code class="descname">clone_action</code><span class="sig-paren">(</span><em>wf</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.clone_action" title="Permalink to this definition">¶</a></dt> |
|
230 <dd><p>Create new version</p> |
|
231 </dd></dl> |
|
232 |
|
233 <dl class="function"> |
|
234 <dt id="pyams_content.workflow.delete_action"> |
|
235 <code class="descclassname">pyams_content.workflow.</code><code class="descname">delete_action</code><span class="sig-paren">(</span><em>wf</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.delete_action" title="Permalink to this definition">¶</a></dt> |
|
236 <dd><p>Delete draft version, and parent if single version</p> |
|
237 </dd></dl> |
|
238 |
|
239 <dl class="function"> |
|
240 <dt id="pyams_content.workflow.publish_action"> |
|
241 <code class="descclassname">pyams_content.workflow.</code><code class="descname">publish_action</code><span class="sig-paren">(</span><em>wf</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_content.workflow.publish_action" title="Permalink to this definition">¶</a></dt> |
|
242 <dd><p>Publish version</p> |
|
243 </dd></dl> |
|
244 |
|
245 </div> |
|
246 </div> |
|
247 |
|
248 |
|
249 </div> |
|
250 </div> |
|
251 </div> |
|
252 <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
|
253 <div class="sphinxsidebarwrapper"> |
|
254 <h3><a href="index.html">Table Of Contents</a></h3> |
|
255 <ul> |
|
256 <li><a class="reference internal" href="#">pyams_content.workflow package</a><ul> |
|
257 <li><a class="reference internal" href="#subpackages">Subpackages</a></li> |
|
258 <li><a class="reference internal" href="#submodules">Submodules</a></li> |
|
259 <li><a class="reference internal" href="#module-pyams_content.workflow.interfaces">pyams_content.workflow.interfaces module</a></li> |
|
260 <li><a class="reference internal" href="#module-pyams_content.workflow.notify">pyams_content.workflow.notify module</a></li> |
|
261 <li><a class="reference internal" href="#module-pyams_content.workflow.task">pyams_content.workflow.task module</a></li> |
|
262 <li><a class="reference internal" href="#module-pyams_content.workflow">Module contents</a></li> |
|
263 </ul> |
|
264 </li> |
|
265 </ul> |
|
266 |
|
267 <div id="searchbox" style="display: none" role="search"> |
|
268 <h3>Quick search</h3> |
|
269 <form class="search" action="search.html" method="get"> |
|
270 <div><input type="text" name="q" /></div> |
|
271 <div><input type="submit" value="Go" /></div> |
|
272 <input type="hidden" name="check_keywords" value="yes" /> |
|
273 <input type="hidden" name="area" value="default" /> |
|
274 </form> |
|
275 </div> |
|
276 <script type="text/javascript">$('#searchbox').show(0);</script> |
|
277 </div> |
|
278 </div> |
|
279 <div class="clearer"></div> |
|
280 </div> |
|
281 <div class="related" role="navigation" aria-label="related navigation"> |
|
282 <h3>Navigation</h3> |
|
283 <ul> |
|
284 <li class="right" style="margin-right: 10px"> |
|
285 <a href="genindex.html" title="General Index" |
|
286 >index</a></li> |
|
287 <li class="right" > |
|
288 <a href="py-modindex.html" title="Python Module Index" |
|
289 >modules</a> |</li> |
|
290 <li class="nav-item nav-item-0"><a href="index.html">PyAMS User Guide 0.1.0 documentation</a> »</li> |
|
291 </ul> |
|
292 </div> |
|
293 <div class="footer" role="contentinfo"> |
|
294 © Copyright 2017, Thierry Florac. |
|
295 Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.5. |
|
296 </div> |
|
297 </body> |
|
298 </html> |