text:
// *****************************************************************************
//
//  © Component Factory Pty Ltd 2012. All rights reserved.
//	The software and associated documentation supplied hereunder are the
//  proprietary information of Component Factory Pty Ltd, 17/267 Nepean Hwy,
//  Seaford, Vic 3198, Australia and are supplied subject to licence terms.
//
//  Version 4.4.1.0 	www.ComponentFactory.com
// *****************************************************************************

using System;
using System.IO;
using System.Xml;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using System.Collections.Generic;
using System.ComponentModel;
using ComponentFactory.Krypton.Toolkit;
using ComponentFactory.Krypton.Workspace;
using ComponentFactory.Krypton.Navigator;

namespace ComponentFactory.Krypton.Docking
{
    /// <summary>
    /// Base class for docking elements that manage a KryptonSpace derived class.
    /// </summary>
    [ToolboxItem(false)]
    [DesignerCategory("code")]
    [DesignTimeVisible(false)]
    public abstract class KryptonDockingSpace : DockingElementClosedCollection
    {
        #region Instance Fields
        private KryptonStorePage _ignoreStorePage;
        private KryptonSpace _space;
        private string _storeName;
        private Size _loadSize;
        private int _order;
        #endregion

        #region Identity
        /// <summary>
        /// Initialize a new instance of the KryptonDockingSpace class.
        /// </summary>
        /// <param name="name">Initial name of the element.</param>
        /// <param name="storeName">Name to use for storage pages.</param>
        public KryptonDockingSpace(string name, string storeName)
            : base(name)
        {
            _storeName = storeName;
        }
        #endregion

        #region Public
        /// <summary>
        /// Add a KryptonPage to the currently active cell or create a new cell is no cell is currently active.
        /// </summary>
        /// <param name="page">KryptonPage to be added.</param>
        public void Append(KryptonPage page)
        {
            // Use existing array adding method to prevent duplication of code
            Append(new KryptonPage[] { page });
        }

        /// <summary>
        /// Add a KryptonPage array to the currently active cell or create a new cell is no cell is currently active.
        /// </summary>
        /// <param name="pages">Array of KryptonPage instances to be added.</param>
        public void Append(KryptonPage[] pages)
        {
            // Demand that pages are not already present
            DemandPagesNotBePresent(pages);

            if (pages != null)
            {
                // If there is no active cell...
                KryptonWorkspaceCell cell = SpaceControl.ActiveCell;
                if (cell == null)
                {
                    // ...create a new cell and place at the end of the root collection
                    cell = new KryptonWorkspaceCell();
                    SpaceControl.Root.Children.Add(cell);
                }

                // Add all provided pages into the cell
                cell.Pages.AddRange(pages);
            }
        }

        /// <summary>
        /// Add a KryptonPage into an existing cell.
        /// </summary>
        /// <param name="cell">Reference to existing workspace cell.</param>
        /// <param name="page">KryptonPage instance to be added.</param>
        public void CellAppend(KryptonWorkspaceCell cell, KryptonPage page)
        {
            // Use existing array adding method to prevent duplication of code
            CellAppend(cell, new KryptonPage[] { page });
        }

        /// <summary>
        /// Add a KryptonPage array into an existing cell.
        /// </summary>
        /// <param name="cell">Reference to existing workspace cell.</param>
        /// <param name="pages">Array of KryptonPage instances to be added.</param>
        public void CellAppend(KryptonWorkspaceCell cell, KryptonPage[] pages)
        {
            // Demand that pages are not already present
            DemandPagesNotBePresent(pages);

            // Cannot insert to a null cell
            if (cell == null)
                throw new ArgumentNullException("cell");

            // Check that we actually contain the provided workspace cell
            KryptonWorkspaceCell checkCell = SpaceControl.FirstCell();
            while (checkCell != null)
            {
                if (checkCell == cell)
                    break;

                checkCell = SpaceControl.NextCell(checkCell);
            }

            if (cell != checkCell)
                throw new ArgumentException("KryptonWorkspaceCell reference is not inside this workspace");

            // Append all the pages to end of the cell pages collection
            if (pages != null)
                cell.Pages.AddRange(pages);
        }

        /// <summary>
        /// Add a KryptonPage array into an existing cell starting at the provided index.
        /// </summary>
        /// <param name="cell">Reference to existing workspace cell.</param>
        /// <param name="index">Index for inserting new pages.</param>
        /// <param name="page">KryptonPage instance to be added.</param>
        public void CellInsert(KryptonWorkspaceCell cell, int index, KryptonPage page)
        {
            // Use existing array adding method to prevent duplication of code
            CellInsert(cell, index, new KryptonPage[] { page });
        }

        /// <summary>
        /// Add a KryptonPage array into an existing cell starting at the provided index.
        /// </summary>
        /// <param name="cell">Reference to existing workspace cell.</param>
        /// <param name="index">Index for inserting new pages.</param>
        /// <param name="pages">Array of KryptonPage instances to be added.</param>
        public void CellInsert(KryptonWorkspaceCell cell, int index, KryptonPage[] pages)
        {
            // Demand that pages are not already present
            DemandPagesNotBePresent(pages);

            // Cannot insert to a null cell
            if (cell == null)
                throw new ArgumentNullException("cell");

            // Check that we actually contain the provided workspace cell
            KryptonWorkspaceCell checkCell = SpaceControl.FirstCell();
            while (checkCell != null)
            {
                if (checkCell == cell)
                    break;

                checkCell = SpaceControl.NextCell(checkCell);
            }

            if (cell != checkCell)
                throw new ArgumentException("KryptonWorkspaceCell reference is not inside this workspace");

            if (pages != null)
            {
                // Insert all the pages in sequence starting at the provided index
                foreach (KryptonPage page in pages)
                    cell.Pages.Insert(index++, page);
            }
        }

        /// <summary>
        /// Gets and sets access to the parent docking element.
        /// </summary>
        public override IDockingElement Parent
        {
            set
            {
                // Let base class perform standard processing
                base.Parent = value;

                // Grab the strings from the docking manager
                UpdateStrings();

                // Generate adding event for each cell that already exists
                KryptonWorkspaceCell cell = SpaceControl.FirstCell();
                while (cell != null)
                {
                    OnSpaceCellAdding(SpaceControl, new WorkspaceCellEventArgs(cell));
                    cell = SpaceControl.NextCell(cell);
                }
            }
        }

        /// <summary>
        /// Propogates an action request down the hierarchy of docking elements.
        /// </summary>
        /// <param name="action">Action that is requested to be performed.</param>
        /// <param name="uniqueNames">Array of unique names of the pages the action relates to.</param>
        public override void PropogateAction(DockingPropogateAction action, string[] uniqueNames)
        {
            switch (action)
            {
                case DockingPropogateAction.Loading:
                    // Force layout so that the correct number of pages is recognized
                    SpaceControl.PerformLayout();

                    // Remove all the pages including store pages
                    SpaceControl.ClearAllPages();

                    // Force layout so that the control will kill itself
                    SpaceControl.PerformLayout();
                    break;
                case DockingPropogateAction.ShowPages:
                case DockingPropogateAction.HidePages:
                    {
                        bool newVisible = (action == DockingPropogateAction.ShowPages);
                        foreach (string uniqueName in uniqueNames)
                        {
                            // Update visible state of pages that are not placeholders
                            KryptonPage page = SpaceControl.PageForUniqueName(uniqueName);
                            if ((page != null) && !(page is KryptonStorePage))
                                page.Visible = newVisible;
                        }
                    }
                    break;
                case DockingPropogateAction.ShowAllPages:
                    SpaceControl.ShowAllPages(typeof(KryptonStorePage));
                    break;
                case DockingPropogateAction.HideAllPages:
                    SpaceControl.HideAllPages(typeof(KryptonStorePage));
                    break;
                case DockingPropogateAction.RemovePages:
                case DockingPropogateAction.RemoveAndDisposePages:
                    foreach (string uniqueName in uniqueNames)
                    {
                        // If the named page exists and is not placeholder then remove it
                        KryptonPage removePage = SpaceControl.PageForUniqueName(uniqueName);
                        if ((removePage != null) && !(removePage is KryptonStorePage))
                        {
                            // Find the cell that contains the target so we can remove the page
                            KryptonWorkspaceCell cell = SpaceControl.CellForPage(removePage);
                            if (cell != null)
                            {
                                cell.Pages.Remove(removePage);

                                if (action == DockingPropogateAction.RemoveAndDisposePages)
                                    removePage.Dispose();
                            }
                        }
                    }
                    break;
                case DockingPropogateAction.RemoveAllPages:
                case DockingPropogateAction.RemoveAndDisposeAllPages:
                    {
                        // Process each cell in turn
                        KryptonWorkspaceCell cell = SpaceControl.FirstCell();
                        while (cell != null)
                        {
                            // Process each page inside the cell
                            for (int i = cell.Pages.Count - 1; i >= 0; i--)
                            {
                                // Only remove the actual page and not placeholders
                                KryptonPage page = cell.Pages[i];
                                if ((page != null) && !(page is KryptonStorePage))
                                {
                                    cell.Pages.RemoveAt(i);

                                    if (action == DockingPropogateAction.RemoveAndDisposeAllPages)
                                        page.Dispose();
                                }
                            }

                            cell = SpaceControl.NextCell(cell);
                        }

                        // Force layout so that the control will kill itself
                        SpaceControl.PerformLayout();
                    }
                    break;
                case DockingPropogateAction.StorePages:
                    foreach (string uniqueName in uniqueNames)
                    {
                        // Swap pages that are not placeholders to become placeholders
                        KryptonPage page = SpaceControl.PageForUniqueName(uniqueName);
                        if ((page != null) && !(page is KryptonStorePage))
                        {
                            // Replace the existing page with a placeholder that has the same unique name
                            KryptonWorkspaceCell cell = SpaceControl.CellForPage(page);
                            KryptonStorePage placeholder = new KryptonStorePage(uniqueName, _storeName);
                            cell.Pages.Insert(cell.Pages.IndexOf(page), placeholder);
                            cell.Pages.Remove(page);
                        }
                    }
                    break;
                case DockingPropogateAction.StoreAllPages:
                    {
                        // Process each cell in turn
                        KryptonWorkspaceCell cell = SpaceControl.FirstCell();
                        while (cell != null)
                        {
                            // Process each page inside the cell
                            for (int i = cell.Pages.Count - 1; i >= 0; i--)
                            {
                                // Swap pages that are not placeholders to become placeholders
                                KryptonPage page = cell.Pages[i];
                                if ((page != null) && !(page is KryptonStorePage))
                                {
                                    // Replace the existing page with a placeholder that has the same unique name
                                    KryptonStorePage placeholder = new KryptonStorePage(page.UniqueName, _storeName);
                                    cell.Pages.Insert(cell.Pages.IndexOf(page), placeholder);
                                    cell.Pages.Remove(page);
                                }
                            }

                            cell = SpaceControl.NextCell(cell);
                        }
                    }
                    break;
                case DockingPropogateAction.ClearFillerStoredPages:
                case DockingPropogateAction.ClearFloatingStoredPages:
                case DockingPropogateAction.ClearDockedStoredPages:
                case DockingPropogateAction.ClearStoredPages:
                    // Only process an attempt to clear all pages or those related to this docking location
                    if ((action == DockingPropogateAction.ClearStoredPages) || (action == ClearStoreAction))
                    {
                        foreach (string uniqueName in uniqueNames)
                        {
                            // Only remove a matching unique name if it is a placeholder page
                            KryptonPage removePage = SpaceControl.PageForUniqueName(uniqueName);
                            if ((removePage != null) && (removePage is KryptonStorePage))
                            {
                                // Check if the page is one marked to be ignored in this operation
                                if (removePage != IgnoreStorePage)
                                {
                                    // Find the cell that contains the target so we can remove the page
                                    KryptonWorkspaceCell cell = SpaceControl.CellForPage(removePage);
                                    if (cell != null)
                                        cell.Pages.Remove(removePage);
                                }
                            }
                        }
                    }
                    break;
                case DockingPropogateAction.ClearAllStoredPages:
                    {
                        // Process each cell in turn
                        KryptonWorkspaceCell cell = SpaceControl.FirstCell();
                        while (cell != null)
                        {
                            // Process each page inside the cell
                            for (int i = cell.Pages.Count - 1; i >= 0; i--)
                            {
                                // Remove all placeholders
                                KryptonPage page = cell.Pages[i];
                                if ((page != null) && (page is KryptonStorePage))
                                    cell.Pages.Remove(page);
                            }

                            cell = SpaceControl.NextCell(cell);
                        }
                    }
                    break;
                case DockingPropogateAction.StringChanged:
                    UpdateStrings();
                    break;
                case DockingPropogateAction.DebugOutput:
                    Console.WriteLine(SpaceControl.ToString());
                    SpaceControl.DebugOutput();
                    break;
            }

            // Let base class perform standard processing
            base.PropogateAction(action, uniqueNames);
        }

