[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Workflow/Stateful - IStatefulProcessDefinition.py:1.1.2.1 IStatefulProcessInstance.py:1.1.2.1 StatefulProcessDefinition.py:1.1.2.1 IProcessDefinition.py:NONE IProcessInstance.py:NONE ProcessDefinition.py:NONE

Florent Guillaume fg@nuxeo.com
Thu, 5 Dec 2002 11:44:40 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Workflow/Stateful
In directory cvs.zope.org:/tmp/cvs-serv27144/Stateful

Added Files:
      Tag: sprintathon-wf-branch
	IStatefulProcessDefinition.py IStatefulProcessInstance.py 
	StatefulProcessDefinition.py 
Removed Files:
      Tag: sprintathon-wf-branch
	IProcessDefinition.py IProcessInstance.py ProcessDefinition.py 
Log Message:
Big renaming, remove the Workflow prefix in most cases. It's redundant
and makes for very long lines.


=== Added File Zope3/lib/python/Zope/App/Workflow/Stateful/IStatefulProcessDefinition.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################

"""Interfaces for stateful workflow process definition.

$Id: IStatefulProcessDefinition.py,v 1.1.2.1 2002/12/05 16:44:39 efge Exp $
"""

from Interface import Interface
from Interface.Attribute import Attribute

from Zope.App.Workflow.IProcessDefinition import IProcessDefinition


class IStatefulProcessDefinition(IProcessDefinition):
    """Interface for stateful workflow process definition."""

    def addState(name, state):
        """Add a IState to the process definition"""

    def removeState(name):
        """Remove a state from the process definition

        Raises ValueError exception if trying to delete the
        initial state."""

    def getStateNames():
        """Get the state names."""

    def getInitialStateName():
        """Get the name of the initial state."""

    def addTransition(name, transition):
        """Add a ITransition to the process definition."""

    def removeTransition(name):
        """Remove a transition from the process definition."""

    def getTransitionNames():
        """Get the transition names."""



=== Added File Zope3/lib/python/Zope/App/Workflow/Stateful/IStatefulProcessInstance.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################

"""Interface for stateful workflow process instances.

$Id: IStatefulProcessInstance.py,v 1.1.2.1 2002/12/05 16:44:39 efge Exp $
"""

from Interface import Interface
from Interface.Attribute import Attribute

from Zope.App.Workflow.IProcessInstance import IProcessInstance


class IStatefulProcessInstance(IProcessInstance):
    """Workflow process instance.

    Represents the instance of a process defined by a
    StatefulProcessDefinition.
    """

    def getOutgoingTransitions():
        """Get the outgoing transitions."""

    def fireTransition(id):
        """Fire a outgoing transitions"""


    ##### these are from IProcessInstance, we don't really use them
    ##### cleanup IProcessInstance ???

    # replaced bygetOutgoingTransitions
    def getWorkitems():
        """Get the workitems."""

    # replaced by fireTransition
    def getWorkitem(wi_id):
        """Get a workitem by id."""


=== Added File Zope3/lib/python/Zope/App/Workflow/Stateful/StatefulProcessDefinition.py ===
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################

"""Stateful workflow process definition.

$Id: StatefulProcessDefinition.py,v 1.1.2.1 2002/12/05 16:44:39 efge Exp $
"""

from Persistence import Persistent
from Zope.App.Workflow.IProcessDefinition import IProcessDefinition
from Zope.App.Workflow.ProcessDefinition import ProcessDefinition
from Zope.App.Workflow.Stateful.IStatefulProcessDefinition import \
     IStatefulProcessDefinition

### GWr: cleanup
## from Zope.ComponentArchitecture import getServiceManager
## from Zope.ContextWrapper import ContextMethod
## from Zope.Security.Checker import CheckerPublic
## from Zope.App.Traversing import traverse
## from Zope.App.Traversing import getPhysicalPathString
## from Zope.App.DependencyFramework.IDependable import IDependable
## from Zope.App.DependencyFramework.Exceptions import DependencyError
## from Zope.App.OFS.Container.IAddNotifiable import IAddNotifiable
## from Zope.App.OFS.Container.IDeleteNotifiable import IDeleteNotifiable
## from Zope.App.OFS.Services.Configuration import ConfigurationStatusProperty
## from Zope.App.OFS.Services.ConfigurationInterfaces import Active
## from Zope.App.OFS.Services.ConfigurationInterfaces import Registered
## from Zope.App.OFS.Services.ConfigurationInterfaces import Unregistered


class StatefulProcessDefinition(ProcessDefinition):
    """Stateful workflow process definition."""

    __implements__ = IStatefulProcessDefinition

    def __init__(self):
        super(StatefulProcessDefinition, self).__init__(self)

    ############################################################
    # Implementation methods for interface
    # Zope.App.Workflow.Stateful.IStatefulProcessDefinition

    def addState(self, name, state):
        pass

    def removeState(self, name):
        pass

    def getStateNames(self):
        return None

    def getInitialStateName(self):
        return None

    def addTransition(self, name, transition):
        pass

    def removeTransition(self, name):
        pass

    def getTransitionNames(self):
        return None

    #
    ############################################################

=== Removed File Zope3/lib/python/Zope/App/Workflow/Stateful/IProcessDefinition.py ===

=== Removed File Zope3/lib/python/Zope/App/Workflow/Stateful/IProcessInstance.py ===

=== Removed File Zope3/lib/python/Zope/App/Workflow/Stateful/ProcessDefinition.py ===