Ejemplo n.º 1
0
        public void InstallPluginForFlow(byte[] zipFileContent, string flowName, NodeVisit visit)
        {
            ValidateByRole(visit, SystemRoleType.Admin);

            string flowId = GetDataFlowIdByName(flowName);

            if (flowId == null)
            {
                throw new ArgumentException(string.Format("Unrecognized flow name: \"{0}\"",
                                                          flowName));
            }
            string auditMessage = _pluginLoader.InstallPluginForFlow(zipFileContent, visit.Account.Id, flowId);

            ActivityManager.LogAudit(NodeMethod.None, flowName, visit, "{0} installed plugin for flow: {1}. Message: {2}",
                                     visit.Account.NaasAccount, flowName, auditMessage);
        }