        /// <summary>
        /// Propogates an action request down the hierarchy of docking elements.
        /// </summary>
        /// <param name="action">Action that is requested to be performed.</param>
        /// <param name="pages">Array of pages the action relates to.</param>
        public override void PropogateAction(DockingPropogateAction action, KryptonPage[] pages)
        {
            switch (action)
            {
                case DockingPropogateAction.RestorePages:
                    foreach (KryptonPage page in pages)
                    {
                        // Swap pages that are placeholders for the actual pages
                        KryptonPage storePage = SpaceControl.PageForUniqueName(page.UniqueName);
                        if ((storePage != null) && (storePage is KryptonStorePage))
                        {
                            KryptonWorkspaceCell cell = SpaceControl.CellForPage(storePage);
                            cell.Pages.Insert(cell.Pages.IndexOf(storePage), page);
                        }
                    }
                    break;
            }

            // Let base class perform standard processing
            base.PropogateAction(action, pages);
        }

        /// <summary>
        /// Propogates a boolean state request down the hierarchy of docking elements.
        /// </summary>
        /// <param name="state">Boolean state that is requested to be recovered.</param>
        /// <param name="uniqueName">Unique name of the page the request relates to.</param>
        /// <returns>True/False if state is known; otherwise null indicating no information available.</returns>
        public override bool? PropogateBoolState(DockingPropogateBoolState state, string uniqueName)
        {
            switch (state)
            {
                case DockingPropogateBoolState.ContainsPage:
                    {
                        // Return the definitive answer 'true' if the control contains the named page
                        KryptonPage page = SpaceControl.PageForUniqueName(uniqueName);
                        if ((page != null) && !(page is KryptonStorePage))
                            return true;
                    }
                    break;
                case DockingPropogateBoolState.ContainsStorePage:
                    {
                        // Return definitive answer 'true' if the group controls contains a store page for the unique name.
                        KryptonPage page = SpaceControl.PageForUniqueName(uniqueName);
                        if ((page != null) && (page is KryptonStorePage))
                            return true;
                    }
                    break;
                case DockingPropogateBoolState.IsPageShowing:
                    {
                        // If we have the requested page then return the visible state of the page
                        KryptonPage page = SpaceControl.PageForUniqueName(uniqueName);
                        if ((page != null) && !(page is KryptonStorePage))
                            return page.LastVisibleSet;
                    }
                    break;
            }

            // Let base class perform standard processing
            return base.PropogateBoolState(state, uniqueName);
        }

        /// <summary>
        /// Propogates a page request down the hierarchy of docking elements.
        /// </summary>
        /// <param name="state">Request that should result in a page reference if found.</param>
        /// <param name="uniqueName">Unique name of the page the request relates to.</param>
        /// <returns>Reference to page that matches the request; otherwise null.</returns>
        public override KryptonPage PropogatePageState(DockingPropogatePageState state, string uniqueName)
        {
            switch (state)
            {
                case DockingPropogatePageState.PageForUniqueName:
                    {
                        // If we have the requested name page and it is not a placeholder then we have found it
                        KryptonPage page = SpaceControl.PageForUniqueName(uniqueName);
                        if ((page != null) && !(page is KryptonStorePage))
                            return page;
                    }
                    break;
            }

            // Let base class perform standard processing
            return base.PropogatePageState(state, uniqueName);
        }

        /// <summary>
        /// Propogates a page list request down the hierarchy of docking elements.
        /// </summary>
        /// <param name="state">Request that should result in pages collection being modified.</param>
        /// <param name="pages">Pages collection for modification by the docking elements.</param>
        public override void PropogatePageList(DockingPropogatePageList state, KryptonPageCollection pages)
        {
            switch (state)
            {
                case DockingPropogatePageList.All:
                case DockingPropogatePageList.Docked:
                case DockingPropogatePageList.Floating:
                case DockingPropogatePageList.Filler:
                    {
                        // If the request relevant to this space control?
                        if ((state == DockingPropogatePageList.All) ||
                            ((state == DockingPropogatePageList.Docked) && (ClearStoreAction == DockingPropogateAction.ClearDockedStoredPages)) ||
                            ((state == DockingPropogatePageList.Floating) && (ClearStoreAction == DockingPropogateAction.ClearFloatingStoredPages)) ||
                            ((state == DockingPropogatePageList.Filler) && (ClearStoreAction == DockingPropogateAction.ClearFillerStoredPages)))
                        {
                            // Process each cell in turn
                            KryptonWorkspaceCell cell = SpaceControl.FirstCell();
                            while (cell != null)
                            {
                                // Process each page inside the cell
                                for (int i = cell.Pages.Count - 1; i >= 0; i--)
                                {
                                    // Only add real pages and not placeholders
                                    KryptonPage page = cell.Pages[i];
                                    if ((page != null) && !(page is KryptonStorePage))
                                        pages.Add(page);
                                }

                                cell = SpaceControl.NextCell(cell);
                            }
                        }
                    }
                    break;
            }

            // Let base class perform standard processing
            base.PropogatePageList(state, pages);
        }

        /// <summary>
        /// Propogates a workspace cell list request down the hierarchy of docking elements.
        /// </summary>
        /// <param name="state">Request that should result in the cells collection being modified.</param>
        /// <param name="cells">Cells collection for modification by the docking elements.</param>
        public override void PropogateCellList(DockingPropogateCellList state, KryptonWorkspaceCellList cells)
        {
            switch (state)
            {
                case DockingPropogateCellList.All:
                case DockingPropogateCellList.Docked:
                case DockingPropogateCellList.Floating:
                case DockingPropogateCellList.Workspace:
                    {
                        // If the request relevant to this space control?
                        if ((state == DockingPropogateCellList.All) ||
                            ((state == DockingPropogateCellList.Docked) && (ClearStoreAction == DockingPropogateAction.ClearDockedStoredPages)) ||
                            ((state == DockingPropogateCellList.Floating) && (ClearStoreAction == DockingPropogateAction.ClearFloatingStoredPages)) ||
                            ((state == DockingPropogateCellList.Workspace) && (ClearStoreAction == DockingPropogateAction.ClearFillerStoredPages)))
                        {
                            // Find each cell in turn
                            KryptonWorkspaceCell cell = SpaceControl.FirstCell();
                            while (cell != null)
                            {
                                cells.Add(cell);
                                cell = SpaceControl.NextCell(cell);
                            }
                        }
                    }
                    break;
            }

            // Let base class perform standard processing
            base.PropogateCellList(state, cells);
        }

        /// <summary>
        /// Gets the number of visible pages.
        /// </summary>
        public int VisiblePages
        {
            get { return SpaceControl.PageVisibleCount; }
        }

