<s> import six <EOL> import logging <EOL> from abc import ABCMeta <EOL> from abc import abstractmethod <EOL> from . CPLogging import CPLogging as KenLog <EOL> from . PluginBase import PluginBase <EOL> LOG = logging . getLogger ( __name__ ) <EOL> class ArtifactMode ( object ) : <EOL> CREATED = <NUM_LIT:0> <EOL> MODIFIED = <NUM_LIT:1> <EOL> DELETED = <NUM_LIT:2> <EOL> COPIED = <NUM_LIT:3> <EOL> ENCRYPTED = <NUM_LIT:4> <EOL> @ six . add_metaclass ( ABCMeta ) <EOL> class BuilderPlugin ( PluginBase ) : <EOL> def __init__ ( self , version , instructions , models , controllers , slug ) : <EOL> super ( BuilderPlugin , self ) . __init__ ( version , instructions , slug ) <EOL> LOG . info ( '<STR_LIT>' % KenLog . fcn ( ) ) <EOL> self . _models = models <EOL> self . _controllers = controllers <EOL> self . _artifacts = [ ] <EOL> @ abstractmethod <EOL> def build ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def get_artifacts ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _artifacts <EOL> def add_artifact ( self , artifact , mode ) : <EOL> a = '<STR_LIT>' <EOL> if mode == ArtifactMode . CREATED : <EOL> a = '<STR_LIT>' <EOL> if mode == ArtifactMode . MODIFIED : <EOL> a = '<STR_LIT>' <EOL> if mode == ArtifactMode . DELETED : <EOL> a = '<STR_LIT>' <EOL> if mode == ArtifactMode . COPIED : <EOL> a = '<STR_LIT>' <EOL> if mode == ArtifactMode . ENCRYPTED : <EOL> a = '<STR_LIT>' <EOL> a += artifact <EOL> self . _artifacts . append ( a ) <EOL> @ property <EOL> def models ( self ) : <EOL> return self . _models <EOL> @ property <EOL> def controllers ( self ) : <EOL> return self . _controllers </s>
