Exemple #1
0
 /// <summary>
 /// WorkflowReference constructor, usable only inside Security package
 /// </summary>
 /// <param name="userId">The owner's userId</param>
 /// <param name="modelId">The model id</param>
 /// <param name="wfName">The model name</param>
 /// <param name="wfDescription">The model description</param>
 internal WorkflowReference(int userId, int modelId, string wfName, string wfDescription)
 {
     sto                = new Storage.StorageManager();
     this.userId        = userId;
     this.modelId       = modelId;
     this.wfName        = wfName;
     this.wfDescription = wfDescription;
     this.themeId       = -1;
     this.complete      = false;
     wf_cache           = null;
 }
Exemple #2
0
        private static void removeOld(object state)
        {
            /*Cleanup*/
            TimeSpan pt = TimeSpan.Parse(Security.EnvironmentManagement.getEnvValue("pruningTime"));

            Storage.StorageManager sm = new Storage.StorageManager();

            var pbs = sm.getPublicationsExpired((int)pt.TotalDays);

            foreach (var it in pbs)
            {
                sm.removeEntity <Publication>(it.Key);
            }
        }
Exemple #3
0
        /// <summary>
        /// WorkflowReference constructor, usable only inside Security package
        /// </summary>
        /// <param name="userId">The owner's userId</param>
        /// <param name="modelId">The model id</param>
        /// <param name="wfName">The model name</param>
        /// <param name="wfDescription">The model description</param>
        /// <param name="themeId">The theme id</param>
        internal WorkflowReference(int userId, int modelId, string wfName, string wfDescription, int themeId)
        {
            sto                = new Storage.StorageManager();
            this.userId        = userId;
            this.modelId       = modelId;
            this.wfName        = wfName;
            this.wfDescription = wfDescription;
            this.themeId       = themeId;
            this.complete      = true;

            if (themeId == defaultthemeid)
            {
                isDefTheme = true;
            }
            else
            {
                isDefTheme = false;
            }


            wf_cache = null;
        }
Exemple #4
0
 private static String[] setEnv(String[] tk)
 {
     return(tk.Length < 3 ? str2arr("Missing arguments. Usage: setEnv <varName> <value>") : str2arr(StorageManager.setEnvValue(tk[1], tk[2]) ? "Done." : "Error!"));
 }