        /// <summary>
        /// Return an array of the visible pages that are inside the cell that contains the provided unique name.
        /// </summary>
        /// <param name="uniqueName">Unique name of page that is inside the target cell.</param>
        /// <returns>Array of page references.</returns>
        public KryptonPage[] CellVisiblePages(string uniqueName)
        {
            List<KryptonPage> pages = new List<KryptonPage>();

            // Grab the cell that contains the provided unique name
            KryptonWorkspaceCell cell = SpaceControl.CellForUniqueName(uniqueName);
            if (cell != null)
            {
                // Only interested in visible pages that are not placeholders
                foreach (KryptonPage page in cell.Pages)
                    if (!(page is KryptonStorePage) && page.LastVisibleSet)
                        pages.Add(page);
            }

            return pages.ToArray();
        }

        /// <summary>
        /// Return the workspace cell that contains the named page.
        /// </summary>
        /// <param name="uniqueName">Unique name for search.</param>
        /// <returns>Reference to KryptonWorkspaceCell if match found; otherwise null.</returns>
        public KryptonWorkspaceCell CellForPage(string uniqueName)
        {
            return SpaceControl.CellForUniqueName(uniqueName);
        }

        /// <summary>
        /// Ensure the provided page is selected within the cell that contains it.
        /// </summary>
        /// <param name="uniqueName">Unique name to be selected.</param>
        public void SelectPage(string uniqueName)
        {
            // Find the cell that contains the target named paged
            KryptonWorkspaceCell cell = CellForPage(uniqueName);
            if (cell != null)
            {
                // Check that the pages collection contains the named paged
                KryptonPage page = cell.Pages[uniqueName];
                if (page != null)
                    cell.SelectedPage = page;
            }
        }

        /// <summary>
        /// Update the strings from the docking manager.
        /// </summary>
        public void UpdateStrings()
        {
            if (SpaceControl != null)
            {
                KryptonDockingManager dockingManager = DockingManager;
                if (dockingManager != null)
                {
                    SpaceControl.CloseTooltip = dockingManager.Strings.TextClose;
                    SpaceControl.PinTooltip = dockingManager.Strings.TextAutoHide;
                    SpaceControl.DropDownTooltip = dockingManager.Strings.TextWindowLocation;
                }
            }
        }

        /// <summary>
        /// Saves docking configuration information using a provider xml writer.
        /// </summary>
        /// <param name="xmlWriter">Xml writer object.</param>
        public override void SaveElementToXml(XmlWriter xmlWriter)
        {
            // Output workspace based docking element
            xmlWriter.WriteStartElement(XmlElementName);
            xmlWriter.WriteAttributeString("N", Name);
            xmlWriter.WriteAttributeString("O", Order.ToString());
            xmlWriter.WriteAttributeString("S", CommonHelper.SizeToString(SpaceControl.Size));

            // Output an xml for the contained workspace
            SpaceControl.PageSaving += new EventHandler<PageSavingEventArgs>(OnSpaceControlPageSaving);
            SpaceControl.SaveLayoutToXml(xmlWriter);
            SpaceControl.PageSaving -= new EventHandler<PageSavingEventArgs>(OnSpaceControlPageSaving);

            // Terminate the workspace element
            xmlWriter.WriteFullEndElement();
        }

        /// <summary>
        /// Loads docking configuration information using a provider xml reader.
        /// </summary>
        /// <param name="xmlReader">Xml reader object.</param>
        /// <param name="pages">Collection of available pages for adding.</param>
        public override void LoadElementFromXml(XmlReader xmlReader, KryptonPageCollection pages)
        {
            // Is it the expected xml element name?
            if (xmlReader.Name != XmlElementName)
                throw new ArgumentException("Element name '" + XmlElementName + "' was expected but found '" + xmlReader.Name + "' instead.");

            // Grab the element attributes
            string elementName = xmlReader.GetAttribute("N");
            string elementOrder = xmlReader.GetAttribute("O");
            string elementSize = xmlReader.GetAttribute("S");

            // Check the name matches up
            if (elementName != Name)
                throw new ArgumentException("Attribute 'N' value '" + Name + "' was expected but found '" + elementName + "' instead.");

            // Check for the optional element order value
            if (!string.IsNullOrEmpty(elementOrder))
                Order = int.Parse(elementOrder);
            else
                Order = -1;

            // Check for the optional element size value
            if (!string.IsNullOrEmpty(elementSize))
                LoadSize = CommonHelper.StringToSize(elementSize);
            else
                LoadSize = Size.Empty;

            // Read to the expect child element
            if (!xmlReader.Read())
                throw new ArgumentException("An element was expected but could not be read in.");

            // This should always be a workspace definition
            if (xmlReader.Name != "KW")
                throw new ArgumentException("Element name 'KW' was expected but found '" + xmlReader.Name + "' instead.");

            // Let derived class perform element specific persistence
            LoadDockingElement(xmlReader, pages);

            // Read past this element to the end element
            if (!xmlReader.Read())
                throw new ArgumentException("An element was expected but could not be read in.");
        }
        #endregion

        #region Protected
        /// <summary>
        /// Gets and sets (just once) the KryptonSpace derived class being managed.
        /// </summary>
        protected KryptonSpace SpaceControl
        {
            get { return _space; }

            set
            {
                // Cannot set a null reference!
                if (value == null)
                    throw new ArgumentNullException("value");

                // Should only ever set the value once
                if (_space != null)
                    throw new ArgumentException("Cannot set the 'Space' property more than once.");

                // Cache for future use
                _space = value;

                // Hook into space events we need to monitor
                SpaceControl.Disposed += new EventHandler(OnSpaceDisposed);
                SpaceControl.WorkspaceCellAdding += new EventHandler<WorkspaceCellEventArgs>(OnSpaceCellAdding);
                SpaceControl.PageDrop += new EventHandler<PageDropEventArgs>(RaiseSpacePageDrop);
            }
        }

        /// <summary>
        /// Gets and sets the ordering of the associated control used during loading.
        /// </summary>
        protected int Order
        {
            get { return _order; }
            set { _order = value; }
        }

        /// <summary>
        /// Gets and sets the size of the control found during loading.
        /// </summary>
        protected Size LoadSize
        {
            get { return _loadSize; }
            set { _loadSize = value; }
        }

        /// <summary>
        /// Occurs when a page is added to a cell in the workspace.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">A KryptonPageEventArgs containing the event data.</param>
        protected virtual void OnSpaceCellPageInserting(object sender, KryptonPageEventArgs e)
        {
            KryptonDockingManager dockingManager = DockingManager;
            if (dockingManager != null)
            {
                if (e.Item is KryptonStorePage)
                {
                    KryptonDockspace dockspace = sender as KryptonDockspace;
                    if ((dockspace != null) && (dockspace.CellForPage(e.Item) != null))
                    {
                        // Prevent this existing store page from being removed due to the Propogate action below. This can
                        // occur because a cell with pages is added in one go and so insert events are generated for the
                        // existing pages inside the cell to ensure that the event is always fired consistently.
                        IgnoreStorePage = (KryptonStorePage)e.Item;
                    }

                    KryptonDockableWorkspace workspace = sender as KryptonDockableWorkspace;
                    if ((workspace != null) && (workspace.CellForPage(e.Item) != null))
                    {
                        // Prevent this existing store page from being removed due to the Propogate action below. This can
                        // occur because a cell with pages is added in one go and so insert events are generated for the
                        // existing pages inside the cell to ensure that the event is always fired consistently.
                        IgnoreStorePage = (KryptonStorePage)e.Item;
                    }
                }

                // Remove any store page for the unique name of this page being added.
                dockingManager.PropogateAction(ClearStoreAction, new string[] { e.Item.UniqueName });
                IgnoreStorePage = null;
            }
        }

        /// <summary>
        /// Gets the proprogate action used to clear a store page for this implementation.
        /// </summary>
        protected abstract DockingPropogateAction ClearStoreAction { get; }

        /// <summary>
        /// Raises the type specific space control removed event determinated by the derived class.
        /// </summary>
        protected abstract void RaiseRemoved();

        /// <summary>
        /// Raises the type specific cell adding event determinated by the derived class.
        /// </summary>
        /// <param name="cell">Referecence to new cell being added.</param>
        protected abstract void RaiseCellAdding(KryptonWorkspaceCell cell);

        /// <summary>
        /// Raises the type specific cell removed event determinated by the derived class.
        /// </summary>
        /// <param name="cell">Referecence to an existing cell being removed.</param>
        protected abstract void RaiseCellRemoved(KryptonWorkspaceCell cell);

        /// <summary>
        /// Occurs when a page is dropped on the control.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">A PageDropEventArgs containing the event data.</param>
        protected abstract void RaiseSpacePageDrop(object sender, PageDropEventArgs e);

        /// <summary>
        /// Perform docking element specific actions based on the loading xml.
        /// </summary>
        /// <param name="xmlReader">Xml reader object.</param>
        /// <param name="pages">Collection of available pages.</param>
        protected override void LoadDockingElement(XmlReader xmlReader, KryptonPageCollection pages)
        {
            // Load layout information and use any matching pages in the provided collection
            SpaceControl.PageLoading += new EventHandler<PageLoadingEventArgs>(OnSpaceControlPageLoading);
            SpaceControl.RecreateLoadingPage += new EventHandler<RecreateLoadingPageEventArgs>(OnSpaceControlRecreateLoadingPage);
            SpaceControl.LoadLayoutFromXml(xmlReader, pages);
            SpaceControl.PageLoading -= new EventHandler<PageLoadingEventArgs>(OnSpaceControlPageLoading);
            SpaceControl.RecreateLoadingPage -= new EventHandler<RecreateLoadingPageEventArgs>(OnSpaceControlRecreateLoadingPage);
        }

        /// <summary>
        /// Gets and sets reference to store page to be ignored during action.
        /// </summary>
        protected KryptonStorePage IgnoreStorePage
        {
            get { return _ignoreStorePage; }
            set { _ignoreStorePage = value; }
        }
        #endregion

