- -
-

pyams_content.workflow package

- -
-

Submodules

-
-
-

pyams_content.workflow.interfaces module

-
-
-

pyams_content.workflow.notify module

-
-
-class pyams_content.workflow.notify.ContentWorkflowTransitionNotificationHandler(context)
-

Bases: pyams_utils.adapter.ContextAdapter

-

Content workflow transition notification handler

-
-
-get_target()
-
- -
- -
-
-pyams_content.workflow.notify.handle_workflow_event(event)
-

Handle workflow transition event

-
- -
-
-

pyams_content.workflow.task module

-
-
-class pyams_content.workflow.task.ContentArchiverTask
-

Bases: pyams_scheduler.task.Task

-

“Content archiver task

-
-
-run(report)
-
- -
-
-settings_view_name = None
-
- -
- -
-
-

Module contents

-
-
-class pyams_content.workflow.ContentWorkflow(transitions, states, initial_state=None, update_states=None, readonly_states=None, protected_states=None, manager_states=None, published_states=None, waiting_states=None, retired_states=None, archived_states=None, auto_retired_state=None)
-

Bases: pyams_workflow.workflow.Workflow

-

PyAMS default content workflow

-
- -
-
-class pyams_content.workflow.DraftWorkflowStateLabelAdapter(context)
-

Bases: pyams_utils.adapter.ContextAdapter

-

Draft state label adapter

-
-
-static get_label(content, request=None, format=True)
-
- -
- -
-
-pyams_content.workflow.MANAGER_STATES = ('proposed',)
-

Only managers can update proposed contents (if their restrictions apply)

-
- -
-
-pyams_content.workflow.PROTECTED_STATES = ('published', 'retiring')
-

Protected states are available to webmasters in update mode

-
- -
-
-pyams_content.workflow.READONLY_STATES = ('retired', 'archiving', 'archived', 'deleted')
-

Retired and archived contents can’t be modified

-
- -
-
-pyams_content.workflow.UPDATE_STATES = ('draft',)
-

Default state available to contributors in update mode

-
- -
-
-class pyams_content.workflow.WorkflowStateLabelAdapter(context)
-

Bases: pyams_utils.adapter.ContextAdapter

-

Generic state label adapter

-
-
-static get_label(content, request=None, format=True)
-
- -
- -
-
-class pyams_content.workflow.WorkflowUtility
-

Bases: object

-

PyAMS default workflow utility

-
- -
-
-pyams_content.workflow.archive_action(wf, context)
-

Remove readers when a content is archived

-
- -
-
-pyams_content.workflow.can_backdraft_content(wf, context)
-

Check if content can return to DRAFT state

-
- -
-
-pyams_content.workflow.can_cancel_operation(wf, context)
-

Check if we can cancel a request

-
- -
-
-pyams_content.workflow.can_create_new_version(wf, context)
-

Check if we can create a new version

-
- -
-
-pyams_content.workflow.can_delete_version(wf, context)
-

Check if we can delete a draft version

-
- -
-
-pyams_content.workflow.can_manage_content(wf, context)
-

Check if a manager can handle content

-
- -
-
-pyams_content.workflow.can_propose_content(wf, context)
-

Check if a content can be proposed

-
- -
-
-pyams_content.workflow.can_retire_content(wf, context)
-

Check if already published content can return to RETIRED state

-
- -
-
-pyams_content.workflow.clone_action(wf, context)
-

Create new version

-
- -
-
-pyams_content.workflow.delete_action(wf, context)
-

Delete draft version, and parent if single version

-
- -
-
-pyams_content.workflow.publish_action(wf, context)
-

Publish version

-
- -
-
- - -