Example #1
0
        /// <summary>
        /// Sets iFolder system information
        /// </summary>
        /// <param name="system">An iFolderSystem Object</param>
        public static void SetSystem(iFolderSystem system)
        {
            Store store = Store.GetStore();

            Domain domain = store.GetDomain(store.DefaultDomain);

            domain.Name                 = system.Name;
            domain.Description          = system.Description;
            domain.UsersFullNameDisplay = system.UsersFullNameDisplay;

            // before setting GroupQuotaRestrictionMethod, check if it is going to save the same method again,
            // If true, then there is no need to set the same value again, just skip.
            if ((int)domain.GroupQuotaRestrictionMethod != (int)system.GroupQuotaRestrictionMethod)
            {
                ChangeDefaultGroupQuota(system.GroupQuotaRestrictionMethod);
                domain.GroupQuotaRestrictionMethod = system.GroupQuotaRestrictionMethod;
            }
            domain.GroupSegregated = system.GroupSegregated;

            domain.Commit();
        }
Example #2
0
        /// <summary>
        /// Get the iFolder System Information Object
        /// </summary>
        /// <returns>An iFolderSystem Object</returns>
        public static iFolderSystem GetSystem()
        {
            iFolderSystem system = new iFolderSystem();

            Store store = Store.GetStore();

            Domain domain = store.GetDomain(store.DefaultDomain);

            system.ID                          = domain.ID;
            system.Name                        = domain.Name;
            system.Version                     = domain.DomainVersion.ToString();
            system.Description                 = domain.Description;
            system.UsersFullNameDisplay        = domain.UsersFullNameDisplay;
            system.GroupQuotaRestrictionMethod = domain.GroupQuotaRestrictionMethod;
            system.GroupSegregated             = domain.GroupSegregated;

            system.ReportPath        = Report.ReportPath;
            system.ReportiFolderID   = Report.ReportCollectionID;
            system.ReportiFolderName = Report.ReportCollectionName;

            return(system);
        }