        #region Implementation
        private void OnSpaceDisposed(object sender, EventArgs e)
        {
            // Unhook from events to prevent memory leaking
            SpaceControl.Disposed -= new EventHandler(OnSpaceDisposed);
            SpaceControl.WorkspaceCellAdding -= new EventHandler<WorkspaceCellEventArgs>(OnSpaceCellAdding);
            SpaceControl.PageDrop -= new EventHandler<PageDropEventArgs>(RaiseSpacePageDrop);

            // Raise event to indicate the space control has been removed
            RaiseRemoved();
        }

        private void OnSpaceCellAdding(object sender, WorkspaceCellEventArgs e)
        {
            RaiseCellAdding(e.Cell);

            // Need to generate the removed event to match this adding event
            e.Cell.Disposed += new EventHandler(OnSpaceCellRemoved);
        }

        private void OnSpaceCellRemoved(object sender, EventArgs e)
        {
            // Remove event hooks so cell can be garbage collected
            KryptonWorkspaceCell cell = (KryptonWorkspaceCell)sender;
            cell.Disposed -= new EventHandler(OnSpaceCellRemoved);

            RaiseCellRemoved(cell);
        }

        private void OnSpaceControlPageLoading(object sender, PageLoadingEventArgs e)
        {
            KryptonDockingManager dockingManager = DockingManager;
            if (dockingManager != null)
            {
                DockPageLoadingEventArgs args = new DockPageLoadingEventArgs(dockingManager, e.XmlReader, e.Page);
                dockingManager.RaisePageLoading(args);
            }
        }

        private void OnSpaceControlPageSaving(object sender, PageSavingEventArgs e)
        {
            KryptonDockingManager dockingManager = DockingManager;
            if (dockingManager != null)
            {
                DockPageSavingEventArgs args = new DockPageSavingEventArgs(dockingManager, e.XmlWriter, e.Page);
                dockingManager.RaisePageSaving(args);
            }
        }

        private void OnSpaceControlRecreateLoadingPage(object sender, RecreateLoadingPageEventArgs e)
        {
            KryptonDockingManager dockingManager = DockingManager;
            if (dockingManager != null)
                dockingManager.RaiseRecreateLoadingPage(e);
        }
        #endregion
    }
}


text:
require "#{ENV['BUSSER_ROOT']}/../kitchen/data/serverspec_helper"

describe 'apache2::god_monitor' do

  describe service('god') do
    xit { should be_running   }
  end

  describe file('/etc/god/conf.d/apache2.god') do
    xit { should be_file }
  end

  # starts an apache2 sevice that works like a regular service
  # to be implemented when COOK-744 is fixed
end

redpajama_set_name: RedPajamaGithub


text:
OpenCVTests
===========

Python tests using OpenCV, the opensource computer vision library. At this point, I am just messing around with the library and seeing what I can do. It seemed easiest to play around in Python...


text:
package com.squarespace.less.plugins;

import java.util.List;

import com.squarespace.less.LessException;
import com.squarespace.less.exec.ExecEnv;
import com.squarespace.less.exec.Function;
import com.squarespace.less.exec.Registry;
import com.squarespace.less.model.Dimension;
import com.squarespace.less.model.Node;

/**
 * Dummy functions, only used for testing the general Function framework.
 */
public class DummyFunctions implements Registry<Function> {

  public static final Function DUMMY3 = new Function("dummy3", "nnn") {
    @Override
    public Node invoke(ExecEnv env, List<Node> args) throws LessException {
      double n0 = number(args.get(0));
      double n1 = number(args.get(1));
      double n2 = number(args.get(2));
      return new Dimension(n0 + n1 + n2);
    }
  };

}


text:
package org.apache.nifi.processors.standard;

import org.apache.nifi.processors.standard.ScanAttribute;
import java.util.HashMap;
import java.util.Map;

import org.apache.nifi.util.TestRunner;
import org.apache.nifi.util.TestRunners;

import org.junit.Test;

public class TestScanAttribute {

    @Test
    public void testSingleMatch() {
        final TestRunner runner = TestRunners.newTestRunner(new ScanAttribute());
        runner.setProperty(ScanAttribute.DICTIONARY_FILE, "src/test/resources/ScanAttribute/dictionary1");

        final Map<String, String> attributes = new HashMap<>();
        attributes.put("abc", "world");

        runner.enqueue(new byte[0], attributes);
        runner.run();

        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_MATCHED, 1);
        runner.clearTransferState();

        attributes.remove("abc");
        runner.enqueue(new byte[0], attributes);
        runner.run();

        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_UNMATCHED, 1);
        runner.clearTransferState();

        attributes.put("abc", "world");
        runner.setProperty(ScanAttribute.ATTRIBUTE_PATTERN, "a.*");
        runner.enqueue(new byte[0], attributes);
        runner.run();
        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_MATCHED, 1);
        runner.clearTransferState();

        runner.setProperty(ScanAttribute.ATTRIBUTE_PATTERN, "c.*");
        runner.enqueue(new byte[0], attributes);
        runner.run();
        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_UNMATCHED, 1);
        runner.clearTransferState();

    }

    @Test
    public void testAllMatch() {
        final TestRunner runner = TestRunners.newTestRunner(new ScanAttribute());
        runner.setProperty(ScanAttribute.DICTIONARY_FILE, "src/test/resources/ScanAttribute/dictionary1");
        runner.setProperty(ScanAttribute.MATCHING_CRITERIA, ScanAttribute.MATCH_CRITERIA_ALL);
        runner.setProperty(ScanAttribute.ATTRIBUTE_PATTERN, "a.*");

        final Map<String, String> attributes = new HashMap<>();
        attributes.put("abc", "world");

        runner.enqueue(new byte[0], attributes);
        runner.run();

        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_MATCHED, 1);
        runner.clearTransferState();

        attributes.remove("abc");
        runner.enqueue(new byte[0], attributes);
        runner.run();

        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_MATCHED, 1);
        runner.clearTransferState();

        attributes.put("abc", "world");
        attributes.put("a world", "apart");
        runner.enqueue(new byte[0], attributes);
        runner.run();
        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_UNMATCHED, 1);
        runner.clearTransferState();

        attributes.put("abc", "world");
        attributes.put("a world", "hello");
        runner.enqueue(new byte[0], attributes);
        runner.run();
        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_MATCHED, 1);
    }

    @Test
    public void testWithEmptyEntries() {
        final TestRunner runner = TestRunners.newTestRunner(new ScanAttribute());
        runner.setProperty(ScanAttribute.DICTIONARY_FILE, "src/test/resources/ScanAttribute/dictionary-with-empty-new-lines");

        final Map<String, String> attributes = new HashMap<>();
        attributes.put("abc", "");

        runner.enqueue(new byte[0], attributes);
        runner.run();

        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_UNMATCHED, 1);
        runner.clearTransferState();

        runner.setProperty(ScanAttribute.ATTRIBUTE_PATTERN, "a.*");
        runner.enqueue(new byte[0], attributes);
        runner.run();
        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_UNMATCHED, 1);
    }

    @Test
    public void testWithDictionaryFilter() {
        final TestRunner runner = TestRunners.newTestRunner(new ScanAttribute());
        runner.setProperty(ScanAttribute.DICTIONARY_FILE, "src/test/resources/ScanAttribute/dictionary-with-extra-info");
        runner.setProperty(ScanAttribute.DICTIONARY_FILTER, "(.*)<greeting>");

        final Map<String, String> attributes = new HashMap<>();
        attributes.put("abc", "hello");

        runner.enqueue(new byte[0], attributes);
        runner.run();
        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_MATCHED, 1);
        runner.clearTransferState();

        attributes.put("abc", "world");
        runner.enqueue(new byte[0], attributes);
        runner.run();
        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_UNMATCHED, 1);
        runner.clearTransferState();

        runner.setProperty(ScanAttribute.DICTIONARY_FILTER, "(.*)<.*>");
        runner.enqueue(new byte[0], attributes);
        runner.run();
        runner.assertAllFlowFilesTransferred(ScanAttribute.REL_MATCHED, 1);
        runner.clearTransferState();
    }
}


text:
package edu.mit.media.funf.probe.builtin;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import android.net.Uri;
import android.provider.MediaStore.Images;
import edu.mit.media.funf.probe.CursorCell;
import edu.mit.media.funf.probe.DatedContentProviderProbe;
import edu.mit.media.funf.probe.builtin.ProbeKeys.ImagesKeys;

public class ImagesProbe extends DatedContentProviderProbe implements ImagesKeys {

	@Override
	protected Uri getContentProviderUri() {
		return Images.Media.EXTERNAL_CONTENT_URI;
	}

	@Override
	protected String getDateColumnName() {
		return  Images.Media.DATE_MODIFIED;
	}

	@Override
	protected String getDataName() {
		return IMAGES;
	}

	@Override
	protected String getDisplayName() {
		return "Image File Stats Probe";
	}

	protected TimeUnit getDateColumnTimeUnit() {
		return TimeUnit.SECONDS;
	}

	@Override
	protected Map<String, CursorCell<?>> getProjectionMap() {
		Map<String, CursorCell<?>> projectionMap = new HashMap<String, CursorCell<?>>();
		projectionMap.put(Images.Media._ID, stringCell());
		// Ignoring DATA, too large and not relevant
		projectionMap.put(Images.Media.DATE_ADDED, longCell());
		projectionMap.put(Images.Media.DATE_MODIFIED, longCell());
		projectionMap.put(Images.Media.DISPLAY_NAME, hashedStringCell());
		projectionMap.put(Images.Media.MIME_TYPE, stringCell());
		projectionMap.put(Images.Media.SIZE, longCell());
		projectionMap.put(Images.Media.TITLE, hashedStringCell());
		projectionMap.put(Images.Media.BUCKET_DISPLAY_NAME, hashedStringCell());
		projectionMap.put(Images.Media.BUCKET_ID, stringCell());
		projectionMap.put(Images.Media.DATE_TAKEN, longCell());
		projectionMap.put(Images.Media.DESCRIPTION, hashedStringCell());
		projectionMap.put(Images.Media.IS_PRIVATE, intCell());
		projectionMap.put(Images.Media.LATITUDE, doubleCell());
		projectionMap.put(Images.Media.LONGITUDE, doubleCell());
		projectionMap.put(Images.Media.MINI_THUMB_MAGIC, intCell());
		projectionMap.put(Images.Media.ORIENTATION, intCell());
		projectionMap.put(Images.Media.PICASA_ID, stringCell());
		return projectionMap;
	}

