~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: 2011-12-15 10:35:32 UTC
  • mfrom: (14517.1.3 new-bzr)
  • Revision ID: launchpad@pqm.canonical.com-20111215103532-q2m4uyk0r8ugiayx
[r=sinzui, poolie][bug=509016] Always load foreign plugins,
 but restrict probers to avoid accidentally opening foreign branches.
 (re-land)

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
__metaclass__ = type
10
10
 
11
11
__all__ = [
12
 
    'IAging',
13
 
    'IAuthServerApplication',
14
 
    'IHasDateCreated',
15
 
    'IHasIcon',
16
 
    'IHasLogo',
17
 
    'IHasMugshot',
18
12
    'ILaunchpadCelebrities',
19
13
    'ILaunchpadUsage',
20
 
    'IPrivateApplication',
21
 
    'IPrivacy',
22
14
    'IServiceUsage',
23
15
    ]
24
16
 
33
25
    )
34
26
 
35
27
from canonical.launchpad import _
36
 
from canonical.launchpad.webapp.interfaces import ILaunchpadApplication
37
28
from lp.app.enums import ServiceUsage
38
29
 
39
30
 
131
122
    enable_bug_expiration = Bool(
132
123
        title=_('Expire "Incomplete" bug reports when they become inactive'),
133
124
        required=True)
134
 
 
135
 
 
136
 
class IPrivateApplication(ILaunchpadApplication):
137
 
    """Launchpad private XML-RPC application root."""
138
 
 
139
 
    authserver = Attribute("""Old Authserver API end point.""")
140
 
 
141
 
    codeimportscheduler = Attribute("""Code import scheduler end point.""")
142
 
 
143
 
    codehosting = Attribute("""Codehosting end point.""")
144
 
 
145
 
    mailinglists = Attribute("""Mailing list XML-RPC end point.""")
146
 
 
147
 
    bugs = Attribute("""Launchpad Bugs XML-RPC end point.""")
148
 
 
149
 
    softwarecenteragent = Attribute(
150
 
        """Software center agent XML-RPC end point.""")
151
 
 
152
 
    featureflags = Attribute("""Feature flag information endpoint""")
153
 
 
154
 
 
155
 
class IAuthServerApplication(ILaunchpadApplication):
156
 
    """Launchpad legacy AuthServer application root."""
157
 
 
158
 
 
159
 
class IHasIcon(Interface):
160
 
    """An object that can have a custom icon."""
161
 
 
162
 
    # Each of the objects that implements this needs a custom schema, so
163
 
    # here we can just use Attributes
164
 
    icon = Attribute("The 14x14 icon.")
165
 
 
166
 
 
167
 
class IHasLogo(Interface):
168
 
    """An object that can have a custom logo."""
169
 
 
170
 
    # Each of the objects that implements this needs a custom schema, so
171
 
    # here we can just use Attributes
172
 
    logo = Attribute("The 64x64 logo.")
173
 
 
174
 
 
175
 
class IHasMugshot(Interface):
176
 
    """An object that can have a custom mugshot."""
177
 
 
178
 
    # Each of the objects that implements this needs a custom schema, so
179
 
    # here we can just use Attributes
180
 
    mugshot = Attribute("The 192x192 mugshot.")
181
 
 
182
 
 
183
 
class IAging(Interface):
184
 
    """Something that gets older as time passes."""
185
 
 
186
 
    def currentApproximateAge():
187
 
        """Return a human-readable string of how old this thing is.
188
 
 
189
 
        Values returned are things like '2 minutes', '3 hours',
190
 
        '1 month', etc.
191
 
        """
192
 
 
193
 
 
194
 
class IPrivacy(Interface):
195
 
    """Something that can be private."""
196
 
 
197
 
    private = Bool(
198
 
        title=_("This is private"),
199
 
        required=False,
200
 
        description=_(
201
 
            "Private objects are visible to members or subscribers."))
202
 
 
203
 
 
204
 
class IHasDateCreated(Interface):
205
 
    """Something created on a certain date."""
206
 
 
207
 
    datecreated = Attribute("The date on which I was created.")