# Path: elodie/plugins/plugins.py
# class PluginBase(object):
#     """Base class which all plugins should inherit from.
#        Defines stubs for all methods and exposes logging and database functionality
#     """
#     __name__ = 'PluginBase'
# 
#     def __init__(self):
#         # Loads the config for the plugin from config.ini
#         self.config_for_plugin = load_config_for_plugin(self.__name__)
#         self.db = PluginDb(self.__name__)
# 
#     def after(self, file_path, destination_folder, final_file_path, metadata):
#         pass
# 
#     def batch(self):
#         pass
# 
#     def before(self, file_path, destination_folder):
#         pass
# 
#     def log(self, msg):
#         # Writes an info log not shown unless being run in --debug mode.
#         log.info(dumps(
#             {self.__name__: msg}
#         ))
# 
#     def display(self, msg):
#         # Writes a log for all modes and will be displayed.
#         log.all(dumps(
#             {self.__name__: msg}
#         ))
# 
# class ElodiePluginError(Exception):
#     """Exception which can be thrown by plugins to return failures.
#     """
#     pass


from elodie.plugins.plugins import PluginBase, ElodiePluginError
"""
ThrowError plugin object used for tests.

.. moduleauthor:: Jaisen Mathai <jaisen@jmathai.com>
"""
from __future__ import print_function


class ThrowError(PluginBase):

    __name__ = 'ThrowError'

    """A dummy class to execute plugin actions for tests."""
    def __init__(self):
        pass

    def after(self, file_path, destination_folder, final_file_path, metadata):

# Path: elodie/plugins/plugins.py
# class PluginBase(object):
#     """Base class which all plugins should inherit from.
#        Defines stubs for all methods and exposes logging and database functionality
#     """
#     __name__ = 'PluginBase'
# 
#     def __init__(self):
#         # Loads the config for the plugin from config.ini
#         self.config_for_plugin = load_config_for_plugin(self.__name__)
#         self.db = PluginDb(self.__name__)
# 
#     def after(self, file_path, destination_folder, final_file_path, metadata):
#         pass
# 
#     def batch(self):
#         pass
# 
#     def before(self, file_path, destination_folder):
#         pass
# 
#     def log(self, msg):
#         # Writes an info log not shown unless being run in --debug mode.
#         log.info(dumps(
#             {self.__name__: msg}
#         ))
# 
#     def display(self, msg):
#         # Writes a log for all modes and will be displayed.
#         log.all(dumps(
#             {self.__name__: msg}
#         ))
# 
# class ElodiePluginError(Exception):
#     """Exception which can be thrown by plugins to return failures.
#     """
#     pass


# Path: elodie/plugins/throwerror/throwerror.py
from elodie.plugins.plugins import PluginBase, ElodiePluginError

"""
ThrowError plugin object used for tests.

.. moduleauthor:: Jaisen Mathai <jaisen@jmathai.com>
"""
from __future__ import print_function


class ThrowError(PluginBase):

    __name__ = 'ThrowError'

    """A dummy class to execute plugin actions for tests."""
    def __init__(self):
        pass

    def after(self, file_path, destination_folder, final_file_path, metadata):

        raise ElodiePluginError('Sample plugin error for after')