	@Override
	public String[] getRequiredPermissions() {
		return null;
	}

}


text:
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<info type="text/html" mode="escaped"></info>
</feed>


text:
package org.springframework.remoting.support;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

import org.aopalliance.intercept.MethodInvocation;

import org.springframework.util.ClassUtils;

/**
 * Encapsulates a remote invocation, providing core method invocation properties
 * in a serializable fashion. Used for RMI and HTTP-based serialization invokers.
 *
 *
This is an SPI class, typically not used directly by applications.
 * Can be subclassed for additional invocation parameters.
 *
 *
Both {@link RemoteInvocation} and {@link RemoteInvocationResult} are designed
 * for use with standard Java serialization as well as JavaBean-style serialization.
 *
 * @author Juergen Hoeller
 * @since 25.02.2004
 * @see RemoteInvocationResult
 * @see RemoteInvocationFactory
 * @see RemoteInvocationExecutor
 * @see org.springframework.remoting.rmi.RmiProxyFactoryBean
 * @see org.springframework.remoting.rmi.RmiServiceExporter
 * @see org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean
 * @see org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter
 */
public class RemoteInvocation implements Serializable {

	/** use serialVersionUID from Spring 1.1 for interoperability */
	private static final long serialVersionUID = 6876024250231820554L;

	private String methodName;

	private Class<?>[] parameterTypes;

	private Object[] arguments;

	private Map<String, Serializable> attributes;

	/**
	 * Create a new RemoteInvocation for the given AOP method invocation.
	 * @param methodInvocation the AOP invocation to convert
	 */
	public RemoteInvocation(MethodInvocation methodInvocation) {
		this.methodName = methodInvocation.getMethod().getName();
		this.parameterTypes = methodInvocation.getMethod().getParameterTypes();
		this.arguments = methodInvocation.getArguments();
	}

	/**
	 * Create a new RemoteInvocation for the given parameters.
	 * @param methodName the name of the method to invoke
	 * @param parameterTypes the parameter types of the method
	 * @param arguments the arguments for the invocation
	 */
	public RemoteInvocation(String methodName, Class<?>[] parameterTypes, Object[] arguments) {
		this.methodName = methodName;
		this.parameterTypes = parameterTypes;
		this.arguments = arguments;
	}

	/**
	 * Create a new RemoteInvocation for JavaBean-style deserialization
	 * (e.g. with Jackson).
	 */
	public RemoteInvocation() {
	}

	/**
	 * Set the name of the target method.
	 *
This setter is intended for JavaBean-style deserialization.
	 */
	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}

	/**
	 * Return the name of the target method.
	 */
	public String getMethodName() {
		return this.methodName;
	}

	/**
	 * Set the parameter types of the target method.
	 *
This setter is intended for JavaBean-style deserialization.
	 */
	public void setParameterTypes(Class<?>[] parameterTypes) {
		this.parameterTypes = parameterTypes;
	}

	/**
	 * Return the parameter types of the target method.
	 */
	public Class<?>[] getParameterTypes() {
		return this.parameterTypes;
	}

	/**
	 * Set the arguments for the target method call.
	 *
This setter is intended for JavaBean-style deserialization.
	 */
	public void setArguments(Object[] arguments) {
		this.arguments = arguments;
	}

	/**
	 * Return the arguments for the target method call.
	 */
	public Object[] getArguments() {
		return this.arguments;
	}

	/**
	 * Add an additional invocation attribute. Useful to add additional
	 * invocation context without having to subclass RemoteInvocation.
	 *
Attribute keys have to be unique, and no overriding of existing
	 * attributes is allowed.
	 *
The implementation avoids to unnecessarily create the attributes
	 * Map, to minimize serialization size.
	 * @param key the attribute key
	 * @param value the attribute value
	 * @throws IllegalStateException if the key is already bound
	 */
	public void addAttribute(String key, Serializable value) throws IllegalStateException {
		if (this.attributes == null) {
			this.attributes = new HashMap<>();
		}
		if (this.attributes.containsKey(key)) {
			throw new IllegalStateException("There is already an attribute with key '" + key + "' bound");
		}
		this.attributes.put(key, value);
	}

	/**
	 * Retrieve the attribute for the given key, if any.
	 *
The implementation avoids to unnecessarily create the attributes
	 * Map, to minimize serialization size.
	 * @param key the attribute key
	 * @return the attribute value, or {@code null} if not defined
	 */
	public Serializable getAttribute(String key) {
		if (this.attributes == null) {
			return null;
		}
		return this.attributes.get(key);
	}

	/**
	 * Set the attributes Map. Only here for special purposes:
	 * Preferably, use {@link #addAttribute} and {@link #getAttribute}.
	 * @param attributes the attributes Map
	 * @see #addAttribute
	 * @see #getAttribute
	 */
	public void setAttributes(Map<String, Serializable> attributes) {
		this.attributes = attributes;
	}

	/**
	 * Return the attributes Map. Mainly here for debugging purposes:
	 * Preferably, use {@link #addAttribute} and {@link #getAttribute}.
	 * @return the attributes Map, or {@code null} if none created
	 * @see #addAttribute
	 * @see #getAttribute
	 */
	public Map<String, Serializable> getAttributes() {
		return this.attributes;
	}

	/**
	 * Perform this invocation on the given target object.
	 * Typically called when a RemoteInvocation is received on the server.
	 * @param targetObject the target object to apply the invocation to
	 * @return the invocation result
	 * @throws NoSuchMethodException if the method name could not be resolved
	 * @throws IllegalAccessException if the method could not be accessed
	 * @throws InvocationTargetException if the method invocation resulted in an exception
	 * @see java.lang.reflect.Method#invoke
	 */
	public Object invoke(Object targetObject)
			throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {

		Method method = targetObject.getClass().getMethod(this.methodName, this.parameterTypes);
		return method.invoke(targetObject, this.arguments);
	}

	@Override
	public String toString() {
		return "RemoteInvocation: method name '" + this.methodName + "'; parameter types " +
				ClassUtils.classNamesToString(this.parameterTypes);
	}

}


text:
Get Fake
=================================

A sinatra app which helps to get Fake data. It uses Ruby Faker gem to generate Fake data.

Introduction
------------
Check it out @ http://getfake.com

Anil Wadghule | github.com/anildigital | twitter.com/anildigital


text:
class Admin::UsersController < ApplicationController

  sortable_attributes :name, :age, :email, :group => "groups.name",
                      :age_and_name => ["age", "users.name"]

  def index
    @users = User.find :all, :include => :group, :order => sort_order
  end

end


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * Form Declaration
 *
 * Creates the opening portion of the form.
 *
 * Modified to accomodate HTTPS actions, and also auto
 * injects a hidden input for a token. (See Tokens library)
 *
 * @param  string  the URI segments of the form destination
 * @param  array   a key/value pair of attributes
 * @param  array   a key/value pair hidden data
 */
if( ! function_exists('form_open') )
{
	function form_open($action = '', $attributes = array(), $hidden = array())
	{
		$CI =& get_instance();

		// Load URL helper for the site_url and base_url functions
		$CI->load->helper('url');

		// Set the link protocol to https if secure
		$link_protocol = ( USE_SSL && is_https() )
			? 'https'
			: NULL;

		// If no action is provided then set to the current url
		if ( ! $action)
		{
			$action = current_url($action);

			if( is_https() )
			{
				if( parse_url( $action, PHP_URL_SCHEME ) == 'http' )
				{
					$action = substr( $action, 0, 4 ) . 's' . substr( $action, 4 );
				}
			}

			$action = ( $_SERVER['QUERY_STRING'] )
				? $action . '?' . $_SERVER['QUERY_STRING']
				: $action;
		}
		// If an action is not a full URL then turn it into one
		elseif (strpos($action, '://') === FALSE)
		{
			$action = site_url($action, $link_protocol);
		}

		$attributes = _attributes_to_string($attributes);

		if (stripos($attributes, 'method=') === FALSE)
		{
			$attributes .= ' method="post"';
		}

		if (stripos($attributes, 'accept-charset=') === FALSE)
		{
			$attributes .= ' accept-charset="'.strtolower(config_item('charset')).'"';
		}

		$form = '<form action="'.$action.'"'.$attributes.">\n";

		// Add CSRF field if enabled, but leave it out for GET requests and requests to external websites
		if ($CI->config->item('csrf_protection') === TRUE && strpos($action, base_url('', $link_protocol)) !== FALSE && ! stripos($form, 'method="get"'))
		{
			$hidden[$CI->security->get_csrf_token_name()] = $CI->security->get_csrf_hash();
		}

		// Add MY CSRF token if MY CSRF library is loaded
		if( $CI->load->is_loaded('tokens') && strpos($action, base_url('', $link_protocol)) !== FALSE  && ! stripos($form, 'method="get"') )
		{
			$hidden[ $CI->tokens->name ] = $CI->tokens->token();
		}

		if (is_array($hidden))
		{
			foreach ($hidden as $name => $value)
			{
				$form .= '<input type="hidden" name="'.$name.'" value="'.html_escape($value).'" style="display:none;" />'."\n";
			}
		}

		return $form;
	}
}

// --------------------------------------------------------------

/* End of file MY_form_helper.php */
/* Location: /community_auth/helpers/MY_form_helper.php */


text:
package de.vandermeer.skb.base.info;

import de.vandermeer.skb.interfaces.messagesets.IsErrorSetFT;

