Starting on a visibility handler
This commit is contained in:
parent
bfe68b9250
commit
3d9075a5e0
32
pipeline/handlers/activation.py
Normal file
32
pipeline/handlers/activation.py
Normal file
@ -0,0 +1,32 @@
|
||||
from .handler import Handler
|
||||
from ..exceptions import ValidationException
|
||||
|
||||
|
||||
@Handler.register
|
||||
class VisibilityHandler(Handler):
|
||||
"""
|
||||
This class handles visibility settings for streams.
|
||||
"""
|
||||
@classmethod
|
||||
def wants(cls, jobspec, existing_package):
|
||||
"""
|
||||
Return True if this handler wants to process this jobspec.
|
||||
Raises an exception if the job is wanted but doesn't pass validation.
|
||||
|
||||
In order for a job to be wanted, the field 'sources' must exist and
|
||||
at least one of the source items must contain a 'enabled' field.
|
||||
|
||||
"""
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def _validate(cls, jobspec, existing_package):
|
||||
"""
|
||||
Return True if the job is valid for this handler.
|
||||
|
||||
A job is valid as long as at least one of the package's source items
|
||||
"""
|
||||
pass
|
||||
|
||||
def _handle(self, jobspec, existing_package, tempdir):
|
||||
pass
|
Loading…
x
Reference in New Issue
Block a user