/// <summary>
        /// Initializes a new instance of the 'ActionItemController' class.
        /// </summary>
        /// <param name="number">Number of the Action item.</param>
        /// <param name="alias">Alias of the Action item.</param>
        /// <param name="idXML">IdXML of the Action item.</param>
        /// <param name="agents">List of agents that can acces to the Action item.</param>
        /// <param name="classIUName">Class name of the Action item.</param>
        /// <param name="iuName">Interaction unit name of the Action item.</param>
        /// <param name="navigationalFilteringIdentity">Navigational filtering identifier.</param>
        /// <param name="actionType">Type of the action item.</param>
        /// <param name="objectActionEnabled">Boolean value indicating whether the Object-Action feature is enabled or not.</param>
        /// <param name="multiSelectionSupported">If multiselection is supported or not.</param>
        /// <param name="attributesListForFormulas">List of attributes needed for evaluating the enabling/disabling formulas.</param>
        /// <param name="parent">Parent controller.</param>
        public ActionItemController(
			int number,
			string alias,
			string idXML,
			List<string> agents,
			string classIUName,
			string iuName,
			string navigationalFilteringIdentity,
			ActionItemType actionType,
			bool objectActionEnabled,
			bool multiSelectionSupported,
			List<string> attributesListForFormulas,
			ActionController parent)
            : base(parent)
        {
            mNumber = number;
            mAlias = alias;
            mIdXML = idXML;
            mAgents = agents;
            ClassIUName = classIUName;
            IUName = iuName;
            NavigationalFilteringIdentity = navigationalFilteringIdentity;
            ActionItemType = actionType;
            ObjectActionEnabled = objectActionEnabled;
            MultiSelectionSupported = multiSelectionSupported;

            // Build the attributes for enabling/disabling formulas (comma-sepatated string).
            if (attributesListForFormulas != null)
            {
                StringBuilder lAttributes = new StringBuilder();
                foreach (string lItem in attributesListForFormulas)
                {
                    lAttributes.Append(lItem);
                    lAttributes.Append(',');
                }
                // Remove the last comma.
                if (lAttributes.Length > 0)
                {
                    lAttributes.Length--;
                }

                ActionItemAttributesForFormulas = lAttributes.ToString();
            }
        }