/**
 * Abstract target implementation.
 *
 * @author     Sven van der Meer <vdmeer.sven@mykolab.com>
 * @version    v0.2.0 build 170404 (04-Apr-17) for Java 1.8
 * @since      v0.0.7
 */
public abstract class AbstractTarget implements InfoTarget {

	/** List of errors that occurred during initialization, empty if object is valid. */
	final IsErrorSetFT errors = IsErrorSetFT.create();

	@Override
	public IsErrorSetFT getInitError(){
		return this.errors;
	}

	@Override
	public Object getTarget() {
		return null;
	}

}


text:
package org.jbb.permissions.api.identity;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class AnonymousIdentity implements SecurityIdentity {

    private static final AnonymousIdentity INSTANCE = new AnonymousIdentity();

    public static AnonymousIdentity getInstance() {
        return INSTANCE;
    }

    @Override
    public Long getId() {
        return 0L; //NOSONAR
    }

    @Override
    public Type getType() {
        return Type.ANONYMOUS;
    }
}


text:
FROM phusion/baseimage:latest

ENV DEBIAN_FRONTEND noninteractive
ENV PATH /usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

RUN apt-get update
RUN apt-get install -y beanstalkd
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

VOLUME /var/lib/beanstalkd/data

EXPOSE 11300

CMD ["/usr/bin/beanstalkd"]


text:
package me.reddev.osucelebrity.twitch;

public interface TwitchIrcSettings {
  String getTwitchIrcHost();

  int getTwitchIrcPort();

  String getTwitchIrcChannel();

  String getTwitchIrcUsername();

  String getTwitchToken();

  String getTwitchIrcCommand();

  String getTwitchWhisperIrcHost();

  int getTwitchWhisperIrcPort();
}


text:
package io.github.codemumbler.cloakdb;

import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.*;
import java.util.Calendar;
import java.util.Map;

class CloakCallableStatement implements CallableStatement {

	private CallableStatement callableStatement;
	private Dialect dialect;
	private CloakPrepareCall prepareCall;

	CloakCallableStatement(CallableStatement callableStatement, Dialect dialect, CloakPrepareCall prepareCall) {
		this.callableStatement = callableStatement;
		this.dialect = dialect;
		this.prepareCall = prepareCall;
	}

	@Override
	public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException {
		this.callableStatement.registerOutParameter(parameterIndex, sqlType);
	}

	@Override
	public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException {
		this.callableStatement.registerOutParameter(parameterIndex, sqlType, scale);
	}

	@Override
	public boolean wasNull() throws SQLException {
		return this.callableStatement.wasNull();
	}

	@Override
	public String getString(int parameterIndex) throws SQLException {
		return this.callableStatement.getString(parameterIndex);
	}

	@Override
	public boolean getBoolean(int parameterIndex) throws SQLException {
		return this.callableStatement.getBoolean(parameterIndex);
	}

	@Override
	public byte getByte(int parameterIndex) throws SQLException {
		return this.callableStatement.getByte(parameterIndex);
	}

	@Override
	public short getShort(int parameterIndex) throws SQLException {
		return this.callableStatement.getShort(parameterIndex);
	}

	@Override
	public int getInt(int parameterIndex) throws SQLException {
		return this.callableStatement.getInt(parameterIndex);
	}

	@Override
	public long getLong(int parameterIndex) throws SQLException {
		return this.callableStatement.getLong(parameterIndex);
	}

	@Override
	public float getFloat(int parameterIndex) throws SQLException {
		return this.callableStatement.getFloat(parameterIndex);
	}

	@Override
	public double getDouble(int parameterIndex) throws SQLException {
		return this.callableStatement.getDouble(parameterIndex);
	}

	@Override
	public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException {
		return this.callableStatement.getBigDecimal(parameterIndex, scale);
	}

	@Override
	public byte[] getBytes(int parameterIndex) throws SQLException {
		return this.callableStatement.getBytes(parameterIndex);
	}

	@Override
	public Date getDate(int parameterIndex) throws SQLException {
		return this.callableStatement.getDate(parameterIndex);
	}

	@Override
	public Time getTime(int parameterIndex) throws SQLException {
		return this.callableStatement.getTime(parameterIndex);
	}

	@Override
	public Timestamp getTimestamp(int parameterIndex) throws SQLException {
		return this.callableStatement.getTimestamp(parameterIndex);
	}

	@Override
	public Object getObject(int parameterIndex) throws SQLException {
		return this.callableStatement.getObject(parameterIndex);
	}

	@Override
	public BigDecimal getBigDecimal(int parameterIndex) throws SQLException {
		return this.callableStatement.getBigDecimal(parameterIndex);
	}

	@Override
	public Object getObject(int parameterIndex, Map<String, Class<?>> map) throws SQLException {
		return this.callableStatement.getObject(parameterIndex, map);
	}

	@Override
	public Ref getRef(int parameterIndex) throws SQLException {
		return this.callableStatement.getRef(parameterIndex);
	}

	@Override
	public Blob getBlob(int parameterIndex) throws SQLException {
		return this.callableStatement.getBlob(parameterIndex);
	}

	@Override
	public Clob getClob(int parameterIndex) throws SQLException {
		return this.callableStatement.getClob(parameterIndex);
	}

	@Override
	public Array getArray(int parameterIndex) throws SQLException {
		return this.callableStatement.getArray(parameterIndex);
	}

	@Override
	public Date getDate(int parameterIndex, Calendar cal) throws SQLException {
		return this.callableStatement.getDate(parameterIndex, cal);
	}

	@Override
	public Time getTime(int parameterIndex, Calendar cal) throws SQLException {
		return this.callableStatement.getTime(parameterIndex, cal);
	}

	@Override
	public Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException {
		return this.callableStatement.getTimestamp(parameterIndex, cal);
	}

	@Override
	public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException {
		this.callableStatement.registerOutParameter(parameterIndex, sqlType, typeName);
	}

	@Override
	public void registerOutParameter(String parameterName, int sqlType) throws SQLException {
		this.callableStatement.registerOutParameter(parameterName, sqlType);
	}

	@Override
	public void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException {
		this.callableStatement.registerOutParameter(parameterName, sqlType, scale);
	}

	@Override
	public void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException {
		this.callableStatement.registerOutParameter(parameterName, sqlType, typeName);
	}

	@Override
	public URL getURL(int parameterIndex) throws SQLException {
		return this.callableStatement.getURL(parameterIndex);
	}

	@Override
	public void setURL(String parameterName, URL val) throws SQLException {
		this.callableStatement.setURL(parameterName, val);
	}

	@Override
	public void setNull(String parameterName, int sqlType) throws SQLException {
		this.callableStatement.setNull(parameterName, sqlType);
	}

	@Override
	public void setBoolean(String parameterName, boolean x) throws SQLException {
		this.callableStatement.setBoolean(parameterName, x);
	}

	@Override
	public void setByte(String parameterName, byte x) throws SQLException {
		this.callableStatement.setByte(parameterName, x);
	}

	@Override
	public void setShort(String parameterName, short x) throws SQLException {
		this.callableStatement.setShort(parameterName, x);
	}

	@Override
	public void setInt(String parameterName, int x) throws SQLException {
		this.callableStatement.setInt(parameterName, x);
	}

	@Override
	public void setLong(String parameterName, long x) throws SQLException {
		this.callableStatement.setLong(parameterName, x);
	}

	@Override
	public void setFloat(String parameterName, float x) throws SQLException {
		this.callableStatement.setFloat(parameterName, x);
	}

	@Override
	public void setDouble(String parameterName, double x) throws SQLException {
		this.callableStatement.setDouble(parameterName, x);
	}

	@Override
	public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException {
		this.callableStatement.setBigDecimal(parameterName, x);
	}

	@Override
	public void setString(String parameterName, String x) throws SQLException {
		this.callableStatement.setString(parameterName, x);
	}

	@Override
	public void setBytes(String parameterName, byte[] x) throws SQLException {
		this.callableStatement.setBytes(parameterName, x);
	}

	@Override
	public void setDate(String parameterName, Date x) throws SQLException {
		this.callableStatement.setDate(parameterName, x);
	}

	@Override
	public void setTime(String parameterName, Time x) throws SQLException {
		this.callableStatement.setTime(parameterName, x);
	}

	@Override
	public void setTimestamp(String parameterName, Timestamp x) throws SQLException {
		this.callableStatement.setTimestamp(parameterName, x);
	}

	@Override
	public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException {
		this.callableStatement.setAsciiStream(parameterName, x, length);
	}

	@Override
	public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException {
		this.callableStatement.setBinaryStream(parameterName, x, length);
	}

	@Override
	public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException {
		this.callableStatement.setObject(parameterName, x, targetSqlType);
	}

	@Override
	public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException {
		this.callableStatement.setObject(parameterName, x, targetSqlType);
	}

	@Override
	public void setObject(String parameterName, Object x) throws SQLException {
		this.callableStatement.setObject(parameterName, x);
	}

	@Override
	public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException {
		this.callableStatement.setCharacterStream(parameterName, reader, length);
	}

	@Override
	public void setDate(String parameterName, Date x, Calendar cal) throws SQLException {
		this.callableStatement.setDate(parameterName, x, cal);
	}

	@Override
	public void setTime(String parameterName, Time x, Calendar cal) throws SQLException {
		this.callableStatement.setTime(parameterName, x, cal);
	}

	@Override
	public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException {
		this.callableStatement.setTimestamp(parameterName, x, cal);
	}

	@Override
	public void setNull(String parameterName, int sqlType, String typeName) throws SQLException {
		this.callableStatement.setNull(parameterName, sqlType, typeName);
	}

	@Override
	public String getString(String parameterName) throws SQLException {
		return this.callableStatement.getString(parameterName);
	}

	@Override
	public boolean getBoolean(String parameterName) throws SQLException {
		return this.callableStatement.getBoolean(parameterName);
	}

