Commit cb019bef authored by Vincent Pelletier's avatar Vincent Pelletier

Improve coding style.

Improve docstrings.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6868 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 339339d4
......@@ -27,31 +27,31 @@
##############################################################################
try:
from Interface import Interface
from Interface import Interface
except ImportError:
# for Zope versions before 2.6.0
from Interface import Base as Interface
# for Zope versions before 2.6.0
from Interface import Base as Interface
class Coordinate(Interface):
"""
Common Interface for all Coordinate objects
"""
def asText():
"""
Common Interface for all Coordinate objects
returns the coordinate as a text string
"""
pass
def asText():
"""
returns the coordinate as a text string
"""
pass
def fromText(coordinate_text):
"""
modifies the coordinate according to the input text
"""
pass
def fromText(coordinate_text):
"""
modifies the coordinate according to the input text
"""
pass
def standardTextFormat():
"""
returns a string which defines the standard
string format for that coordinate
"""
pass
def standardTextFormat():
"""
returns a string which defines the standard
string format for that coordinate
"""
pass
......@@ -27,86 +27,85 @@
##############################################################################
try:
from Interface import Interface
from Interface import Interface
except ImportError:
# for Zope versions before 2.6.0
from Interface import Base as Interface
# for Zope versions before 2.6.0
from Interface import Base as Interface
class Entity(Interface):
"""
Common Interface for Entity objects
"""
def getDefaultAddress():
"""
Common Interface for Entity objects
Returns the default address as a text string
"""
pass
def getDefaultAddress():
"""
Returns the default address as a text string
"""
pass
def getDefaultAddressStreetAddress():
"""
Returns the default address street as a text string
"""
pass
def getDefaultAddressCity():
"""
Returns the default address city as a text string
"""
pass
def getDefaultAddressStreetAddress():
"""
Returns the default address street as a text string
"""
pass
def getDefaultAddressRegion():
"""
Returns the default address region as a text string
"""
pass
def getDefaultAddressCity():
"""
Returns the default address city as a text string
"""
pass
def getDefaultAddressZipCode():
"""
Returns the default address zip code as a text string
"""
pass
def getDefaultAddressRegion():
"""
Returns the default address region as a text string
"""
pass
def getDefaultTelephone():
"""
Returns the default telephone as a text string
"""
pass
def getDefaultAddressZipCode():
"""
Returns the default address zip code as a text string
"""
pass
def getDefaultFax():
"""
Returns the default fax as a text string
"""
pass
def getDefaultTelephone():
"""
Returns the default telephone as a text string
"""
pass
def getDefaultEmail():
"""
Returns the default email as a text string
"""
pass
def getDefaultFax():
"""
Returns the default fax as a text string
"""
pass
def setDefaultAddress(coordinate):
"""
Updates the default address from a standard text string
"""
pass
def getDefaultEmail():
"""
Returns the default email as a text string
"""
pass
def setDefaultTelephone(coordinate):
"""
Updates the default telephone from a standard text string
"""
pass
def setDefaultAddress(coordinate):
"""
Updates the default address from a standard text string
"""
pass
def setDefaultFax(coordinate):
"""
Updates the default fax from a standard text string
"""
pass
def setDefaultTelephone(coordinate):
"""
Updates the default telephone from a standard text string
"""
pass
def setDefaultEmail(coordinate):
"""
Updates the default email from a standard text string
"""
pass
def setDefaultFax(coordinate):
"""
Updates the default fax from a standard text string
"""
pass
def setDefaultEmail(coordinate):
"""
Updates the default email from a standard text string
"""
pass
......@@ -27,123 +27,126 @@
##############################################################################
try:
from Interface import Interface
from Interface import Interface
except ImportError:
# for Zope versions before 2.6.0
from Interface import Base as Interface
# for Zope versions before 2.6.0
from Interface import Base as Interface
class Variated(Interface):
"""
Common Interface for all objects which can be
variated.
"""
# The following methods are intended to access to the
# variation value of a variated object. Discrete variations
# are based on categories. General variations are encapsulated
# into VariationValue instances.
# Discrete Variation accessors
def getVariationCategoryList():
"""
Common Interface for all objects which can be
variated.
"""
# The following methods are intended to access to the
# variation value of a variated object. Discrete variations
# are based on categories. General variations are encapsulated
# into VariationValue instances.
# Discrete Variation accessors
def getVariationCategoryList():
"""
returns a list or relative URLs which defines
a discrete variation (ie. a list of category
memberships)
"""
pass
def _setVariationCategoryList(node_list):
"""
modifies the discrete variation of an
variated instance by providing a list
of relative URLs
"""
pass
def setVariationCategoryList(node_list):
"""
modifies the discrete variation of an
variated instance by providing a list
of relative URLs
reindexes the object
"""
pass
def getVariationBaseCategoryList(node_list):
"""
returns a list of base category ids
which are used to define discrete variations
for this instance
"""
pass
def _setVariationBaseCategoryList(node_list):
"""
modifies the list of base category ids
which are used to define discrete variations
for this instance
"""
pass
def setVariationBaseCategoryList(node_list):
"""
modifies the list of base category ids
which are used to define discrete variations
for this instance
"""
pass
# General Variation accessors
def getVariationValue():
"""
"""
pass
def _setVariationValue(value):
"""
"""
pass
def setVariationValue(value):
"""
"""
pass
# The following methods are intended to access the
# variation range of a variated object. A Variation range can
# be defined in a Resource instance or in any object
# which has a relation with a Resource (Amount, Transformation)
# Discrete Variation Range accessors
def getVariationRangeCategoryList(base_category_list=(), base=1):
"""
returns a list of categories which are acceptable
as discrete variation values
"""
pass
def getVariationRangeCategoryItemList(base_category_list=(),
display_id='getTitle', base=1, current_category=None):
"""
returns a list of (category.id, category.display_id()) which are acceptable
as discrete variation values
"""
pass
def getVariationRangeBaseCategoryList(base_category_list=(), base=1):
"""
returns a list of base categories which are acceptable
as discrete variation values
"""
pass
def getVariationRangeBaseCategoryItemList(base_category_list=(),
display_id='getTitle', base=1, current_category=None):
"""
returns a list of base category items which are acceptable
as discrete variation values
"""
pass
returns a list or relative URLs which defines
a discrete variation (ie. a list of category
memberships)
"""
pass
def _setVariationCategoryList(node_list):
"""
modifies the discrete variation of an
variated instance by providing a list
of relative URLs
"""
pass
def setVariationCategoryList(node_list):
"""
modifies the discrete variation of an
variated instance by providing a list
of relative URLs
reindexes the object
"""
pass
def getVariationBaseCategoryList(node_list):
"""
returns a list of base category ids
which are used to define discrete variations
for this instance
"""
pass
def _setVariationBaseCategoryList(node_list):
"""
modifies the list of base category ids
which are used to define discrete variations
for this instance
"""
pass
def setVariationBaseCategoryList(node_list):
"""
modifies the list of base category ids
which are used to define discrete variations
for this instance
"""
pass
# General Variation accessors
def getVariationValue():
"""
Returns a VariationValue object.
"""
pass
def _setVariationValue(value):
"""
Private setter for VariationValue.
"""
pass
def setVariationValue(value):
"""
Sets the VariationValue.
"""
pass
# The following methods are intended to access the
# variation range of a variated object. A Variation range can
# be defined in a Resource instance or in any object
# which has a relation with a Resource (Amount, Transformation)
# Discrete Variation Range accessors
def getVariationRangeCategoryList(base_category_list=(), base=1):
"""
returns a list of categories which are acceptable
as discrete variation values
"""
pass
def getVariationRangeCategoryItemList(base_category_list=(),
display_id='getTitle', base=1, current_category=None):
"""
returns a list of (category.id, category.display_id()) which are acceptable
as discrete variation values
"""
pass
def getVariationRangeBaseCategoryList(base_category_list=(), base=1):
"""
returns a list of base categories which are acceptable
as discrete variation values
"""
pass
def getVariationRangeBaseCategoryItemList(base_category_list=(),
display_id='getTitle', base=1, current_category=None):
"""
returns a list of base category items which are acceptable
as discrete variation values
"""
pass
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment