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

            // reset containers collection
            this._Containers = null;
        }
Exemplo n.º 2
0
 public abstract void RemoveSectionContainerLink(SectionInfo section, ContainerInfo container);
Exemplo n.º 3
0
 public abstract void UpdateContainerPortletLink(ContainerInfo container, PortletInfo portlet, int order);
Exemplo n.º 4
0
 public abstract int[] GetPortletsForContainer(ContainerInfo container);
Exemplo n.º 5
0
 public abstract int GetSectionContainerLinkPosition(SectionInfo section, ContainerInfo container);
Exemplo n.º 6
0
 public static void RemoveContainer(ContainerInfo container)
 {
     Collection.Remove(container);
 }
Exemplo n.º 7
0
 public abstract bool ContainerPortletLinked(ContainerInfo container, PortletInfo portlet);
Exemplo n.º 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;
            }
        }
Exemplo n.º 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;
        }
Exemplo n.º 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) { }
        }
Exemplo n.º 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;
     }
 }
Exemplo n.º 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) { }
        }
Exemplo n.º 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) { }
        }
Exemplo n.º 14
0
 public void UpdateContainer(ContainerInfo container, int order, int position)
 {
     // update container to this section
     Common.DatabaseProvider.UpdateSectionContainerLink(this, container, order, position);
 }
Exemplo n.º 15
0
 public static void AddContainer(ContainerInfo container)
 {
     Collection.Add(container);
 }
Exemplo n.º 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();
        }
Exemplo n.º 17
0
        public static ContainerInfo CreateNew()
        {
            ContainerInfo container = new ContainerInfo();
            container.SetState(State.Added);

            return container;
        }
Exemplo n.º 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;
        }
Exemplo n.º 19
0
 public abstract void CommitContainerChanges(ContainerInfo container);
Exemplo n.º 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;
        }
Exemplo n.º 21
0
 public abstract int GetContainerPortletLinkOrder(ContainerInfo container, PortletInfo portlet);
Exemplo n.º 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) { }
        }
Exemplo n.º 23
0
 public abstract int GetSectionContainerLinkOrder(SectionInfo section, ContainerInfo container);
Exemplo n.º 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) { }
        }
Exemplo n.º 25
0
 public abstract void RemoveContainerPortletLink(ContainerInfo container, PortletInfo portlet);
Exemplo n.º 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;
            }
        }
Exemplo n.º 27
0
 public abstract bool SectionContainerLinked(SectionInfo section, ContainerInfo container);
Exemplo n.º 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) { }
        }
Exemplo n.º 29
0
 public abstract void UpdateSectionContainerLink(SectionInfo section, ContainerInfo container, int order, int position);
Exemplo n.º 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;
        }