	@Override
	public byte getByte(String parameterName) throws SQLException {
		return this.callableStatement.getByte(parameterName);
	}

	@Override
	public short getShort(String parameterName) throws SQLException {
		return this.callableStatement.getShort(parameterName);
	}

	@Override
	public int getInt(String parameterName) throws SQLException {
		return this.callableStatement.getInt(parameterName);
	}

	@Override
	public long getLong(String parameterName) throws SQLException {
		return this.callableStatement.getLong(parameterName);
	}

	@Override
	public float getFloat(String parameterName) throws SQLException {
		return this.callableStatement.getFloat(parameterName);
	}

	@Override
	public double getDouble(String parameterName) throws SQLException {
		return this.callableStatement.getDouble(parameterName);
	}

	@Override
	public byte[] getBytes(String parameterName) throws SQLException {
		return this.callableStatement.getBytes(parameterName);
	}

	@Override
	public Date getDate(String parameterName) throws SQLException {
		return this.callableStatement.getDate(parameterName);
	}

	@Override
	public Time getTime(String parameterName) throws SQLException {
		return this.callableStatement.getTime(parameterName);
	}

	@Override
	public Timestamp getTimestamp(String parameterName) throws SQLException {
		return this.callableStatement.getTimestamp(parameterName);
	}

	@Override
	public Object getObject(String parameterName) throws SQLException {
		return this.callableStatement.getObject(parameterName);
	}

	@Override
	public BigDecimal getBigDecimal(String parameterName) throws SQLException {
		return this.callableStatement.getBigDecimal(parameterName);
	}

	@Override
	public Object getObject(String parameterName, Map<String, Class<?>> map) throws SQLException {
		return this.callableStatement.getObject(parameterName, map);
	}

	@Override
	public Ref getRef(String parameterName) throws SQLException {
		return this.callableStatement.getRef(parameterName);
	}

	@Override
	public Blob getBlob(String parameterName) throws SQLException {
		return this.callableStatement.getBlob(parameterName);
	}

	@Override
	public Clob getClob(String parameterName) throws SQLException {
		return this.callableStatement.getClob(parameterName);
	}

	@Override
	public Array getArray(String parameterName) throws SQLException {
		return this.callableStatement.getArray(parameterName);
	}

	@Override
	public Date getDate(String parameterName, Calendar cal) throws SQLException {
		return this.callableStatement.getDate(parameterName, cal);
	}

	@Override
	public Time getTime(String parameterName, Calendar cal) throws SQLException {
		return this.callableStatement.getTime(parameterName, cal);
	}

	@Override
	public Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException {
		return this.callableStatement.getTimestamp(parameterName, cal);
	}

	@Override
	public URL getURL(String parameterName) throws SQLException {
		return this.callableStatement.getURL(parameterName);
	}

	@Override
	public RowId getRowId(int parameterIndex) throws SQLException {
		return this.callableStatement.getRowId(parameterIndex);
	}

	@Override
	public RowId getRowId(String parameterName) throws SQLException {
		return this.callableStatement.getRowId(parameterName);
	}

	@Override
	public void setRowId(String parameterName, RowId x) throws SQLException {
		this.callableStatement.setRowId(parameterName, x);
	}

	@Override
	public void setNString(String parameterName, String value) throws SQLException {
		this.callableStatement.setNString(parameterName, value);
	}

	@Override
	public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException {
		this.callableStatement.setNCharacterStream(parameterName, value, length);
	}

	@Override
	public void setNClob(String parameterName, NClob value) throws SQLException {
		this.callableStatement.setNClob(parameterName, value);
	}

	@Override
	public void setClob(String parameterName, Reader reader, long length) throws SQLException {
		this.callableStatement.setClob(parameterName, reader, length);
	}

	@Override
	public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException {
		this.callableStatement.setBlob(parameterName, inputStream, length);
	}

	@Override
	public void setNClob(String parameterName, Reader reader, long length) throws SQLException {
		this.callableStatement.setNClob(parameterName, reader, length);
	}

	@Override
	public NClob getNClob(int parameterIndex) throws SQLException {
		return this.callableStatement.getNClob(parameterIndex);
	}

	@Override
	public NClob getNClob(String parameterName) throws SQLException {
		return this.callableStatement.getNClob(parameterName);
	}

	@Override
	public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException {
		this.callableStatement.setSQLXML(parameterName, xmlObject);
	}

	@Override
	public SQLXML getSQLXML(int parameterIndex) throws SQLException {
		return this.callableStatement.getSQLXML(parameterIndex);
	}

	@Override
	public SQLXML getSQLXML(String parameterName) throws SQLException {
		return this.callableStatement.getSQLXML(parameterName);
	}

	@Override
	public String getNString(int parameterIndex) throws SQLException {
		return this.callableStatement.getNString(parameterIndex);
	}

	@Override
	public String getNString(String parameterName) throws SQLException {
		return this.callableStatement.getNString(parameterName);
	}

	@Override
	public Reader getNCharacterStream(int parameterIndex) throws SQLException {
		return this.callableStatement.getNCharacterStream(parameterIndex);
	}

	@Override
	public Reader getNCharacterStream(String parameterName) throws SQLException {
		return this.callableStatement.getNCharacterStream(parameterName);
	}

	@Override
	public Reader getCharacterStream(int parameterIndex) throws SQLException {
		return this.callableStatement.getCharacterStream(parameterIndex);
	}

	@Override
	public Reader getCharacterStream(String parameterName) throws SQLException {
		return this.callableStatement.getCharacterStream(parameterName);
	}

	@Override
	public void setBlob(String parameterName, Blob x) throws SQLException {
		this.callableStatement.setBlob(parameterName, x);
	}

	@Override
	public void setClob(String parameterName, Clob x) throws SQLException {
		this.callableStatement.setClob(parameterName, x);
	}

	@Override
	public void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException {
		this.callableStatement.setAsciiStream(parameterName, x, length);
	}

	@Override
	public void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException {
		this.callableStatement.setBinaryStream(parameterName, x, length);
	}

	@Override
	public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException {
		this.callableStatement.setCharacterStream(parameterName, reader, length);
	}

	@Override
	public void setAsciiStream(String parameterName, InputStream x) throws SQLException {
		this.callableStatement.setAsciiStream(parameterName, x);
	}

	@Override
	public void setBinaryStream(String parameterName, InputStream x) throws SQLException {
		this.callableStatement.setBinaryStream(parameterName, x);
	}

	@Override
	public void setCharacterStream(String parameterName, Reader reader) throws SQLException {
		this.callableStatement.setCharacterStream(parameterName, reader);
	}

	@Override
	public void setNCharacterStream(String parameterName, Reader value) throws SQLException {
		this.callableStatement.setNCharacterStream(parameterName, value);
	}

	@Override
	public void setClob(String parameterName, Reader reader) throws SQLException {
		this.callableStatement.setClob(parameterName, reader);
	}

	@Override
	public void setBlob(String parameterName, InputStream inputStream) throws SQLException {
		this.callableStatement.setBlob(parameterName, inputStream);
	}

	@Override
	public void setNClob(String parameterName, Reader reader) throws SQLException {
		this.callableStatement.setNClob(parameterName, reader);
	}

	@Override
	public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException {
		return this.callableStatement.getObject(parameterIndex, type);
	}

	@Override
	public <T> T getObject(String parameterName, Class<T> type) throws SQLException {
		return this.callableStatement.getObject(parameterName, type);
	}

	@Override
	public ResultSet executeQuery() throws SQLException {
		return this.callableStatement.executeQuery();
	}

	@Override
	public int executeUpdate() throws SQLException {
		return this.callableStatement.executeUpdate();
	}

	@Override
	public void setNull(int parameterIndex, int sqlType) throws SQLException {
		this.callableStatement.setNull(parameterIndex, sqlType);
	}

	@Override
	public void setBoolean(int parameterIndex, boolean x) throws SQLException {
		this.callableStatement.setBoolean(parameterIndex, x);
	}

	@Override
	public void setByte(int parameterIndex, byte x) throws SQLException {
		this.callableStatement.setByte(parameterIndex, x);
	}

	@Override
	public void setShort(int parameterIndex, short x) throws SQLException {
		this.callableStatement.setShort(parameterIndex, x);
	}

	@Override
	public void setInt(int parameterIndex, int x) throws SQLException {
		this.callableStatement.setInt(parameterIndex, x);
	}

	@Override
	public void setLong(int parameterIndex, long x) throws SQLException {
		this.callableStatement.setLong(parameterIndex, x);
	}

	@Override
	public void setFloat(int parameterIndex, float x) throws SQLException {
		this.callableStatement.setFloat(parameterIndex, x);
	}

	@Override
	public void setDouble(int parameterIndex, double x) throws SQLException {
		this.callableStatement.setDouble(parameterIndex, x);
	}

	@Override
	public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException {
		this.callableStatement.setBigDecimal(parameterIndex, x);
	}

	@Override
	public void setString(int parameterIndex, String x) throws SQLException {
		this.callableStatement.setString(parameterIndex, x);
	}

	@Override
	public void setBytes(int parameterIndex, byte[] x) throws SQLException {
		this.callableStatement.setBytes(parameterIndex, x);
	}

	@Override
	public void setDate(int parameterIndex, Date x) throws SQLException {
		this.callableStatement.setDate(parameterIndex, x);
	}

	@Override
	public void setTime(int parameterIndex, Time x) throws SQLException {
		this.callableStatement.setTime(parameterIndex, x);
	}

