Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Terradue.Tep.WebServer.WebWpsJob"/> class.
        /// </summary>
        /// <param name="entity">Entity.</param>
        public WebCommunityTep(ThematicCommunity entity, IfyContext context = null) : base(entity)
        {
            Apps              = entity.AppsLinks;
            DiscussCategory   = entity.DiscussCategory;
            Name              = entity.Name ?? entity.Identifier;
            DefaultRole       = entity.DefaultRoleName;
            EmailNotification = entity.EmailNotification;
            EnableJoinRequest = entity.EnableJoinRequest;
            Contributor       = entity.Contributor;
            ContributorIcon   = entity.ContributorIcon;
            var domainLinks = entity.GetDomainLinks();

            if (domainLinks != null)
            {
                domainLinks.LoadItems();
                if (domainLinks.Items != null && domainLinks.Items.Count > 0)
                {
                    Links = new List <WebDataPackageItem>();
                    foreach (RemoteResource item in domainLinks.Items)
                    {
                        Links.Add(new WebDataPackageItem(item));
                    }
                }
            }
        }