~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/interfaces/launchpad.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2012-01-06 20:21:38 UTC
  • mfrom: (14646.2.1 bug912794)
  • Revision ID: launchpad@pqm.canonical.com-20120106202138-mnl55qu4h9iovgk4
[r=gary][bug=912794] update to newer launchpadlib

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
__metaclass__ = type
10
10
 
11
11
__all__ = [
 
12
    'IAging',
 
13
    'IHasDateCreated',
 
14
    'IHasIcon',
 
15
    'IHasLogo',
 
16
    'IHasMugshot',
12
17
    'ILaunchpadCelebrities',
13
18
    'ILaunchpadUsage',
 
19
    'IPrivacy',
14
20
    'IServiceUsage',
15
21
    ]
16
22
 
24
30
    Choice,
25
31
    )
26
32
 
27
 
from canonical.launchpad import _
 
33
from lp import _
28
34
from lp.app.enums import ServiceUsage
29
35
 
30
36
 
122
128
    enable_bug_expiration = Bool(
123
129
        title=_('Expire "Incomplete" bug reports when they become inactive'),
124
130
        required=True)
 
131
 
 
132
 
 
133
class IHasIcon(Interface):
 
134
    """An object that can have a custom icon."""
 
135
 
 
136
    # Each of the objects that implements this needs a custom schema, so
 
137
    # here we can just use Attributes
 
138
    icon = Attribute("The 14x14 icon.")
 
139
 
 
140
 
 
141
class IHasLogo(Interface):
 
142
    """An object that can have a custom logo."""
 
143
 
 
144
    # Each of the objects that implements this needs a custom schema, so
 
145
    # here we can just use Attributes
 
146
    logo = Attribute("The 64x64 logo.")
 
147
 
 
148
 
 
149
class IHasMugshot(Interface):
 
150
    """An object that can have a custom mugshot."""
 
151
 
 
152
    # Each of the objects that implements this needs a custom schema, so
 
153
    # here we can just use Attributes
 
154
    mugshot = Attribute("The 192x192 mugshot.")
 
155
 
 
156
 
 
157
class IAging(Interface):
 
158
    """Something that gets older as time passes."""
 
159
 
 
160
    def currentApproximateAge():
 
161
        """Return a human-readable string of how old this thing is.
 
162
 
 
163
        Values returned are things like '2 minutes', '3 hours',
 
164
        '1 month', etc.
 
165
        """
 
166
 
 
167
 
 
168
class IPrivacy(Interface):
 
169
    """Something that can be private."""
 
170
 
 
171
    private = Bool(
 
172
        title=_("This is private"),
 
173
        required=False,
 
174
        description=_(
 
175
            "Private objects are visible to members or subscribers."))
 
176
 
 
177
 
 
178
class IHasDateCreated(Interface):
 
179
    """Something created on a certain date."""
 
180
 
 
181
    datecreated = Attribute("The date on which I was created.")