	@Override
	public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
		this.callableStatement.setTimestamp(parameterIndex, x);
	}

	@Override
	public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException {
		this.callableStatement.setAsciiStream(parameterIndex, x, length);
	}

	@Override
	public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException {
		this.callableStatement.setUnicodeStream(parameterIndex, x, length);
	}

	@Override
	public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException {
		this.callableStatement.setBinaryStream(parameterIndex, x, length);
	}

	@Override
	public void clearParameters() throws SQLException {
		this.callableStatement.clearParameters();
	}

	@Override
	public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException {
		this.callableStatement.setObject(parameterIndex, x, targetSqlType);
	}

	@Override
	public void setObject(int parameterIndex, Object x) throws SQLException {
		this.callableStatement.setObject(parameterIndex, x);
	}

	@Override
	public boolean execute() throws SQLException {
		boolean returnValue = this.callableStatement.execute();
		if ( prepareCall.hasCleanUp() ) {
			Statement statement = getConnection().createStatement();
			statement.executeUpdate(prepareCall.getCleanUpSQL());
			statement.close();
		}
		return returnValue;
	}

	@Override
	public void addBatch() throws SQLException {
		this.callableStatement.addBatch();
	}

	@Override
	public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException {
		this.callableStatement.setCharacterStream(parameterIndex, reader, length);
	}

	@Override
	public void setRef(int parameterIndex, Ref x) throws SQLException {
		this.callableStatement.setRef(parameterIndex, x);
	}

	@Override
	public void setBlob(int parameterIndex, Blob x) throws SQLException {
		this.callableStatement.setBlob(parameterIndex, x);
	}

	@Override
	public void setClob(int parameterIndex, Clob x) throws SQLException {
		this.callableStatement.setClob(parameterIndex, x);
	}

	@Override
	public void setArray(int parameterIndex, Array x) throws SQLException {
		this.callableStatement.setArray(parameterIndex, x);
	}

	@Override
	public ResultSetMetaData getMetaData() throws SQLException {
		return this.callableStatement.getMetaData();
	}

	@Override
	public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException {
		this.callableStatement.setDate(parameterIndex, x, cal);
	}

	@Override
	public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {
		this.callableStatement.setTime(parameterIndex, x, cal);
	}

	@Override
	public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException {
		this.callableStatement.setTimestamp(parameterIndex, x, cal);
	}

	@Override
	public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException {
		this.callableStatement.setNull(parameterIndex, sqlType, typeName);
	}

	@Override
	public void setURL(int parameterIndex, URL x) throws SQLException {
		this.callableStatement.setURL(parameterIndex, x);
	}

	@Override
	public ParameterMetaData getParameterMetaData() throws SQLException {
		return this.callableStatement.getParameterMetaData();
	}

	@Override
	public void setRowId(int parameterIndex, RowId x) throws SQLException {
		this.callableStatement.setRowId(parameterIndex, x);
	}

	@Override
	public void setNString(int parameterIndex, String value) throws SQLException {
		this.callableStatement.setNString(parameterIndex, value);
	}

	@Override
	public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {
		this.callableStatement.setNCharacterStream(parameterIndex, value, length);
	}

	@Override
	public void setNClob(int parameterIndex, NClob value) throws SQLException {
		this.callableStatement.setNClob(parameterIndex, value);
	}

	@Override
	public void setClob(int parameterIndex, Reader reader, long length) throws SQLException {
		this.callableStatement.setClob(parameterIndex, reader, length);
	}

	@Override
	public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException {
		this.callableStatement.setBlob(parameterIndex, inputStream, length);
	}

	@Override
	public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException {
		this.callableStatement.setNClob(parameterIndex, reader, length);
	}

	@Override
	public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
		this.callableStatement.setSQLXML(parameterIndex, xmlObject);
	}

	@Override
	public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException {
		this.callableStatement.setObject(parameterIndex, x, targetSqlType, scaleOrLength);
	}

	@Override
	public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException {
		this.callableStatement.setAsciiStream(parameterIndex, x, length);
	}

	@Override
	public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException {
		this.callableStatement.setBinaryStream(parameterIndex, x, length);
	}

	@Override
	public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException {
		this.callableStatement.setCharacterStream(parameterIndex, reader, length);
	}

	@Override
	public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException {
		this.callableStatement.setAsciiStream(parameterIndex, x);
	}

	@Override
	public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException {
		this.callableStatement.setBinaryStream(parameterIndex, x);
	}

	@Override
	public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException {
		this.callableStatement.setCharacterStream(parameterIndex, reader);
	}

	@Override
	public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
		this.callableStatement.setNCharacterStream(parameterIndex, value);
	}

	@Override
	public void setClob(int parameterIndex, Reader reader) throws SQLException {
		this.callableStatement.setClob(parameterIndex, reader);
	}

	@Override
	public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException {
		this.callableStatement.setBlob(parameterIndex, inputStream);
	}

	@Override
	public void setNClob(int parameterIndex, Reader reader) throws SQLException {
		this.callableStatement.setNClob(parameterIndex, reader);
	}

	@Override
	public ResultSet executeQuery(String sql) throws SQLException {
		return this.callableStatement.executeQuery(sql);
	}

	@Override
	public int executeUpdate(String sql) throws SQLException {
		return this.callableStatement.executeUpdate(sql);
	}

	@Override
	public void close() throws SQLException {
		this.callableStatement.close();
	}

	@Override
	public int getMaxFieldSize() throws SQLException {
		return this.callableStatement.getMaxFieldSize();
	}

	@Override
	public void setMaxFieldSize(int max) throws SQLException {
		this.callableStatement.setMaxFieldSize(max);
	}

	@Override
	public int getMaxRows() throws SQLException {
		return this.callableStatement.getMaxRows();
	}

	@Override
	public void setMaxRows(int max) throws SQLException {
		this.callableStatement.setMaxRows(max);
	}

	@Override
	public void setEscapeProcessing(boolean enable) throws SQLException {
		this.callableStatement.setEscapeProcessing(enable);
	}

	@Override
	public int getQueryTimeout() throws SQLException {
		return this.callableStatement.getQueryTimeout();
	}

	@Override
	public void setQueryTimeout(int seconds) throws SQLException {
		this.callableStatement.setQueryTimeout(seconds);
	}

	@Override
	public void cancel() throws SQLException {
		this.callableStatement.cancel();
	}

	@Override
	public SQLWarning getWarnings() throws SQLException {
		return this.callableStatement.getWarnings();
	}

	@Override
	public void clearWarnings() throws SQLException {
		this.callableStatement.clearWarnings();
	}

	@Override
	public void setCursorName(String name) throws SQLException {
		this.callableStatement.setCursorName(name);
	}

	@Override
	public boolean execute(String sql) throws SQLException {
		return this.callableStatement.execute(sql);
	}

	@Override
	public ResultSet getResultSet() throws SQLException {
		return this.callableStatement.getResultSet();
	}

	@Override
	public int getUpdateCount() throws SQLException {
		return this.callableStatement.getUpdateCount();
	}

	@Override
	public boolean getMoreResults() throws SQLException {
		return this.callableStatement.getMoreResults();
	}

	@Override
	public void setFetchDirection(int direction) throws SQLException {
		this.callableStatement.setFetchDirection(direction);
	}

	@Override
	public int getFetchDirection() throws SQLException {
		return this.callableStatement.getFetchDirection();
	}

	@Override
	public void setFetchSize(int rows) throws SQLException {
		this.callableStatement.setFetchSize(rows);
	}

	@Override
	public int getFetchSize() throws SQLException {
		return this.callableStatement.getFetchSize();
	}

	@Override
	public int getResultSetConcurrency() throws SQLException {
		return this.callableStatement.getResultSetConcurrency();
	}

	@Override
	public int getResultSetType() throws SQLException {
		return this.callableStatement.getResultSetType();
	}

	@Override
	public void addBatch(String sql) throws SQLException {
		this.callableStatement.addBatch(sql);
	}

	@Override
	public void clearBatch() throws SQLException {
		this.callableStatement.clearBatch();
	}

	@Override
	public int[] executeBatch() throws SQLException {
		return this.callableStatement.executeBatch();
	}

	@Override
	public Connection getConnection() throws SQLException {
		return this.callableStatement.getConnection();
	}

	@Override
	public boolean getMoreResults(int current) throws SQLException {
		return this.callableStatement.getMoreResults(current);
	}

	@Override
	public ResultSet getGeneratedKeys() throws SQLException {
		return this.callableStatement.getGeneratedKeys();
	}

	@Override
	public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
		return this.callableStatement.executeUpdate(sql, autoGeneratedKeys);
	}

	@Override
	public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
		return this.callableStatement.executeUpdate(sql, columnIndexes);
	}

	@Override
	public int executeUpdate(String sql, String[] columnNames) throws SQLException {
		return this.callableStatement.executeUpdate(sql, columnNames);
	}

	@Override
	public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
		return this.callableStatement.execute(sql, autoGeneratedKeys);
	}

	@Override
	public boolean execute(String sql, int[] columnIndexes) throws SQLException {
		return this.callableStatement.execute(sql, columnIndexes);
	}

	@Override
	public boolean execute(String sql, String[] columnNames) throws SQLException {
		return this.callableStatement.execute(sql, columnNames);
	}

	@Override
	public int getResultSetHoldability() throws SQLException {
		return this.callableStatement.getResultSetHoldability();
	}

	@Override
	public boolean isClosed() throws SQLException {
		return this.callableStatement.isClosed();
	}

	@Override
	public void setPoolable(boolean poolable) throws SQLException {
		this.callableStatement.setPoolable(poolable);
	}

	@Override
	public boolean isPoolable() throws SQLException {
		return this.callableStatement.isPoolable();
	}

	@Override
	public void closeOnCompletion() throws SQLException {
		this.callableStatement.closeOnCompletion();
	}

	@Override
	public boolean isCloseOnCompletion() throws SQLException {
		return this.callableStatement.isCloseOnCompletion();
	}

	@Override
	public <T> T unwrap(Class<T> iface) throws SQLException {
		return this.callableStatement.unwrap(iface);
	}

	@Override
	public boolean isWrapperFor(Class<?> iface) throws SQLException {
		return this.callableStatement.isWrapperFor(iface);
	}
}