/// class ProspectDirector.Web.UI.Queries.ConstraintCommand
/// using ProspectDirector.Web.UI.CommandGroup

ProspectDirector.Web.UI.Queries.ConstraintCommands = ProspectDirector.Web.UI.CommandGroup.extend({

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

    init: function (options) {

        this._super(options);

        this.addCondition = new ProspectDirector.Web.UI.Queries.Commands.AddCondition({
            type: "AND",
            editor: this.get_editor(),
            selectedConstraint: this.get_selectedConstraint(),
            featureSet: this.get_featureSet()
        });

        this.clear = new ProspectDirector.Web.UI.Queries.Commands.ClearConstraints({
            editor: this.get_editor(),
            selectedConstraint: this.get_selectedConstraint(),
            featureSet: this.get_featureSet()
        });

        this.remove = new ProspectDirector.Web.UI.Queries.Commands.RemoveConstraint({
            editor: this.get_editor(),
            selectedConstraint: this.get_selectedConstraint(),
            featureSet: this.get_featureSet()
        });

        this.addFilter = new ProspectDirector.Web.UI.Queries.Commands.AddFilter({
            editor: this.get_editor(),
            selectedConstraint: this.get_selectedConstraint(),
            featureSet: this.get_featureSet()
        });

        this.editFilter = new ProspectDirector.Web.UI.Queries.Commands.EditFilter({
            editor: this.get_editor(),
            selectedConstraint: this.get_selectedConstraint(),
            featureSet: this.get_featureSet()
        });

        this.duplicateFilter = new ProspectDirector.Web.UI.Queries.Commands.DuplicateFilter({
            editor: this.get_editor(),
            selectedConstraint: this.get_selectedConstraint(),
            featureSet: this.get_featureSet()
        });

    },

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

    get_editor: function () {
        return this.get_options().editor;
    },

    get_featureSet: function () {
        return this.get_options().featureSet;
    },

    get_selectedConstraint: function () {
        return this.get_options().selectedConstraint;
    }

});