示例#2
0
        /// <summary>
        /// Creates the specific ActionController of the '_Auto_' Action pattern.
        /// </summary>
        /// <param name="parentController">Parent controller.</param>
        /// <returns>Specific ActionController of the '_Auto_' Action pattern.</returns>
        public static ActionController Action__Auto_(IUController parentController)
        {
            // Action _Auto_.
            ActionController lActionController = new ActionController("_Auto_", parentController, Properties.Settings.Default.ConjunctionPolicy);
            string[] lAgentsActionItem0 = { Agents.Administrador };
            List<KeyValuePair<string, string[]>> lAttrActivationItem0 = new List<KeyValuePair<string, string[]>>();

            lActionController.Add(
                0,
                "Crear nave nodriza",
                "Clas_1347649273856884AccOfer_AutoElemAcc_1_Alias",
                lAgentsActionItem0,
                "NaveNodriza",
                typeof(InteractionToolkit.NaveNodriza.IUServices.Crear_NaveNodrizaInboundIT).FullName, "",
                ActionItemType.Creation,
                false,
                true,
                lAttrActivationItem0);

            string[] lAgentsActionItem1 = { Agents.Administrador };
            List<KeyValuePair<string, string[]>> lAttrActivationItem1 = new List<KeyValuePair<string, string[]>>();

            lActionController.Add(
                1,
                "Destroy",
                "Clas_1347649273856884AccOfer_AutoElemAcc_2_Alias",
                lAgentsActionItem1,
                "NaveNodriza",
                typeof(InteractionToolkit.NaveNodriza.IUServices.SIU_delete_instanceInboundIT).FullName,
                "",
                ActionItemType.Destruction,
                false,
                true,
                lAttrActivationItem1);

            string[] lAgentsActionItem2 = { Agents.Administrador };
            List<KeyValuePair<string, string[]>> lAttrActivationItem2 = new List<KeyValuePair<string, string[]>>();

            lActionController.Add(
                2,
                "Edit",
                "Clas_1347649273856884AccOfer_AutoElemAcc_3_Alias",
                lAgentsActionItem2,
                "NaveNodriza",
                typeof(InteractionToolkit.NaveNodriza.IUServices.SIU_edit_instanceInboundIT).FullName,
                "",
                ActionItemType.Normal,
                false,
                true,
                lAttrActivationItem2);

            string[] lAgentsActionItem3 = { Agents.Administrador };
            List<KeyValuePair<string, string[]>> lAttrActivationItem3 = new List<KeyValuePair<string, string[]>>();
            lActionController.Add(
                3,
                "NaveNodriza",
                "Clas_1347649273856884AccOfer_AutoElemAcc_4_Alias",
                lAgentsActionItem3,
                "NaveNodriza",
                typeof(InteractionToolkit.NaveNodriza.IUInstances._Auto_IT).FullName,
                "",
                ActionItemType.Other,
                false,
                false,
                lAttrActivationItem3);

            string[] lAgentsActionItem4 = Logic.InstanceReportsList.GetAgentsForClass("NaveNodriza");
            List<KeyValuePair<string, string[]>> lAttrActivationItem4 = new List<KeyValuePair<string, string[]>>();
            lActionController.Add(
                4,
                LanguageConstantValues.L_PRINT,
                LanguageConstantKeys.L_PRINT,
                lAgentsActionItem4,
                "NaveNodriza",
                typeof(InteractionToolkit.PrintForm).FullName,
                "",
                ActionItemType.Print,
                true,
                true,
                lAttrActivationItem4);

            return lActionController;
        }
        /// <summary>
        /// Creates the specific ActionController of the '_Auto_' Action pattern.
        /// </summary>
        /// <param name="parentController">Parent controller.</param>
        /// <returns>Specific ActionController of the '_Auto_' Action pattern.</returns>
        public static ActionController Action__Auto_(IUController parentController)
        {
            // Action _Auto_.
            ActionController lActionController = new ActionController("_Auto_", parentController, Properties.Settings.Default.ConjunctionPolicy);
            string[] lAgentsActionItem0 = { Agents.Administrador };
            List<KeyValuePair<string, string[]>> lAttrActivationItem0 = new List<KeyValuePair<string, string[]>>();

            lActionController.Add(
                0,
                "New",
                "Clas_1348178542592177AccOfer_AutoElemAcc_1_Alias",
                lAgentsActionItem0,
                "PasajeroAeronave",
                typeof(InteractionToolkit.PasajeroAeronave.IUServices.SIU_create_instanceInboundIT).FullName, "",
                ActionItemType.Creation,
                false,
                true,
                lAttrActivationItem0);

            string[] lAgentsActionItem1 = { Agents.Administrador };
            List<KeyValuePair<string, string[]>> lAttrActivationItem1 = new List<KeyValuePair<string, string[]>>();

            lActionController.Add(
                1,
                "Destroy",
                "Clas_1348178542592177AccOfer_AutoElemAcc_2_Alias",
                lAgentsActionItem1,
                "PasajeroAeronave",
                typeof(InteractionToolkit.PasajeroAeronave.IUServices.SIU_delete_instanceInboundIT).FullName,
                "",
                ActionItemType.Destruction,
                false,
                true,
                lAttrActivationItem1);

            string[] lAgentsActionItem2 = { Agents.Administrador };
            List<KeyValuePair<string, string[]>> lAttrActivationItem2 = new List<KeyValuePair<string, string[]>>();

            lActionController.Add(
                2,
                "Edit",
                "Clas_1348178542592177AccOfer_AutoElemAcc_3_Alias",
                lAgentsActionItem2,
                "PasajeroAeronave",
                typeof(InteractionToolkit.PasajeroAeronave.IUServices.SIU_edit_instanceInboundIT).FullName,
                "",
                ActionItemType.Normal,
                false,
                true,
                lAttrActivationItem2);

            string[] lAgentsActionItem3 = { Agents.Administrador };
            List<KeyValuePair<string, string[]>> lAttrActivationItem3 = new List<KeyValuePair<string, string[]>>();
            lActionController.Add(
                3,
                "PasajeroAeronave",
                "Clas_1348178542592177AccOfer_AutoElemAcc_4_Alias",
                lAgentsActionItem3,
                "PasajeroAeronave",
                typeof(InteractionToolkit.PasajeroAeronave.IUInstances.IIU_PasajeroAeronaveIT).FullName,
                "",
                ActionItemType.Other,
                false,
                false,
                lAttrActivationItem3);

            string[] lAgentsActionItem4 = { Agents.Administrador };
            List<KeyValuePair<string, string[]>> lAttrActivationItem4 = new List<KeyValuePair<string, string[]>>();
            lActionController.Add(
                4,
                "PasajeroAeronave",
                "Clas_1348178542592177AccOfer_AutoElemAcc_5_Alias",
                lAgentsActionItem4,
                "PasajeroAeronave",
                typeof(InteractionToolkit.PasajeroAeronave.IUMasterDetails.MDIU_PasajeroAeronaveIT).FullName,
                "",
                ActionItemType.Other,
                false,
                false,
                lAttrActivationItem4);

            string[] lAgentsActionItem5 = Logic.InstanceReportsList.GetAgentsForClass("PasajeroAeronave");
            List<KeyValuePair<string, string[]>> lAttrActivationItem5 = new List<KeyValuePair<string, string[]>>();
            lActionController.Add(
                5,
                LanguageConstantValues.L_PRINT,
                LanguageConstantKeys.L_PRINT,
                lAgentsActionItem5,
                "PasajeroAeronave",
                typeof(InteractionToolkit.PrintForm).FullName,
                "",
                ActionItemType.Print,
                true,
                true,
                lAttrActivationItem5);

            return lActionController;
        }