Example #1
0
        public void RemoveContainer(ContainerInfo container)
        {
            // remove container from this section
            Common.DatabaseProvider.RemoveSectionContainerLink(this, container);

            // reset containers collection
            this._Containers = null;
        }
 public abstract void RemoveSectionContainerLink(SectionInfo section, ContainerInfo container);
 public abstract void UpdateContainerPortletLink(ContainerInfo container, PortletInfo portlet, int order);
 public abstract int[] GetPortletsForContainer(ContainerInfo container);
 public abstract int GetSectionContainerLinkPosition(SectionInfo section, ContainerInfo container);
Example #6
0
 public static void RemoveContainer(ContainerInfo container)
 {
     Collection.Remove(container);
 }
 public abstract bool ContainerPortletLinked(ContainerInfo container, PortletInfo portlet);
Example #8
0
        public override bool ContainerPortletLinked(ContainerInfo container, PortletInfo portlet)
        {
            ContainerPortletLink link = ContainerPortletLink.GetByContainerIDAndPortletID(
                container.Identity,
                portlet.Identity
                );

            try
            {
                // return if combination is found
                return link.ContainerID != 0 && link.PortletID != 0;
            }
            catch (Exception)
            {
                return false;
            }
        }
Example #9
0
        public override int GetContainerPortletLinkOrder(ContainerInfo container, PortletInfo portlet)
        {
            ContainerPortletLink link = ContainerPortletLink.GetByContainerIDAndPortletID(
                container.Identity,
                portlet.Identity
                );

            return (link.ContainerID != 0 && link.PortletID != 0) ? link.SortOrder : -1;
        }
Example #10
0
        public override void AddSectionContainerLink(SectionInfo section, ContainerInfo container, int order, int position)
        {
            SectionContainerLink link = new SectionContainerLink(
                section.Identity,
                container.Identity,
                order,
                position
                );

            try
            {
                // add combination
                link.CommitChanges();
            }
            catch (Exception) { }
        }
Example #11
0
 public override void CommitContainerChanges(ContainerInfo container)
 {
     switch (container.State)
     {
         case State.Added :		// insert
             Container.Insert((Container)container);
             break;
         case State.Changed :	// commit changes
             Container.Update((Container)container);
             break;
         case State.Deleted :	// remove
             Container.Delete((Container)container);
             break;
     }
 }
Example #12
0
        public override void AddContainerPortletLink(ContainerInfo container, PortletInfo portlet, int order)
        {
            ContainerPortletLink link = new ContainerPortletLink(
                container.Identity,
                portlet.Identity,
                order
                );

            try
            {
                // add combination
                link.CommitChanges();
            }
            catch (Exception) { }
        }
Example #13
0
        public override void UpdateSectionContainerLink(SectionInfo section, ContainerInfo container, int order, int position)
        {
            SectionContainerLink link = SectionContainerLink.GetBySectionIDAndContainerID(
                section.Identity,
                container.Identity
                );
            link.SortOrder = order;
            link.Position = position;

            try
            {
                // update combination
                link.CommitChanges();
            }
            catch (Exception) { }
        }
Example #14
0
 public void UpdateContainer(ContainerInfo container, int order, int position)
 {
     // update container to this section
     Common.DatabaseProvider.UpdateSectionContainerLink(this, container, order, position);
 }
Example #15
0
 public static void AddContainer(ContainerInfo container)
 {
     Collection.Add(container);
 }
Example #16
0
        public override int[] GetPortletsForContainer(ContainerInfo container)
        {
            // get portets for specific container
            List<ContainerPortletLink> links = ContainerPortletLink.GetByContainerID(container.Identity);
            List<int> list = new List<int>(links.Count);

            foreach (ContainerPortletLink link in links)
                list.Add(link.PortletID);

            // return array of portlet ids
            return list.ToArray();
        }
Example #17
0
        public static ContainerInfo CreateNew()
        {
            ContainerInfo container = new ContainerInfo();
            container.SetState(State.Added);

            return container;
        }
Example #18
0
        public override int GetSectionContainerLinkOrder(SectionInfo section, ContainerInfo container)
        {
            SectionContainerLink link = SectionContainerLink.GetBySectionIDAndContainerID(
                section.Identity,
                container.Identity
                );

            return (link.SectionID != 0 && link.ContainerID != 0) ? link.SortOrder : -1;
        }
 public abstract void CommitContainerChanges(ContainerInfo container);
Example #20
0
        public override int GetSectionContainerLinkPosition(SectionInfo section, ContainerInfo container)
        {
            SectionContainerLink link = SectionContainerLink.GetBySectionIDAndContainerID(
                section.Identity,
                container.Identity
                );

            return (link.SectionID != 0 && link.ContainerID != 0) ? link.Position : Int32.MinValue;
        }
 public abstract int GetContainerPortletLinkOrder(ContainerInfo container, PortletInfo portlet);
Example #22
0
        public override void RemoveContainerPortletLink(ContainerInfo container, PortletInfo portlet)
        {
            ContainerPortletLink link = ContainerPortletLink.GetByContainerIDAndPortletID(
                container.Identity,
                portlet.Identity
                );

            try
            {
                // delete combination
                link.Delete();
                link.CommitChanges();
            }
            catch (Exception) { }
        }
 public abstract int GetSectionContainerLinkOrder(SectionInfo section, ContainerInfo container);
Example #24
0
        public override void RemoveSectionContainerLink(SectionInfo section, ContainerInfo container)
        {
            SectionContainerLink link = SectionContainerLink.GetBySectionIDAndContainerID(
                section.Identity,
                container.Identity
                );

            try
            {
                // delete combination
                link.Delete();
                link.CommitChanges();
            }
            catch (Exception) { }
        }
 public abstract void RemoveContainerPortletLink(ContainerInfo container, PortletInfo portlet);
Example #26
0
        public override bool SectionContainerLinked(SectionInfo section, ContainerInfo container)
        {
            SectionContainerLink link = SectionContainerLink.GetBySectionIDAndContainerID(
                section.Identity,
                container.Identity
                );

            try
            {
                // return if combination is found
                return link.SectionID != 0 && link.ContainerID != 0;
            }
            catch (Exception)
            {
                return false;
            }
        }
 public abstract bool SectionContainerLinked(SectionInfo section, ContainerInfo container);
Example #28
0
        public override void UpdateContainerPortletLink(ContainerInfo container, PortletInfo portlet, int order)
        {
            ContainerPortletLink link = ContainerPortletLink.GetByContainerIDAndPortletID(
                container.Identity,
                portlet.Identity
                );
            link.SortOrder = order;

            try
            {
                // update combination
                link.CommitChanges();
            }
            catch (Exception) { }
        }
 public abstract void UpdateSectionContainerLink(SectionInfo section, ContainerInfo container, int order, int position);
Example #30
0
        public void AddContainer(ContainerInfo container, int order, int position)
        {
            // add container to this section
            Common.DatabaseProvider.AddSectionContainerLink(this, container, order, position);

            // reset containers collection
            this._Containers = null;
        }