from parallels.core.application.wordpress import WordpressModel
from parallels.plesk.source.web.actions.base.application import ApplicationAction


# noinspection PyAbstractClass
class WordPressApplicationAction(ApplicationAction):
    """Base action for migrated WordPress applications
    """

    def filter_for_application(self, global_context, application):
        """Check whether we should run this action for application or not. By default True - action should be executed.

        :type global_context: parallels.plesk.source.web.global_context.WebGlobalMigrationContext
        :type application: parallels.plesk.source.web.migrated_application.MigratedApplication
        :rtype: None
        """
        return application.application_model.name == WordpressModel().name
