[Zope-CVS] CVS: Packages/JobBoardEx - IJob.py:1.3
Fred L. Drake, Jr.
fdrake@acm.org
Wed, 20 Mar 2002 12:02:54 -0500
Update of /cvs-repository/Packages/JobBoardEx
In directory cvs.zope.org:/tmp/cvs-serv15973
Modified Files:
IJob.py
Log Message:
Updated the IJob interface to use simple attribute access instead of
explicit accessor methods.
=== Packages/JobBoardEx/IJob.py 1.2 => 1.3 ===
"""
-
from Interface import Interface
+from Interface.Attribute import Attribute
+
class IJob(Interface):
"""Interface for the basic Job"""
- def getId():
- "Gets an ID that's unique within the containing job list"
+ id = Attribute("id",
+ "Unique ID relative to the containing job list")
- def getSubmitter():
- "Gets the email address of the submitter"
+ submitter = Attribute("submitter",
+ "Email address of the submitter")
- def getSummary():
- "Gets the one-line summary of the job"
+ summary = Attribute("summary",
+ "One-line summary of the job")
- def getDescription():
- "Gets the multiline description of the job"
+ description = Attribute("description",
+ "Longer description of the job")
- def getContactURL():
- "Gets the URL where the job seeker can go"
+ contactURL = Attribute("contactURL",
+ "URL for additional information")
- def getContactEmail():
- "Gets the email address the job seeker may send to"
+ contactEmail = Attribute("contactEmail",
+ "Email address to contact about the job")
- def getState():
- "Gets the JobState object describing the current state of this listing"
+ state = Attribute("state",
+ "Current state of the job listing.\n"
+ "The possible values are defined in JobState.")
def approve(self):
"Moves the job state to approved"
+
class JobState:
+ """Possible values of IJob.state."""
PendingApproval = 1
Approved = 2
-