/// class PD.Plugins.Plugin

PD.Plugins.Plugin = Class.extend({

    //===================================
    // FIELDS
    //===================================

    _options: null,
    _actions: null,
    _scripts: null,

    //===================================
    // CONSTRUCTOR
    //===================================

    init: function (options) {

        this._options = _.extend({
            id: null,
            name: null,
            version: "0.0.0.0",
            description: null
        }, options);

        this._actions = new PD.Actions.ActionManager();
        this._scripts = new PD.Plugins.PluginScriptCollection();

    },

    //===================================
    // PROPERTIES
    //===================================

    get_id: function () {
        return this._options.id;
    },

    get_name: function () {
        return this._options.name;
    },

    get_description: function () {
        return this._options.description;
    },

    get_version: function () {
        return this._options.version;
    },

    get_actions: function () {
        return this._actions;
    },

    get_scripts: function () {
        return this._scripts;
    },

    //===================================
    // PUBLIC METHODS
    //===================================

    toJSON: function () {
        return {
            id: this.get_id(),
            name: this.get_name(),
            description: this.get_description(),
            version: this.get_version()
        }
    }

});