text:
@implementation MCPlanModel
@end

redpajama_set_name: RedPajamaGithub


text:
package org.gabsocial.ofactory;

import org.gabsocial.ofactory.impl.MockOFactoryChildImpl;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

/**
 *
 * Test class for the OFactory
 *
 * @author Gregory Brown (sysdevone)
 */
public class OFactoryTest
{

    OFactory<MockOFactoryChildImpl> _ofactory;

    @Before
    public void setup()
    {
        this._ofactory = new OFactory<MockOFactoryChildImpl>();
    }

    @Test
    public void testCreateChildWithClassKey()
    {
        Assert.assertTrue(this._ofactory != null);
        final String className = "org.gabsocial.ofactory.impl.MockOFactoryChildImpl";
        try
        {
            final OFactoryChild child = this._ofactory
                    .create(MockOFactoryChildImpl.class);
            Assert.assertTrue(child != null);
            Assert.assertTrue(child instanceof MockOFactoryChildImpl);
            Assert.assertTrue(className.equals(child.getKey()));

        }
        catch (final OFactoryChildException e)
        {
            Assert.fail(e.toString());
        }
    }

    @Test
    public void testCreateChildWithClassNameKey()
    {
        Assert.assertTrue(this._ofactory != null);

        final String className = "org.gabsocial.ofactory.impl.MockOFactoryChildImpl";

        try
        {
            final OFactoryChild child = this._ofactory.create(className);
            Assert.assertTrue(child != null);
            Assert.assertTrue(child instanceof MockOFactoryChildImpl);
            Assert.assertTrue(className.equals(child.getKey()));
        }
        catch (final OFactoryChildException e)
        {
            Assert.fail(e.toString());
        }
    }

    @Test
    public void testCreateChildWithKeyAndClass()
    {
        Assert.assertTrue(this._ofactory != null);

        final String key = "test-mock-o";

        try
        {
            final OFactoryChild child = this._ofactory.create(key,
                    MockOFactoryChildImpl.class);
            Assert.assertTrue(child != null);
            Assert.assertTrue(child instanceof MockOFactoryChildImpl);
            Assert.assertTrue(key.equals(child.getKey()));
        }
        catch (final OFactoryChildException e)
        {
            Assert.fail(e.toString());
        }
    }

    @Test
    public void testCreateChildWithKeyAndClassName()
    {
        Assert.assertTrue(this._ofactory != null);

        final String key = "test-mock-o";
        final String className = "org.gabsocial.ofactory.impl.MockOFactoryChildImpl";

        try
        {
            final OFactoryChild child = this._ofactory.create(key, className);
            Assert.assertTrue(child != null);
            Assert.assertTrue(child instanceof MockOFactoryChildImpl);
            Assert.assertTrue(key.equals(child.getKey()));
        }
        catch (final OFactoryChildException e)
        {
            Assert.fail(e.toString());
        }
    }

    @Test
    public void testFactoryCreation()
    {
        Assert.assertTrue(this._ofactory != null);
    }

    @Test
    public void testGetChildWithClassNameKey()
    {

        Assert.assertTrue(this._ofactory != null);

        final String className = "org.gabsocial.ofactory.impl.MockOFactoryChildImpl";

        try
        {
            this._ofactory.create(className);

            final String key = MockOFactoryChildImpl.class.getName();
            final OFactoryChild child = this._ofactory.get(key);
            Assert.assertTrue(child != null);
            Assert.assertTrue(child.getKey().equals(key));
            Assert.assertTrue(child instanceof MockOFactoryChildImpl);
        }
        catch (final OFactoryChildException e)
        {
            Assert.fail(e.toString());
        }

    }

    @Test
    public void testGetChildWithKey()
    {

        Assert.assertTrue(this._ofactory != null);

        final String key = "test-mock-o";
        final String className = "org.gabsocial.ofactory.impl.MockOFactoryChildImpl";

        try
        {
            this._ofactory.create(key, className);

            final OFactoryChild child = this._ofactory.get(key);
            Assert.assertTrue(child != null);
            Assert.assertTrue(child.getKey().equals(key));
            Assert.assertTrue(child instanceof MockOFactoryChildImpl);
        }
        catch (final OFactoryChildException e)
        {
            Assert.fail(e.toString());
        }

    }

    @Test
    public void testOFactoryClose()
    {
        this._ofactory.close();

        try
        {
            final String className = "org.gabsocial.ofactory.impl.MockOFactoryChildImpl";
            boolean isFound = this._ofactory.containsChild(className);
            System.out.println("isFound=" + isFound);
            Assert.fail();
        }
        catch (OFactoryClosedException e)
        {
            Assert.assertTrue(true);
        }

        try
        {
            final String className = "org.gabsocial.ofactory.impl.MockOFactoryChildImpl";
            MockOFactoryChildImpl child = this._ofactory.create(className,
                    className);
            System.out.println("Child=" + child);
            Assert.fail();
        }
        catch (OFactoryChildException e)
        {
            Assert.fail();
        }
        catch (OFactoryClosedException e)
        {
            Assert.assertTrue(true);
        }

        try
        {
            final String className = "org.gabsocial.ofactory.impl.MockOFactoryChildImpl";
            MockOFactoryChildImpl child = this._ofactory.create(className,
                    MockOFactoryChildImpl.class);
            System.out.println("Child=" + child);
            Assert.fail();
        }
        catch (OFactoryChildException e)
        {
            Assert.fail();
        }
        catch (OFactoryClosedException e)
        {
            Assert.assertTrue(true);
        }

        try
        {
            MockOFactoryChildImpl child = this._ofactory
                    .create(MockOFactoryChildImpl.class);
            System.out.println("Child=" + child);
            Assert.fail();
        }
        catch (OFactoryChildException e)
        {
            Assert.fail();
        }
        catch (OFactoryClosedException e)
        {
            Assert.assertTrue(true);
        }

        try
        {
            final String className = "org.gabsocial.ofactory.impl.MockOFactoryChildImpl";
            this._ofactory.closeChild(className);
            Assert.fail();
        }
        catch (OFactoryClosedException e)
        {
            Assert.assertTrue(true);
        }

        try
        {
            final String className = "org.gabsocial.ofactory.impl.MockOFactoryChildImpl";
            this._ofactory.get(className);
            Assert.fail();
        }
        catch (OFactoryClosedException e)
        {
            Assert.assertTrue(true);
        }

        try
        {
            this._ofactory.getChildCount();
            Assert.fail();
        }
        catch (OFactoryClosedException e)
        {
            Assert.assertTrue(true);
        }

        // test getKeys()
        try
        {
            this._ofactory.getKeys();
            Assert.fail();
        }
        catch (OFactoryClosedException e)
        {
            Assert.assertTrue(true);
        }

        // test isClose().
        boolean isClosed = this._ofactory.isClosed();
        Assert.assertTrue(isClosed);

        // test repeated close();
        try
        {
            this._ofactory.close();
            Assert.fail();
        }
        catch (OFactoryClosedException e)
        {
            Assert.assertTrue(true);
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	id="WebApp_ID" version="2.5">
	<display-name>LinkedInSample</display-name>
	<welcome-file-list>
		<welcome-file>index.do</welcome-file>
	</welcome-file-list>

	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>

	<filter>
		<filter-name>springSecurityFilterChain</filter-name>
		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>springSecurityFilterChain</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<servlet>
		<servlet-name>dispatcher</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>dispatcher</servlet-name>
		<url-pattern>*.do</url-pattern>
	</servlet-mapping>
</web-app>


text:
/**
 * RepColumns.java	2010/07/16
 */

package com.ycsoft.report.bean;

import java.io.Serializable;

import com.ycsoft.daos.config.POJO;

/**
 * RepColumns -> REP_COLUMNS mapping
 */
@POJO(tn = "REP_COLUMNS", sn = "", pk = "")
public class RepColumn implements Serializable {

	// RepColumns all properties

	/**
	 *
	 */
	private static final long serialVersionUID = 6255537069966011739L;
	private String rep_id;
	private String dim_key;
	private Integer col_index;
	private String olap_type;
	// 统计报表选中的key
	private String dim_key_select;
	// 被选中的ID
	private String dim_id_select;

	public String getDim_key_select() {
		return dim_key_select;
	}

	public void setDim_key_select(String dim_key_select) {
		this.dim_key_select = dim_key_select;
	}

	public String getDim_id_select() {
		return dim_id_select;
	}

	public void setDim_id_select(String dim_id_select) {
		this.dim_id_select = dim_id_select;
	}

	/**
	 * default empty constructor
	 */
	public RepColumn() {
	}

	// rep_id getter and setter
	public String getRep_id() {
		return rep_id;
	}

	public void setRep_id(String rep_id) {
		this.rep_id = rep_id;
	}

	// dim_key getter and setter
	public String getDim_key() {
		return dim_key;
	}

	public void setDim_key(String dim_key) {
		this.dim_key = dim_key;
	}

	// col_index getter and setter
	public Integer getCol_index() {
		return col_index;
	}

	public void setCol_index(Integer col_index) {
		this.col_index = col_index;
	}

	public String getOlap_type() {
		return olap_type;
	}

	public void setOlap_type(String olap_type) {
		this.olap_type = olap_type;
	}

}


text:
package com.sino.scaffold.service.struts;

import org.nutz.plugin.spring.boot.service.BaseService;
import org.springframework.stereotype.Service;

import com.sino.scaffold.bean.struts.Branch;

/**
 *
 * @author kerbores
 *
 */
@Service
public class BranchService extends BaseService<Branch> {

}


text:
<?php
/**
 * Database-backed job queue code.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 * @file
 * @author Aaron Schulz
 */

/**
 * Class to handle job queues stored in the DB
 *
 * @ingroup JobQueue
 * @since 1.21
 */
class JobQueueDB extends JobQueue {
	const CACHE_TTL_SHORT = 30; // integer; seconds to cache info without re-validating
	const CACHE_TTL_LONG = 300; // integer; seconds to cache info that is kept up to date
	const MAX_AGE_PRUNE = 604800; // integer; seconds a job can live once claimed
	const MAX_JOB_RANDOM = 2147483647; // integer; 2^31 - 1, used for job_random
	const MAX_OFFSET = 255; // integer; maximum number of rows to skip

	/** @var BagOStuff */
	protected $cache;

	/** @var bool|string Name of an external DB cluster. False if not set */
	protected $cluster = false;

	/**
	 * Additional parameters include:
	 *   - cluster : The name of an external cluster registered via LBFactory.
	 *               If not specified, the primary DB cluster for the wiki will be used.
	 *               This can be overridden with a custom cluster so that DB handles will
	 *               be retrieved via LBFactory::getExternalLB() and getConnection().
	 * @param array $params
	 */
	protected function __construct( array $params ) {
		global $wgMemc;

		parent::__construct( $params );

		$this->cluster = isset( $params['cluster'] ) ? $params['cluster'] : false;
		// Make sure that we don't use the SQL cache, which would be harmful
		$this->cache = ( $wgMemc instanceof SqlBagOStuff ) ? new EmptyBagOStuff() : $wgMemc;
	}

	protected function supportedOrders() {
		return array( 'random', 'timestamp', 'fifo' );
	}

	protected function optimalOrder() {
		return 'random';
	}

	/**
	 * @see JobQueue::doIsEmpty()
	 * @return bool
	 */
	protected function doIsEmpty() {
		$key = $this->getCacheKey( 'empty' );

		$isEmpty = $this->cache->get( $key );
		if ( $isEmpty === 'true' ) {
			return true;
		} elseif ( $isEmpty === 'false' ) {
			return false;
		}

		$dbr = $this->getSlaveDB();
		try {
			$found = $dbr->selectField( // unclaimed job
				'job', '1', array( 'job_cmd' => $this->type, 'job_token' => '' ), __METHOD__
			);
		} catch ( DBError $e ) {
			$this->throwDBException( $e );
		}
		$this->cache->add( $key, $found ? 'false' : 'true', self::CACHE_TTL_LONG );

		return !$found;
	}

	/**
	 * @see JobQueue::doGetSize()
	 * @return int
	 */
	protected function doGetSize() {
		$key = $this->getCacheKey( 'size' );

		$size = $this->cache->get( $key );
		if ( is_int( $size ) ) {
			return $size;
		}

		try {
			$dbr = $this->getSlaveDB();
			$size = (int)$dbr->selectField( 'job', 'COUNT(*)',
				array( 'job_cmd' => $this->type, 'job_token' => '' ),
				__METHOD__
			);
		} catch ( DBError $e ) {
			$this->throwDBException( $e );
		}
		$this->cache->set( $key, $size, self::CACHE_TTL_SHORT );

		return $size;
	}

	/**
	 * @see JobQueue::doGetAcquiredCount()
	 * @return int
	 */
	protected function doGetAcquiredCount() {
		if ( $this->claimTTL <= 0 ) {
			return 0; // no acknowledgements
		}

		$key = $this->getCacheKey( 'acquiredcount' );

		$count = $this->cache->get( $key );
		if ( is_int( $count ) ) {
			return $count;
		}

		$dbr = $this->getSlaveDB();
		try {
			$count = (int)$dbr->selectField( 'job', 'COUNT(*)',
				array( 'job_cmd' => $this->type, "job_token != {$dbr->addQuotes( '' )}" ),
				__METHOD__
			);
		} catch ( DBError $e ) {
			$this->throwDBException( $e );
		}
		$this->cache->set( $key, $count, self::CACHE_TTL_SHORT );

		return $count;
	}

	/**
	 * @see JobQueue::doGetAbandonedCount()
	 * @return int
	 * @throws MWException
	 */
	protected function doGetAbandonedCount() {
		global $wgMemc;

		if ( $this->claimTTL <= 0 ) {
			return 0; // no acknowledgements
		}

		$key = $this->getCacheKey( 'abandonedcount' );

		$count = $wgMemc->get( $key );
		if ( is_int( $count ) ) {
			return $count;
		}

		$dbr = $this->getSlaveDB();
		try {
			$count = (int)$dbr->selectField( 'job', 'COUNT(*)',
				array(
					'job_cmd' => $this->type,
					"job_token != {$dbr->addQuotes( '' )}",
					"job_attempts >= " . $dbr->addQuotes( $this->maxTries )
				),
				__METHOD__
			);
		} catch ( DBError $e ) {
			$this->throwDBException( $e );
		}
		$wgMemc->set( $key, $count, self::CACHE_TTL_SHORT );

		return $count;
	}

	/**
	 * @see JobQueue::doBatchPush()
	 * @param array $jobs
	 * @param int $flags
	 * @throws DBError|Exception
	 * @return void
	 */
	protected function doBatchPush( array $jobs, $flags ) {
		$dbw = $this->getMasterDB();

		$that = $this;
		$method = __METHOD__;
		$dbw->onTransactionIdle(
			function () use ( $dbw, $that, $jobs, $flags, $method ) {
				$that->doBatchPushInternal( $dbw, $jobs, $flags, $method );
			}
		);
	}

	/**
	 * This function should *not* be called outside of JobQueueDB
	 *
	 * @param IDatabase $dbw
	 * @param array $jobs
	 * @param int $flags
	 * @param string $method
	 * @throws DBError
	 * @return void
	 */
	public function doBatchPushInternal( IDatabase $dbw, array $jobs, $flags, $method ) {
		if ( !count( $jobs ) ) {
			return;
		}

		$rowSet = array(); // (sha1 => job) map for jobs that are de-duplicated
		$rowList = array(); // list of jobs for jobs that are not de-duplicated
		foreach ( $jobs as $job ) {
			$row = $this->insertFields( $job );
			if ( $job->ignoreDuplicates() ) {
				$rowSet[$row['job_sha1']] = $row;
			} else {
				$rowList[] = $row;
			}
		}

		if ( $flags & self::QOS_ATOMIC ) {
			$dbw->begin( $method ); // wrap all the job additions in one transaction
		}
		try {
			// Strip out any duplicate jobs that are already in the queue...
			if ( count( $rowSet ) ) {
				$res = $dbw->select( 'job', 'job_sha1',
					array(
						// No job_type condition since it's part of the job_sha1 hash
						'job_sha1' => array_keys( $rowSet ),
						'job_token' => '' // unclaimed
					),
					$method
				);
				foreach ( $res as $row ) {
					wfDebug( "Job with hash '{$row->job_sha1}' is a duplicate.\n" );
					unset( $rowSet[$row->job_sha1] ); // already enqueued
				}
			}
			// Build the full list of job rows to insert
			$rows = array_merge( $rowList, array_values( $rowSet ) );
			// Insert the job rows in chunks to avoid slave lag...
			foreach ( array_chunk( $rows, 50 ) as $rowBatch ) {
				$dbw->insert( 'job', $rowBatch, $method );
			}
			JobQueue::incrStats( 'job-insert', $this->type, count( $rows ), $this->wiki );
			JobQueue::incrStats(
				'job-insert-duplicate',
				$this->type,
				count( $rowSet ) + count( $rowList ) - count( $rows ),
				$this->wiki
			);
		} catch ( DBError $e ) {
			if ( $flags & self::QOS_ATOMIC ) {
				$dbw->rollback( $method );
			}
			throw $e;
		}
		if ( $flags & self::QOS_ATOMIC ) {
			$dbw->commit( $method );
		}

		$this->cache->set( $this->getCacheKey( 'empty' ), 'false', JobQueueDB::CACHE_TTL_LONG );

		return;
	}

	/**
	 * @see JobQueue::doPop()
	 * @return Job|bool
	 */
	protected function doPop() {
		if ( $this->cache->get( $this->getCacheKey( 'empty' ) ) === 'true' ) {
			return false; // queue is empty
		}

		$dbw = $this->getMasterDB();
		try {
			$dbw->commit( __METHOD__, 'flush' ); // flush existing transaction
			$autoTrx = $dbw->getFlag( DBO_TRX ); // get current setting
			$dbw->clearFlag( DBO_TRX ); // make each query its own transaction
			$scopedReset = new ScopedCallback( function () use ( $dbw, $autoTrx ) {
				$dbw->setFlag( $autoTrx ? DBO_TRX : 0 ); // restore old setting
			} );

			$uuid = wfRandomString( 32 ); // pop attempt
			$job = false; // job popped off
			do { // retry when our row is invalid or deleted as a duplicate
				// Try to reserve a row in the DB...
				if ( in_array( $this->order, array( 'fifo', 'timestamp' ) ) ) {
					$row = $this->claimOldest( $uuid );
				} else { // random first
					$rand = mt_rand( 0, self::MAX_JOB_RANDOM ); // encourage concurrent UPDATEs
					$gte = (bool)mt_rand( 0, 1 ); // find rows with rand before/after $rand
					$row = $this->claimRandom( $uuid, $rand, $gte );
				}
				// Check if we found a row to reserve...
				if ( !$row ) {
					$this->cache->set( $this->getCacheKey( 'empty' ), 'true', self::CACHE_TTL_LONG );
					break; // nothing to do
				}
				JobQueue::incrStats( 'job-pop', $this->type, 1, $this->wiki );
				// Get the job object from the row...
				$title = Title::makeTitleSafe( $row->job_namespace, $row->job_title );
				if ( !$title ) {
					$dbw->delete( 'job', array( 'job_id' => $row->job_id ), __METHOD__ );
					wfDebug( "Row has invalid title '{$row->job_title}'.\n" );
					continue; // try again
				}
				$job = Job::factory( $row->job_cmd, $title,
					self::extractBlob( $row->job_params ), $row->job_id );
				$job->metadata['id'] = $row->job_id;
				break; // done
			} while ( true );
		} catch ( DBError $e ) {
			$this->throwDBException( $e );
		}

		return $job;
	}

	/**
	 * Reserve a row with a single UPDATE without holding row locks over RTTs...
	 *
	 * @param string $uuid 32 char hex string
	 * @param int $rand Random unsigned integer (31 bits)
	 * @param bool $gte Search for job_random >= $random (otherwise job_random <= $random)
	 * @return stdClass|bool Row|false
	 */
	protected function claimRandom( $uuid, $rand, $gte ) {
		$dbw = $this->getMasterDB();
		// Check cache to see if the queue has <= OFFSET items
		$tinyQueue = $this->cache->get( $this->getCacheKey( 'small' ) );

		$row = false; // the row acquired
		$invertedDirection = false; // whether one job_random direction was already scanned
		// This uses a replication safe method for acquiring jobs. One could use UPDATE+LIMIT
		// instead, but that either uses ORDER BY (in which case it deadlocks in MySQL) or is
		// not replication safe. Due to http://bugs.mysql.com/bug.php?id=6980, subqueries cannot
		// be used here with MySQL.
		do {
			if ( $tinyQueue ) { // queue has <= MAX_OFFSET rows
				// For small queues, using OFFSET will overshoot and return no rows more often.
				// Instead, this uses job_random to pick a row (possibly checking both directions).
				$ineq = $gte ? '>=' : '<=';
				$dir = $gte ? 'ASC' : 'DESC';
				$row = $dbw->selectRow( 'job', self::selectFields(), // find a random job
					array(
						'job_cmd' => $this->type,
						'job_token' => '', // unclaimed
						"job_random {$ineq} {$dbw->addQuotes( $rand )}" ),
					__METHOD__,
					array( 'ORDER BY' => "job_random {$dir}" )
				);
				if ( !$row && !$invertedDirection ) {
					$gte = !$gte;
					$invertedDirection = true;
					continue; // try the other direction
				}
			} else { // table *may* have >= MAX_OFFSET rows
				// Bug 42614: "ORDER BY job_random" with a job_random inequality causes high CPU
				// in MySQL if there are many rows for some reason. This uses a small OFFSET
				// instead of job_random for reducing excess claim retries.
				$row = $dbw->selectRow( 'job', self::selectFields(), // find a random job
					array(
						'job_cmd' => $this->type,
						'job_token' => '', // unclaimed
					),
					__METHOD__,
					array( 'OFFSET' => mt_rand( 0, self::MAX_OFFSET ) )
				);
				if ( !$row ) {
					$tinyQueue = true; // we know the queue must have <= MAX_OFFSET rows
					$this->cache->set( $this->getCacheKey( 'small' ), 1, 30 );
					continue; // use job_random
				}
			}

			if ( $row ) { // claim the job
				$dbw->update( 'job', // update by PK
					array(
						'job_token' => $uuid,
						'job_token_timestamp' => $dbw->timestamp(),
						'job_attempts = job_attempts+1' ),
					array( 'job_cmd' => $this->type, 'job_id' => $row->job_id, 'job_token' => '' ),
					__METHOD__
				);
				// This might get raced out by another runner when claiming the previously
				// selected row. The use of job_random should minimize this problem, however.
				if ( !$dbw->affectedRows() ) {
					$row = false; // raced out
				}
			} else {
				break; // nothing to do
			}
		} while ( !$row );

		return $row;
	}

	/**
	 * Reserve a row with a single UPDATE without holding row locks over RTTs...
	 *
	 * @param string $uuid 32 char hex string
	 * @return stdClass|bool Row|false
	 */
	protected function claimOldest( $uuid ) {
		$dbw = $this->getMasterDB();

		$row = false; // the row acquired
		do {
			if ( $dbw->getType() === 'mysql' ) {
				// Per http://bugs.mysql.com/bug.php?id=6980, we can't use subqueries on the
				// same table being changed in an UPDATE query in MySQL (gives Error: 1093).
				// Oracle and Postgre have no such limitation. However, MySQL offers an
				// alternative here by supporting ORDER BY + LIMIT for UPDATE queries.
				$dbw->query( "UPDATE {$dbw->tableName( 'job' )} " .
					"SET " .
						"job_token = {$dbw->addQuotes( $uuid ) }, " .
						"job_token_timestamp = {$dbw->addQuotes( $dbw->timestamp() )}, " .
						"job_attempts = job_attempts+1 " .
					"WHERE ( " .
						"job_cmd = {$dbw->addQuotes( $this->type )} " .
						"AND job_token = {$dbw->addQuotes( '' )} " .
					") ORDER BY job_id ASC LIMIT 1",
					__METHOD__
				);
			} else {
				// Use a subquery to find the job, within an UPDATE to claim it.
				// This uses as much of the DB wrapper functions as possible.
				$dbw->update( 'job',
					array(
						'job_token' => $uuid,
						'job_token_timestamp' => $dbw->timestamp(),
						'job_attempts = job_attempts+1' ),
					array( 'job_id = (' .
						$dbw->selectSQLText( 'job', 'job_id',
							array( 'job_cmd' => $this->type, 'job_token' => '' ),
							__METHOD__,
							array( 'ORDER BY' => 'job_id ASC', 'LIMIT' => 1 ) ) .
						')'
					),
					__METHOD__
				);
			}
			// Fetch any row that we just reserved...
			if ( $dbw->affectedRows() ) {
				$row = $dbw->selectRow( 'job', self::selectFields(),
					array( 'job_cmd' => $this->type, 'job_token' => $uuid ), __METHOD__
				);
				if ( !$row ) { // raced out by duplicate job removal
					wfDebug( "Row deleted as duplicate by another process.\n" );
				}
			} else {
				break; // nothing to do
			}
		} while ( !$row );

		return $row;
	}

	/**
	 * @see JobQueue::doAck()
	 * @param Job $job
	 * @throws MWException
	 * @return Job|bool
	 */
	protected function doAck( Job $job ) {
		if ( !isset( $job->metadata['id'] ) ) {
			throw new MWException( "Job of type '{$job->getType()}' has no ID." );
		}

		$dbw = $this->getMasterDB();
		try {
			$dbw->commit( __METHOD__, 'flush' ); // flush existing transaction
			$autoTrx = $dbw->getFlag( DBO_TRX ); // get current setting
			$dbw->clearFlag( DBO_TRX ); // make each query its own transaction
			$scopedReset = new ScopedCallback( function () use ( $dbw, $autoTrx ) {
				$dbw->setFlag( $autoTrx ? DBO_TRX : 0 ); // restore old setting
			} );

			// Delete a row with a single DELETE without holding row locks over RTTs...
			$dbw->delete( 'job',
				array( 'job_cmd' => $this->type, 'job_id' => $job->metadata['id'] ), __METHOD__ );
		} catch ( DBError $e ) {
			$this->throwDBException( $e );
		}

		return true;
	}

	/**
	 * @see JobQueue::doDeduplicateRootJob()
	 * @param Job $job
	 * @throws MWException
	 * @return bool
	 */
	protected function doDeduplicateRootJob( Job $job ) {
		$params = $job->getParams();
		if ( !isset( $params['rootJobSignature'] ) ) {
			throw new MWException( "Cannot register root job; missing 'rootJobSignature'." );
		} elseif ( !isset( $params['rootJobTimestamp'] ) ) {
			throw new MWException( "Cannot register root job; missing 'rootJobTimestamp'." );
		}
		$key = $this->getRootJobCacheKey( $params['rootJobSignature'] );
		// Callers should call batchInsert() and then this function so that if the insert
		// fails, the de-duplication registration will be aborted. Since the insert is
		// deferred till "transaction idle", do the same here, so that the ordering is
		// maintained. Having only the de-duplication registration succeed would cause
		// jobs to become no-ops without any actual jobs that made them redundant.
		$dbw = $this->getMasterDB();
		$cache = $this->dupCache;
		$dbw->onTransactionIdle( function () use ( $cache, $params, $key, $dbw ) {
			$timestamp = $cache->get( $key ); // current last timestamp of this job
			if ( $timestamp && $timestamp >= $params['rootJobTimestamp'] ) {
				return true; // a newer version of this root job was enqueued
			}

			// Update the timestamp of the last root job started at the location...
			return $cache->set( $key, $params['rootJobTimestamp'], JobQueueDB::ROOTJOB_TTL );
		} );

		return true;
	}

	/**
	 * @see JobQueue::doDelete()
	 * @return bool
	 */
	protected function doDelete() {
		$dbw = $this->getMasterDB();
		try {
			$dbw->delete( 'job', array( 'job_cmd' => $this->type ) );
		} catch ( DBError $e ) {
			$this->throwDBException( $e );
		}

		return true;
	}

	/**
	 * @see JobQueue::doWaitForBackups()
	 * @return void
	 */
	protected function doWaitForBackups() {
		wfWaitForSlaves( false, $this->wiki, $this->cluster ?: false );
	}

	/**
	 * @return array
	 */
	protected function doGetPeriodicTasks() {
		return array(
			'recycleAndDeleteStaleJobs' => array(
				'callback' => array( $this, 'recycleAndDeleteStaleJobs' ),
				'period' => ceil( $this->claimTTL / 2 )
			)
		);
	}

	/**
	 * @return void
	 */
	protected function doFlushCaches() {
		foreach ( array( 'empty', 'size', 'acquiredcount' ) as $type ) {
			$this->cache->delete( $this->getCacheKey( $type ) );
		}
	}

	/**
	 * @see JobQueue::getAllQueuedJobs()
	 * @return Iterator
	 */
	public function getAllQueuedJobs() {
		$dbr = $this->getSlaveDB();
		try {
			return new MappedIterator(
				$dbr->select( 'job', self::selectFields(),
					array( 'job_cmd' => $this->getType(), 'job_token' => '' ) ),
				function ( $row ) use ( $dbr ) {
					$job = Job::factory(
						$row->job_cmd,
						Title::makeTitle( $row->job_namespace, $row->job_title ),
						strlen( $row->job_params ) ? unserialize( $row->job_params ) : false
					);
					$job->metadata['id'] = $row->job_id;
					return $job;
				}
			);
		} catch ( DBError $e ) {
			$this->throwDBException( $e );
		}
	}

	public function getCoalesceLocationInternal() {
		return $this->cluster
			? "DBCluster:{$this->cluster}:{$this->wiki}"
			: "LBFactory:{$this->wiki}";
	}

	protected function doGetSiblingQueuesWithJobs( array $types ) {
		$dbr = $this->getSlaveDB();
		$res = $dbr->select( 'job', 'DISTINCT job_cmd',
			array( 'job_cmd' => $types ), __METHOD__ );

		$types = array();
		foreach ( $res as $row ) {
			$types[] = $row->job_cmd;
		}

		return $types;
	}

	protected function doGetSiblingQueueSizes( array $types ) {
		$dbr = $this->getSlaveDB();
		$res = $dbr->select( 'job', array( 'job_cmd', 'COUNT(*) AS count' ),
			array( 'job_cmd' => $types ), __METHOD__, array( 'GROUP BY' => 'job_cmd' ) );

		$sizes = array();
		foreach ( $res as $row ) {
			$sizes[$row->job_cmd] = (int)$row->count;
		}

		return $sizes;
	}

	/**
	 * Recycle or destroy any jobs that have been claimed for too long
	 *
	 * @return int Number of jobs recycled/deleted
	 */
	public function recycleAndDeleteStaleJobs() {
		$now = time();
		$count = 0; // affected rows
		$dbw = $this->getMasterDB();

		try {
			if ( !$dbw->lock( "jobqueue-recycle-{$this->type}", __METHOD__, 1 ) ) {
				return $count; // already in progress
			}

			// Remove claims on jobs acquired for too long if enabled...
			if ( $this->claimTTL > 0 ) {
				$claimCutoff = $dbw->timestamp( $now - $this->claimTTL );
				// Get the IDs of jobs that have be claimed but not finished after too long.
				// These jobs can be recycled into the queue by expiring the claim. Selecting
				// the IDs first means that the UPDATE can be done by primary key (less deadlocks).
				$res = $dbw->select( 'job', 'job_id',
					array(
						'job_cmd' => $this->type,
						"job_token != {$dbw->addQuotes( '' )}", // was acquired
						"job_token_timestamp < {$dbw->addQuotes( $claimCutoff )}", // stale
						"job_attempts < {$dbw->addQuotes( $this->maxTries )}" ), // retries left
					__METHOD__
				);
				$ids = array_map(
					function ( $o ) {
						return $o->job_id;
					}, iterator_to_array( $res )
				);
				if ( count( $ids ) ) {
					// Reset job_token for these jobs so that other runners will pick them up.
					// Set the timestamp to the current time, as it is useful to now that the job
					// was already tried before (the timestamp becomes the "released" time).
					$dbw->update( 'job',
						array(
							'job_token' => '',
							'job_token_timestamp' => $dbw->timestamp( $now ) ), // time of release
						array(
							'job_id' => $ids ),
						__METHOD__
					);
					$affected = $dbw->affectedRows();
					$count += $affected;
					JobQueue::incrStats( 'job-recycle', $this->type, $affected, $this->wiki );
					// The tasks recycled jobs or release delayed jobs into the queue
					$this->cache->set( $this->getCacheKey( 'empty' ), 'false', self::CACHE_TTL_LONG );
					$this->aggr->notifyQueueNonEmpty( $this->wiki, $this->type );
				}
			}

			// Just destroy any stale jobs...
			$pruneCutoff = $dbw->timestamp( $now - self::MAX_AGE_PRUNE );
			$conds = array(
				'job_cmd' => $this->type,
				"job_token != {$dbw->addQuotes( '' )}", // was acquired
				"job_token_timestamp < {$dbw->addQuotes( $pruneCutoff )}" // stale
			);
			if ( $this->claimTTL > 0 ) { // only prune jobs attempted too many times...
				$conds[] = "job_attempts >= {$dbw->addQuotes( $this->maxTries )}";
			}
			// Get the IDs of jobs that are considered stale and should be removed. Selecting
			// the IDs first means that the UPDATE can be done by primary key (less deadlocks).
			$res = $dbw->select( 'job', 'job_id', $conds, __METHOD__ );
			$ids = array_map(
				function ( $o ) {
					return $o->job_id;
				}, iterator_to_array( $res )
			);
			if ( count( $ids ) ) {
				$dbw->delete( 'job', array( 'job_id' => $ids ), __METHOD__ );
				$affected = $dbw->affectedRows();
				$count += $affected;
				JobQueue::incrStats( 'job-abandon', $this->type, $affected, $this->wiki );
			}

			$dbw->unlock( "jobqueue-recycle-{$this->type}", __METHOD__ );
		} catch ( DBError $e ) {
			$this->throwDBException( $e );
		}

		return $count;
	}

	/**
	 * @param IJobSpecification $job
	 * @return array
	 */
	protected function insertFields( IJobSpecification $job ) {
		$dbw = $this->getMasterDB();

		return array(
			// Fields that describe the nature of the job
			'job_cmd' => $job->getType(),
			'job_namespace' => $job->getTitle()->getNamespace(),
			'job_title' => $job->getTitle()->getDBkey(),
			'job_params' => self::makeBlob( $job->getParams() ),
			// Additional job metadata
			'job_id' => $dbw->nextSequenceValue( 'job_job_id_seq' ),
			'job_timestamp' => $dbw->timestamp(),
			'job_sha1' => wfBaseConvert(
				sha1( serialize( $job->getDeduplicationInfo() ) ),
				16, 36, 31
			),
			'job_random' => mt_rand( 0, self::MAX_JOB_RANDOM )
		);
	}

	/**
	 * @throws JobQueueConnectionError
	 * @return DBConnRef
	 */
	protected function getSlaveDB() {
		try {
			return $this->getDB( DB_SLAVE );
		} catch ( DBConnectionError $e ) {
			throw new JobQueueConnectionError( "DBConnectionError:" . $e->getMessage() );
		}
	}

	/**
	 * @throws JobQueueConnectionError
	 * @return DBConnRef
	 */
	protected function getMasterDB() {
		try {
			return $this->getDB( DB_MASTER );
		} catch ( DBConnectionError $e ) {
			throw new JobQueueConnectionError( "DBConnectionError:" . $e->getMessage() );
		}
	}

	/**
	 * @param int $index (DB_SLAVE/DB_MASTER)
	 * @return DBConnRef
	 */
	protected function getDB( $index ) {
		$lb = ( $this->cluster !== false )
			? wfGetLBFactory()->getExternalLB( $this->cluster, $this->wiki )
			: wfGetLB( $this->wiki );

		return $lb->getConnectionRef( $index, array(), $this->wiki );
	}

	/**
	 * @param string $property
	 * @return string
	 */
	private function getCacheKey( $property ) {
		list( $db, $prefix ) = wfSplitWikiID( $this->wiki );
		$cluster = is_string( $this->cluster ) ? $this->cluster : 'main';

		return wfForeignMemcKey( $db, $prefix, 'jobqueue', $cluster, $this->type, $property );
	}

	/**
	 * @param array|bool $params
	 * @return string
	 */
	protected static function makeBlob( $params ) {
		if ( $params !== false ) {
			return serialize( $params );
		} else {
			return '';
		}
	}

	/**
	 * @param string $blob
	 * @return bool|mixed
	 */
	protected static function extractBlob( $blob ) {
		if ( (string)$blob !== '' ) {
			return unserialize( $blob );
		} else {
			return false;
		}
	}

	/**
	 * @param DBError $e
	 * @throws JobQueueError
	 */
	protected function throwDBException( DBError $e ) {
		throw new JobQueueError( get_class( $e ) . ": " . $e->getMessage() );
	}

	/**
	 * Return the list of job fields that should be selected.
	 * @since 1.23
	 * @return array
	 */
	public static function selectFields() {
		return array(
			'job_id',
			'job_cmd',
			'job_namespace',
			'job_title',
			'job_timestamp',
			'job_params',
			'job_random',
			'job_attempts',
			'job_token',
			'job_token_timestamp',
			'job_sha1',
		);
	}
}


text:
typedef struct _connection {
	int socket;
	struct sockaddr_in client_addr;
	socklen_t client_len;

	float timeout;
	float timeout_threshold;
	gboolean persist_connection;
	req_parser *parser;
	req_handler *handler;
	FILE *log_file;
} connection;

int connection_send(connection *c, char *data, size_t n);

connection *connection_create(FILE *log_file)
{
	connection *c = (connection *)malloc(sizeof(connection));
	if (!c)
	{
		halt_error("Unable to allocate connection structure");
		return NULL;
	}

	c->socket = 0;
	memset(&c->client_addr, 0, sizeof(c->client_addr));
	c->client_len = sizeof(c->client_addr);

	c->timeout = 0;
	c->timeout_threshold = CONNECTION_TIMEOUT;
	c->persist_connection = TRUE;
	c->parser = req_parser_create();
	c->handler = req_handler_create(c, c->parser);
	c->log_file = log_file;

	return c;
}

void connection_destroy(connection *c)
{
	if (!c) return;

	connection_close(c);
	req_parser_destroy(c->parser);
	req_handler_destroy(c->handler);

	free(c);
}

int connection_socket(connection *c)
{
	return c->socket;
}

int connection_timedout(connection *c)
{
	return c->timeout >= c->timeout_threshold;
}

int connection_is_persistent(connection *c)
{
	return c->persist_connection;
}

GString *connection_client_ip(connection *c)
{
	char addr[INET_ADDRSTRLEN];
	inet_ntop(AF_INET, &(c->client_addr.sin_addr), addr, INET_ADDRSTRLEN);

	return g_string_new(addr);
}

int connection_client_port(connection *c)
{
	return ntohs(c->client_addr.sin_port);
}

void connection_accept(connection *c, int listenfd)
{
	connection_close(c);

	c->socket = accept(listenfd, (struct sockaddr *)&c->client_addr, &c->client_len);
	if (c->socket < 0)
	{
		if ((errno == EAGAIN) || (errno == EWOULDBLOCK))
		{
			c->socket = 0;
			connection_close(c);
		}
		else
		{
			halt_error("Unable to accept connection");
		}
		return;
	}

	req_parser_reset(c->parser);
}

void connection_close(connection *c)
{
	if (!c) return;

	if (c->socket != 0) close(c->socket);
	c->socket = 0;

	memset(&c->client_addr, '0', sizeof(c->client_addr));
	c->client_len = sizeof(c->client_addr);

	c->timeout = 0;
}

static void set_persistence(connection *c)
{
	GString *connection_header = NULL;
	if (req_parser_headers(c->parser))
	{
		connection_header = g_tree_lookup(req_parser_headers(c->parser), g_intern_static_string("Connection"));
	}

	if (connection_header)
	{
		if (strncmp(connection_header->str, "close", min(connection_header->len, 5)) == 0)
			c->persist_connection = FALSE;
		else if (strncmp(connection_header->str, "keep-alive", min(connection_header->len, 10)) == 0)
			c->persist_connection = TRUE;
	}
}

static void write_logline(connection *c, int response)
{
	char timebuf[512];
	memset(timebuf, 0, 512);

	time_t t = time(NULL);
	struct tm *tmp = localtime(&t);
	strftime(timebuf, 511, "%Y-%m-%dT%H:%M:%S", tmp);

	char addr[INET_ADDRSTRLEN];
	inet_ntop(AF_INET, &(c->client_addr.sin_addr), addr, INET_ADDRSTRLEN);

	const char *method = NULL;
	switch (req_parser_method(c->parser))
	{
	case REQ_PARSER_METHOD_GET:
		method = "GET";
		break;

	case REQ_PARSER_METHOD_HEAD:
		method = "HEAD";
		break;

	case REQ_PARSER_METHOD_POST:
		method = "POST";
		break;

	case REQ_PARSER_METHOD_OPTIONS:
		break;

	default:
		method = "???";
		break;
	}

	GString *path = NULL;
	if (req_parser_path(c->parser))
	{
		GString *tmp = req_parser_path(c->parser);
		path = g_string_new_len(tmp->str, tmp->len);
	}
	else
	{
		path = g_string_new(NULL);
	}

	fprintf(c->log_file, "%s : %s:%d %s %s : %d\n", timebuf, addr, ntohs(c->client_addr.sin_port), method, path->str, response);

	g_string_free(path, TRUE);
}

int connection_receive(connection *c)
{
	c->timeout = 0;

	char buf[RECEIVE_BUFFER_SIZE];
	ssize_t buf_size = recvfrom(c->socket, buf, RECEIVE_BUFFER_SIZE, 0, (struct sockaddr *)&c->client_addr, &c->client_len);

	if (buf_size <= 0)
	{
		connection_close(c);
		return 1;
	}

	switch (req_parser_add_text(c->parser, buf, (size_t)buf_size))
	{
	case REQ_PARSER_PARSE_OK:
		// FALLTHROUGH
	case REQ_PARSER_PARSE_INVALID_REQUEST:
		set_persistence(c);

		write_logline(c, req_handler_handle_request(c->handler));
		req_parser_reset(c->parser);
		break;

	default:
		// Do I really want to do anything here?
		break;
	}

	if (!c->persist_connection)
	{
		connection_close(c);
		return 1;
	}

	return 0;
}

int connection_send(connection *c, char *data, size_t n)
{
	size_t rem = n;
	while (rem)
	{
		ssize_t sent = sendto(c->socket, data, rem, MSG_NOSIGNAL, (const struct sockaddr *)&c->client_addr, c->client_len);
		if (sent < 0) return 1;

		rem -= sent;
		data += sent;
	}

	return 0;
}

void connection_timeout_increment(connection *c, float seconds)
{
	c->timeout += seconds;
}


text:
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **string** | Session token, it will remain valid for 15 days. |

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)


text:
<?php

namespace spec\HMLB\DDD\Entity;

use HMLB\DDD\Entity\Identity;
use PhpSpec\ObjectBehavior;

class IdentitySpec extends ObjectBehavior
{
    public function it_is_initializable()
    {
        $this->shouldHaveType('HMLB\DDD\Entity\Identity');
    }

    public function it_should_cast_as_string()
    {
        $this->__toString()->shouldBeString();
    }

    public function it_is_comparable()
    {
        $value = '12948739432802948324-aiezufshgsidufhsodrfhqsldjkghlskgjhdfg';
        $this->beConstructedWith($value);
        $other = new Identity($value);
        $this->equals($other)->shouldBe(true);
        $nope = new Identity($value.'1');
        $this->equals($nope)->shouldBe(false);
    }

    public function it_should_be_initializable()
    {
        $value = '12948739432802948324-aiezufshgsidufhsodrfhqsldjkghlskgjhdfg';
        $this->beConstructedWith($value);
        $this->__toString()->shouldBe($value);
    }
}


text:
from django.conf import settings
from django.contrib import admin
from django.conf.urls import url, include
from django.conf.urls.static import static

from rest_framework.routers import DefaultRouter
from rest_framework.authtoken import views

from users.views import MemberView, FollowingView, MemberInfoView, ShoutViewSet
from scrobbles.views import ScrobbleView
from songs.views import SongView
from artists.views import ArtistView
from albums.views import AlbumView
from featured.views import CurrentView, HistoricalView
from devblog.views import EntryView

router = DefaultRouter()
router.register(r'members', MemberView)
router.register(r'member_info', MemberInfoView)
router.register(r'shouts', ShoutViewSet)
router.register(r'followings', FollowingView)
router.register(r'scrobbles', ScrobbleView)
router.register(r'songs', SongView)
router.register(r'artists', ArtistView)
router.register(r'albums', AlbumView)
router.register(r'featured/current', CurrentView)
router.register(r'featured/historical', HistoricalView)
router.register(r'blog_entries', EntryView)

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^api/', include(router.urls)),
    url(r'^api/api-token-auth/', views.obtain_auth_token),
    url(r'^api-auth/', include(
        'rest_framework.urls', namespace='rest_framework')),
] + static('/', document_root=settings.MEDIA_ROOT)


text:
/* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */

#define VTK_WRAPPING_CXX
#define VTK_STREAMS_FWD_ONLY
#include <nan.h>

#include "vtkGraphLayoutStrategyWrap.h"
#include "vtkSpanTreeLayoutStrategyWrap.h"
#include "vtkObjectBaseWrap.h"
#include "../../plus/plus.h"

using namespace v8;

extern Nan::Persistent<v8::Object> vtkNodeJsNoWrap;
Nan::Persistent<v8::FunctionTemplate> VtkSpanTreeLayoutStrategyWrap::ptpl;

VtkSpanTreeLayoutStrategyWrap::VtkSpanTreeLayoutStrategyWrap()
{ }

VtkSpanTreeLayoutStrategyWrap::VtkSpanTreeLayoutStrategyWrap(vtkSmartPointer<vtkSpanTreeLayoutStrategy> _native)
{ native = _native; }

VtkSpanTreeLayoutStrategyWrap::~VtkSpanTreeLayoutStrategyWrap()
{ }

void VtkSpanTreeLayoutStrategyWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkSpanTreeLayoutStrategy").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("SpanTreeLayoutStrategy").ToLocalChecked(), ConstructorGetter);
}

void VtkSpanTreeLayoutStrategyWrap::ConstructorGetter(
	v8::Local<v8::String> property,
	const Nan::PropertyCallbackInfo<v8::Value>& info)
{
	InitPtpl();
	info.GetReturnValue().Set(Nan::New(ptpl)->GetFunction());
}

void VtkSpanTreeLayoutStrategyWrap::InitPtpl()
{
	if (!ptpl.IsEmpty()) return;
	v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
	VtkGraphLayoutStrategyWrap::InitPtpl( );
	tpl->Inherit(Nan::New<FunctionTemplate>(VtkGraphLayoutStrategyWrap::ptpl));
	tpl->SetClassName(Nan::New("VtkSpanTreeLayoutStrategyWrap").ToLocalChecked());
	tpl->InstanceTemplate()->SetInternalFieldCount(1);

	Nan::SetPrototypeMethod(tpl, "DepthFirstSpanningTreeOff", DepthFirstSpanningTreeOff);
	Nan::SetPrototypeMethod(tpl, "depthFirstSpanningTreeOff", DepthFirstSpanningTreeOff);

	Nan::SetPrototypeMethod(tpl, "DepthFirstSpanningTreeOn", DepthFirstSpanningTreeOn);
	Nan::SetPrototypeMethod(tpl, "depthFirstSpanningTreeOn", DepthFirstSpanningTreeOn);

	Nan::SetPrototypeMethod(tpl, "GetDepthFirstSpanningTree", GetDepthFirstSpanningTree);
	Nan::SetPrototypeMethod(tpl, "getDepthFirstSpanningTree", GetDepthFirstSpanningTree);

	Nan::SetPrototypeMethod(tpl, "Layout", Layout);
	Nan::SetPrototypeMethod(tpl, "layout", Layout);

	Nan::SetPrototypeMethod(tpl, "NewInstance", NewInstance);
	Nan::SetPrototypeMethod(tpl, "newInstance", NewInstance);

	Nan::SetPrototypeMethod(tpl, "SafeDownCast", SafeDownCast);
	Nan::SetPrototypeMethod(tpl, "safeDownCast", SafeDownCast);

	Nan::SetPrototypeMethod(tpl, "SetDepthFirstSpanningTree", SetDepthFirstSpanningTree);
	Nan::SetPrototypeMethod(tpl, "setDepthFirstSpanningTree", SetDepthFirstSpanningTree);

#ifdef VTK_NODE_PLUS_VTKSPANTREELAYOUTSTRATEGYWRAP_INITPTPL
	VTK_NODE_PLUS_VTKSPANTREELAYOUTSTRATEGYWRAP_INITPTPL
#endif
	ptpl.Reset( tpl );
}

void VtkSpanTreeLayoutStrategyWrap::New(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	if(!info.IsConstructCall())
	{
		Nan::ThrowError("Constructor not called in a construct call.");
		return;
	}

	if(info.Length() == 0)
	{
		vtkSmartPointer<vtkSpanTreeLayoutStrategy> native = vtkSmartPointer<vtkSpanTreeLayoutStrategy>::New();
		VtkSpanTreeLayoutStrategyWrap* obj = new VtkSpanTreeLayoutStrategyWrap(native);
		obj->Wrap(info.This());
	}
	else
	{
		if(info[0]->ToObject() != vtkNodeJsNoWrap )
		{
			Nan::ThrowError("Parameter Error");
			return;
		}
	}

	info.GetReturnValue().Set(info.This());
}

void VtkSpanTreeLayoutStrategyWrap::DepthFirstSpanningTreeOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSpanTreeLayoutStrategyWrap *wrapper = ObjectWrap::Unwrap<VtkSpanTreeLayoutStrategyWrap>(info.Holder());
	vtkSpanTreeLayoutStrategy *native = (vtkSpanTreeLayoutStrategy *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->DepthFirstSpanningTreeOff();
}

void VtkSpanTreeLayoutStrategyWrap::DepthFirstSpanningTreeOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSpanTreeLayoutStrategyWrap *wrapper = ObjectWrap::Unwrap<VtkSpanTreeLayoutStrategyWrap>(info.Holder());
	vtkSpanTreeLayoutStrategy *native = (vtkSpanTreeLayoutStrategy *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->DepthFirstSpanningTreeOn();
}

void VtkSpanTreeLayoutStrategyWrap::GetDepthFirstSpanningTree(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSpanTreeLayoutStrategyWrap *wrapper = ObjectWrap::Unwrap<VtkSpanTreeLayoutStrategyWrap>(info.Holder());
	vtkSpanTreeLayoutStrategy *native = (vtkSpanTreeLayoutStrategy *)wrapper->native.GetPointer();
	bool r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetDepthFirstSpanningTree();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkSpanTreeLayoutStrategyWrap::Layout(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSpanTreeLayoutStrategyWrap *wrapper = ObjectWrap::Unwrap<VtkSpanTreeLayoutStrategyWrap>(info.Holder());
	vtkSpanTreeLayoutStrategy *native = (vtkSpanTreeLayoutStrategy *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->Layout();
}

void VtkSpanTreeLayoutStrategyWrap::NewInstance(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSpanTreeLayoutStrategyWrap *wrapper = ObjectWrap::Unwrap<VtkSpanTreeLayoutStrategyWrap>(info.Holder());
	vtkSpanTreeLayoutStrategy *native = (vtkSpanTreeLayoutStrategy *)wrapper->native.GetPointer();
	vtkSpanTreeLayoutStrategy * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->NewInstance();
	VtkSpanTreeLayoutStrategyWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkSpanTreeLayoutStrategyWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkSpanTreeLayoutStrategyWrap *w = new VtkSpanTreeLayoutStrategyWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkSpanTreeLayoutStrategyWrap::SafeDownCast(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSpanTreeLayoutStrategyWrap *wrapper = ObjectWrap::Unwrap<VtkSpanTreeLayoutStrategyWrap>(info.Holder());
	vtkSpanTreeLayoutStrategy *native = (vtkSpanTreeLayoutStrategy *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkObjectBaseWrap::ptpl))->HasInstance(info[0]))
	{
		VtkObjectBaseWrap *a0 = ObjectWrap::Unwrap<VtkObjectBaseWrap>(info[0]->ToObject());
		vtkSpanTreeLayoutStrategy * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->SafeDownCast(
			(vtkObjectBase *) a0->native.GetPointer()
		);
		VtkSpanTreeLayoutStrategyWrap::InitPtpl();
		v8::Local<v8::Value> argv[1] =
			{ Nan::New(vtkNodeJsNoWrap) };
		v8::Local<v8::Function> cons =
			Nan::New<v8::FunctionTemplate>(VtkSpanTreeLayoutStrategyWrap::ptpl)->GetFunction();
		v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
		VtkSpanTreeLayoutStrategyWrap *w = new VtkSpanTreeLayoutStrategyWrap();
		w->native = r;
		w->Wrap(wo);
		info.GetReturnValue().Set(wo);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkSpanTreeLayoutStrategyWrap::SetDepthFirstSpanningTree(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSpanTreeLayoutStrategyWrap *wrapper = ObjectWrap::Unwrap<VtkSpanTreeLayoutStrategyWrap>(info.Holder());
	vtkSpanTreeLayoutStrategy *native = (vtkSpanTreeLayoutStrategy *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsBoolean())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetDepthFirstSpanningTree(
			info[0]->BooleanValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--

      Licensed to the Apache Software Foundation (ASF) under one or more
      contributor license agreements.  See the NOTICE file distributed with
      this work for additional information regarding copyright ownership.
      The ASF licenses this file to You under the Apache License, Version 2.0
      (the "License"); you may not use this file except in compliance with
      the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
-->
<features name="spring-legacy-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">

    <repository>mvn:org.ops4j.pax.web/pax-web-features/${pax.web.version}/xml/features</repository>
    <repository>mvn:org.apache.karaf.features/standard/${project.version}/xml/features</repository>

    <!-- Spring DM support -->
    <feature name="spring-dm" description="Spring DM support" version="${spring.osgi.version}">
        <feature version="[2.5.6,4)">spring</feature>
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/${cglib.bundle.version}</bundle>
        <bundle start-level="30">mvn:org.springframework.osgi/spring-osgi-io/${spring.osgi.version}</bundle>
        <bundle start-level="30">mvn:org.springframework.osgi/spring-osgi-core/${spring.osgi.version}</bundle>
        <bundle start-level="30">mvn:org.springframework.osgi/spring-osgi-extender/${spring.osgi.version}</bundle>
        <bundle start-level="30">mvn:org.springframework.osgi/spring-osgi-annotation/${spring.osgi.version}</bundle>
        <conditional>
            <condition>deployer</condition>
            <bundle start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/${project.version}</bundle>
        </conditional>
        <conditional>
            <condition>bundle</condition>
            <bundle start-level="30">mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.springstate/${project.version}</bundle>
        </conditional>
    </feature>

    <feature name="spring-dm-web" description="Spring DM Web support" version="${spring.osgi.version}">
        <feature>spring-dm</feature>
        <feature version="[2.5.6,4)">spring-web</feature>
        <feature>http</feature>
        <bundle start-level="30">mvn:org.springframework.osgi/spring-osgi-web/${spring.osgi.version}</bundle>
    </feature>

    <!-- Spring 3.1.x support -->

    <feature name="spring" description="Spring 3.1.x support" version="${spring31.version}">
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.bundle.version}</bundle>
        <bundle start-level="30">mvn:org.springframework/spring-core/${spring31.version}</bundle>
        <bundle start-level="30">mvn:org.springframework/spring-asm/${spring31.version}</bundle>
        <bundle start-level="30">mvn:org.springframework/spring-expression/${spring31.version}</bundle>
        <bundle start-level="30">mvn:org.springframework/spring-beans/${spring31.version}</bundle>
        <bundle start-level="30">mvn:org.springframework/spring-aop/${spring31.version}</bundle>
        <bundle start-level="30">mvn:org.springframework/spring-context/${spring31.version}</bundle>
        <bundle start-level="30">mvn:org.springframework/spring-context-support/${spring31.version}</bundle>
    </feature>

    <feature name="spring-aspects" description="Spring 3.1.x AOP support" version="${spring31.version}">
        <feature version="[${spring31.version},3.2)">spring</feature>
        <bundle start-level="30">mvn:org.springframework/spring-aspects/${spring31.version}</bundle>
    </feature>

    <feature name="spring-instrument" description="Spring 3.1.x Instrument support" version="${spring31.version}">
        <feature version="[${spring31.version},3.2)">spring</feature>
        <bundle start-level="30">mvn:org.springframework/spring-instrument/${spring31.version}</bundle>
    </feature>

    <feature name="spring-jdbc" description="Spring 3.1.x JDBC support" version="${spring31.version}">
        <feature version="[${spring31.version},3.2)">spring-tx</feature>
        <bundle start-level="30">mvn:org.springframework/spring-jdbc/${spring31.version}</bundle>
    </feature>

    <feature name="spring-jms" description="Spring 3.1.x JMS support" version="${spring31.version}">
        <feature version="[${spring31.version},3.2)">spring-tx</feature>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/${geronimo.jta-spec.version}</bundle>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/${geronimo.jms-spec.version}</bundle>
        <bundle start-level="30">mvn:org.springframework/spring-jms/${spring31.version}</bundle>
    </feature>

    <feature name="spring-struts" description="Spring 3.1.x Struts support" version="${spring31.version}">
        <feature version="[${spring31.version},3.2)">spring-web</feature>
        <feature>war</feature>
        <bundle dependency="true" start-level="30">mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
        <bundle dependency="true" start-level="30">mvn:commons-beanutils/commons-beanutils/${commons-beanutils.version}</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.struts/${struts.bundle.version}</bundle>
        <bundle start-level="30">mvn:org.springframework/spring-struts/${spring31.version}</bundle>
    </feature>

    <feature name="spring-test" description="Spring 3.1.x Test support" version="${spring31.version}">
        <feature version="[${spring31.version},3.2)">spring</feature>
        <bundle start-level="30">mvn:org.springframework/spring-test/${spring31.version}</bundle>
    </feature>

    <feature name="spring-orm" description="Spring 3.1.x ORM support" version="${spring31.version}">
        <feature version="[${spring31.version},3.2)">spring-jdbc</feature>
        <bundle start-level="30">mvn:org.springframework/spring-orm/${spring31.version}</bundle>
    </feature>

    <feature name="spring-oxm" description="Spring 3.1.x OXM support" version="${spring31.version}">
        <feature version="[${spring31.version},3.2)">spring</feature>
        <bundle start-level="30">mvn:org.springframework/spring-oxm/${spring31.version}</bundle>
    </feature>

    <feature name="spring-tx" description="Spring 3.1.x Transaction (TX) support" version="${spring31.version}">
        <feature version="[${spring31.version},3.2)">spring</feature>
        <bundle start-level="30">mvn:org.springframework/spring-tx/${spring31.version}</bundle>
    </feature>

    <feature name="spring-web" description="Spring 3.1.x Web support" version="${spring31.version}">
    	<feature version="[${spring31.version},3.2)">spring</feature>
    	<feature>http</feature>
    	<bundle start-level="30">mvn:org.springframework/spring-web/${spring31.version}</bundle>
		<bundle start-level="30">mvn:org.springframework/spring-webmvc/${spring31.version}</bundle>
    </feature>

    <feature name="spring-web-portlet" description="Spring 3.1.x Web Portlet support" version="${spring31.version}">
        <feature prerequisite="true">wrap</feature>
        <feature version="[${spring31.version},3.2)">spring-web</feature>
        <bundle dependency="true" start-level="30">wrap:mvn:javax.portlet/portlet-api/${portlet-api.version}$Export-Package=javax.portlet.*;version=2.0</bundle>
        <bundle start-level="30">mvn:org.springframework/spring-webmvc-portlet/${spring31.version}</bundle>
    </feature>

    <!-- Spring 3.2.x support -->

    <feature name="spring" description="Spring 3.2.x support" version="${spring32.version}">
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.bundle.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/${spring32.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/${spring32.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring32.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/${spring32.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/${spring32.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/${spring32.version}</bundle>
    </feature>

    <feature name="spring-aspects" description="Spring 3.2.x AOP support" version="${spring32.version}">
        <feature version="[${spring32.version},3.3)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/${spring32.version}</bundle>
    </feature>

    <feature name="spring-instrument" description="Spring 3.2.x Instrument support" version="${spring32.version}">
        <feature version="[${spring32.version},3.3)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/${spring32.version}</bundle>
    </feature>

    <feature name="spring-jdbc" description="Spring 3.2.x JDBC support" version="${spring32.version}">
        <feature version="[${spring32.version},3.3)">spring-tx</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/${spring32.version}</bundle>
    </feature>

    <feature name="spring-jms" description="Spring 3.2.x JMS support" version="${spring32.version}">
        <feature version="[${spring32.version},3.3)">spring-tx</feature>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/${geronimo.jta-spec.version}</bundle>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/${geronimo.jms-spec.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/${spring32.version}</bundle>
    </feature>

    <feature name="spring-struts" description="Spring 3.2.x Struts support" version="${spring32.version}">
        <feature version="[${spring32.version},3.3)">spring-web</feature>
        <feature>war</feature>
        <bundle dependency="true" start-level="30">mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
        <bundle dependency="true" start-level="30">mvn:commons-beanutils/commons-beanutils/${commons-beanutils.version}</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.struts/${struts.bundle.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-struts/${spring32.version}</bundle>
    </feature>

    <feature name="spring-test" description="Spring 3.2.x Test support" version="${spring32.version}">
        <feature version="[${spring32.version},3.3)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/${spring32.version}</bundle>
    </feature>

    <feature name="spring-orm" description="Spring 3.2.x ORM support" version="${spring32.version}">
        <feature version="[${spring32.version},3.3)">spring-jdbc</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/${spring32.version}</bundle>
    </feature>

    <feature name="spring-oxm" description="Spring 3.2.x OXM support" version="${spring32.version}">
        <feature version="[${spring32.version},3.3)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/${spring32.version}</bundle>
    </feature>

    <feature name="spring-tx" description="Spring 3.2.x Transaction (TX) support" version="${spring32.version}">
        <feature version="[${spring32.version},3.3)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/${spring32.version}</bundle>
    </feature>

    <feature name="spring-web" description="Spring 3.2.x Web support" version="${spring32.version}">
        <feature version="[${spring32.version},3.3)">spring</feature>
        <feature>http</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/${spring32.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/${spring32.version}</bundle>
    </feature>

    <feature name="spring-web-portlet" description="Spring 3.2.x Web Portlet support" version="${spring32.version}">
        <feature prerequisite="true">wrap</feature>
        <feature version="[${spring32.version},3.3)">spring-web</feature>
        <bundle dependency="true" start-level="30">wrap:mvn:javax.portlet/portlet-api/${portlet-api.version}$Export-Package=javax.portlet.*;version=2.0</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/${spring32.version}</bundle>
    </feature>

    <!-- Spring 4.0.x support -->

    <feature name="spring" description="Spring 4.0.x support" version="${spring40.version}">
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.bundle.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/${spring40.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/${spring40.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring40.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/${spring40.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/${spring40.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/${spring40.version}</bundle>
    </feature>

    <feature name="spring-aspects" description="Spring 4.0.x AOP support" version="${spring40.version}">
        <feature version="[${spring40.version},4.1)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/${spring40.version}</bundle>
    </feature>

    <feature name="spring-instrument" description="Spring 4.0.x Instrument support" version="${spring40.version}">
        <feature version="[${spring40.version},4.1)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/${spring40.version}</bundle>
    </feature>

    <feature name="spring-jdbc" description="Spring 4.0.x JDBC support" version="${spring40.version}">
        <feature version="[${spring40.version},4.1)">spring-tx</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/${spring40.version}</bundle>
    </feature>

    <feature name="spring-jms" description="Spring 4.0.x JMS support" version="${spring40.version}">
        <feature version="[${spring40.version},4.1)">spring-tx</feature>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/${geronimo.jta-spec.version}</bundle>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/${geronimo.jms-spec.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/${spring40.version}</bundle>
    </feature>

    <feature name="spring-test" description="Spring 4.0.x Test support" version="${spring40.version}">
        <feature version="[${spring40.version},4.1)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/${spring40.version}</bundle>
    </feature>

    <feature name="spring-orm" description="Spring 4.0.x ORM support" version="${spring40.version}">
        <feature version="[${spring40.version},4.1)">spring-jdbc</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/${spring40.version}</bundle>
    </feature>

    <feature name="spring-oxm" description="Spring 4.0.x OXM support" version="${spring40.version}">
        <feature version="[${spring40.version},4.1)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/${spring40.version}</bundle>
    </feature>

    <feature name="spring-tx" description="Spring 4.0.x Transaction (TX) support" version="${spring40.version}">
        <feature version="[${spring40.version},4.1)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/${spring40.version}</bundle>
    </feature>

    <feature name="spring-web" description="Spring 4.0.x Web support" version="${spring40.version}">
        <feature version="[${spring40.version},4.1)">spring</feature>
        <feature>http</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/${spring40.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/${spring40.version}</bundle>
    </feature>

    <feature name="spring-web-portlet" description="Spring 4.0.x Web Portlet support" version="${spring40.version}">
        <feature prerequisite="true">wrap</feature>
        <feature version="[${spring40.version},4.1)">spring-web</feature>
        <bundle dependency="true" start-level="30">wrap:mvn:javax.portlet/portlet-api/${portlet-api.version}$Export-Package=javax.portlet.*;version=2.0</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/${spring40.version}</bundle>
    </feature>

    <feature name="spring-websocket" description="Spring 4.0.x WebSocket support" version="${spring40.version}">
        <feature version="[${spring40.version},4.1)">spring-web</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/${spring40.version}</bundle>
    </feature>

    <!-- Spring 4.1.x support -->

    <feature name="spring" description="Spring 4.1.x support" version="${spring41.version}">
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.bundle.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/${spring41.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/${spring41.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring41.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/${spring41.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/${spring41.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/${spring41.version}</bundle>
    </feature>

    <feature name="spring-aspects" description="Spring 4.1.x AOP support" version="${spring41.version}">
        <feature version="[${spring41.version},4.2)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/${spring41.version}</bundle>
    </feature>

    <feature name="spring-instrument" description="Spring 4.1.x Instrument support" version="${spring41.version}">
        <feature version="[${spring41.version},4.2)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/${spring41.version}</bundle>
    </feature>

    <feature name="spring-jdbc" description="Spring 4.1.x JDBC support" version="${spring41.version}">
        <feature version="[${spring41.version},4.2)">spring-tx</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/${spring41.version}</bundle>
    </feature>

    <feature name="spring-jms" description="Spring 4.1.x JMS support" version="${spring41.version}">
        <feature version="[${spring41.version},4.2)">spring-tx</feature>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/${geronimo.jta-spec.version}</bundle>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/${geronimo.jms-spec.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/${spring41.version}</bundle>
    </feature>

    <feature name="spring-test" description="Spring 4.1.x Test support" version="${spring41.version}">
        <feature version="[${spring41.version},4.2)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/${spring41.version}</bundle>
    </feature>

    <feature name="spring-orm" description="Spring 4.1.x ORM support" version="${spring41.version}">
        <feature version="[${spring41.version},4.2)">spring-jdbc</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/${spring41.version}</bundle>
    </feature>

    <feature name="spring-oxm" description="Spring 4.1.x OXM support" version="${spring41.version}">
        <feature version="[${spring41.version},4.2)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/${spring41.version}</bundle>
    </feature>

    <feature name="spring-tx" description="Spring 4.1.x Transaction (TX) support" version="${spring41.version}">
        <feature version="[${spring41.version},4.2)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/${spring41.version}</bundle>
    </feature>

    <feature name="spring-web" description="Spring 4.1.x Web support" version="${spring41.version}">
        <feature version="[${spring41.version},4.2)">spring</feature>
        <feature>http</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/${spring41.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/${spring41.version}</bundle>
    </feature>

    <feature name="spring-web-portlet" description="Spring 4.1.x Web Portlet support" version="${spring41.version}">
        <feature prerequisite="true">wrap</feature>
        <feature version="[${spring41.version},4.2)">spring-web</feature>
        <bundle dependency="true" start-level="30">wrap:mvn:javax.portlet/portlet-api/${portlet-api.version}$Export-Package=javax.portlet.*;version=2.0</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/${spring41.version}</bundle>
    </feature>

    <feature name="spring-websocket" description="Spring 4.1.x WebSocket support" version="${spring41.version}">
        <feature version="[${spring41.version},4.2)">spring-web</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/${spring41.version}</bundle>
    </feature>

    <!-- Spring 4.2.x support -->

    <feature name="spring" description="Spring 4.2.x support" version="${spring42.version}">
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.bundle.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/${spring42.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/${spring42.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring42.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/${spring42.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/${spring42.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/${spring42.version}</bundle>
    </feature>

    <feature name="spring-aspects" description="Spring 4.2.x AOP support" version="${spring42.version}">
        <feature version="[${spring42.version},4.3)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/${spring42.version}</bundle>
    </feature>

    <feature name="spring-instrument" description="Spring 4.2.x Instrument support" version="${spring42.version}">
        <feature version="[${spring42.version},4.3)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/${spring42.version}</bundle>
    </feature>

    <feature name="spring-jdbc" description="Spring 4.2.x JDBC support" version="${spring42.version}">
        <feature version="[${spring42.version},4.3)">spring-tx</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/${spring42.version}</bundle>
    </feature>

    <feature name="spring-jms" description="Spring 4.2.x JMS support" version="${spring42.version}">
        <feature version="[${spring42.version},4.3)">spring-tx</feature>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/${geronimo.jta-spec.version}</bundle>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/${geronimo.jms-spec.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/${spring42.version}</bundle>
    </feature>

    <feature name="spring-test" description="Spring 4.2.x Test support" version="${spring42.version}">
        <feature version="[${spring42.version},4.3)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/${spring42.version}</bundle>
    </feature>

    <feature name="spring-orm" description="Spring 4.2.x ORM support" version="${spring42.version}">
        <feature version="[${spring42.version},4.3)">spring-jdbc</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/${spring42.version}</bundle>
    </feature>

    <feature name="spring-oxm" description="Spring 4.2.x OXM support" version="${spring42.version}">
        <feature version="[${spring42.version},4.3)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/${spring42.version}</bundle>
    </feature>

    <feature name="spring-tx" description="Spring 4.2.x Transaction (TX) support" version="${spring42.version}">
        <feature version="[${spring42.version},4.3)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/${spring42.version}</bundle>
    </feature>

    <feature name="spring-web" description="Spring 4.2.x Web support" version="${spring42.version}">
        <feature version="[${spring42.version},4.3)">spring</feature>
        <feature>http</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/${spring42.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/${spring42.version}</bundle>
    </feature>

    <feature name="spring-web-portlet" description="Spring 4.2.x Web Portlet support" version="${spring42.version}">
        <feature prerequisite="true">wrap</feature>
        <feature version="[${spring42.version},4.3)">spring-web</feature>
        <bundle dependency="true" start-level="30">wrap:mvn:javax.portlet/portlet-api/${portlet-api.version}$Export-Package=javax.portlet.*;version=2.0</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/${spring42.version}</bundle>
    </feature>

    <feature name="spring-websocket" description="Spring 4.2.x WebSocket support" version="${spring42.version}">
        <feature version="[${spring42.version},4.3)">spring-web</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/${spring42.version}</bundle>
    </feature>

    <!-- Spring 4.3.x support -->

    <feature name="spring" description="Spring 4.3.x support" version="${spring43.version}">
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.bundle.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/${spring43.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/${spring43.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring43.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/${spring43.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/${spring43.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/${spring43.version}</bundle>
    </feature>

    <feature name="spring-aspects" description="Spring 4.3.x AOP support" version="${spring43.version}">
        <feature version="[${spring43.version},4.4)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/${spring43.version}</bundle>
    </feature>

    <feature name="spring-instrument" description="Spring 4.3.x Instrument support" version="${spring43.version}">
        <feature version="[${spring43.version},4.4)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/${spring43.version}</bundle>
    </feature>

    <feature name="spring-jdbc" description="Spring 4.3.x JDBC support" version="${spring43.version}">
        <feature version="[${spring43.version},4.4)">spring-tx</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/${spring43.version}</bundle>
    </feature>

    <feature name="spring-jms" description="Spring 4.3.x JMS support" version="${spring43.version}">
        <feature version="[${spring43.version},4.4)">spring-tx</feature>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/${geronimo.jta-spec.version}</bundle>
        <bundle dependency="true" start-level="10">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/${geronimo.jms-spec.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/${spring43.version}</bundle>
    </feature>

    <feature name="spring-test" description="Spring 4.3.x Test support" version="${spring43.version}">
        <feature version="[${spring43.version},4.4)">spring</feature>
        <bundle dependency="true">mvn:javax.websocket/javax.websocket-api/1.1</bundle>
        <bundle dependency="true">mvn:org.apache.httpcomponents/httpcore-osgi/4.4.6</bundle>
        <bundle dependency="true">mvn:org.apache.httpcomponents/httpclient-osgi/4.5.2</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/${spring43.version}</bundle>
    </feature>

    <feature name="spring-orm" description="Spring 4.3.x ORM support" version="${spring43.version}">
        <feature version="[${spring43.version},4.4)">spring-jdbc</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/${spring43.version}</bundle>
    </feature>

    <feature name="spring-oxm" description="Spring 4.3.x OXM support" version="${spring43.version}">
        <feature version="[${spring43.version},4.4)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/${spring43.version}</bundle>
    </feature>

    <feature name="spring-tx" description="Spring 4.3.x Transaction (TX) support" version="${spring43.version}">
        <feature version="[${spring43.version},4.4)">spring</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/${spring43.version}</bundle>
    </feature>

    <feature name="spring-web" description="Spring 4.3.x Web support" version="${spring43.version}">
        <feature version="[${spring43.version},4.4)">spring</feature>
        <feature>http</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/${spring43.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/${spring43.version}</bundle>
    </feature>

    <feature name="spring-web-portlet" description="Spring 4.3.x Web Portlet support" version="${spring43.version}">
        <feature prerequisite="true">wrap</feature>
        <feature version="[${spring43.version},4.4)">spring-web</feature>
        <bundle dependency="true" start-level="30">wrap:mvn:javax.portlet/portlet-api/${portlet-api.version}$Export-Package=javax.portlet.*;version=2.0</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/${spring43.version}</bundle>
    </feature>

    <feature name="spring-websocket" description="Spring 4.3.x WebSocket support" version="${spring43.version}">
        <bundle dependency="true">mvn:javax.websocket/javax.websocket-api/1.1</bundle>
        <feature version="[${spring43.version},4.4)">spring-web</feature>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/${spring43.version}</bundle>
    </feature>

    <!-- Spring Security support -->

    <feature name="spring-security" description="Spring Security 3.1.x support" version="${spring.security31.version}">
        <feature>war</feature>
	    <feature version="[3,4)">spring-web</feature>
        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/${aspectj.bundle.version}</bundle>
        <bundle start-level="30">mvn:org.springframework.security/spring-security-core/${spring.security31.version}</bundle>
        <bundle start-level="30">mvn:org.springframework.security/spring-security-config/${spring.security31.version}</bundle>
        <bundle start-level="30">mvn:org.springframework.security/spring-security-web/${spring.security31.version}</bundle>
        <bundle start-level="30">mvn:org.springframework.security/spring-security-acl/${spring.security31.version}</bundle>
        <bundle start-level="30">mvn:org.springframework.security/spring-security-taglibs/${spring.security31.version}</bundle>
    </feature>

    <feature name="spring-security" description="Spring Security 4.2.x support" version="${spring.security42.version}">
        <feature>war</feature>
        <feature version="[4,5)">spring-web</feature>
        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/${aspectj.bundle.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-core/${spring.security42.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-config/${spring.security42.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-web/${spring.security42.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-acl/${spring.security42.version}</bundle>
        <bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-taglibs/${spring.security42.version}</bundle>
    </feature>

</features>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sriracha.Deploy.Data.Credentials
{
	public interface IImpersonator
	{
		ImpersonationContext BeginImpersonation(string credentialsId);
	}
}


text:
{% extends "shop/base.html" %}
{% load cms_tags shop_tags %}

{% block body %}
{% for object in object_list %}

{{ object.get_name }}

{% if object.image %}

{% endif %}
{% if object.description %}

{{ object.description }}

{% endif %}

{% endfor %}
{% endblock %}


text:
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
    switch (arguments.length) {
        case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
        case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
        case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
    }
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { SETUP_CHANNEL } from 'angular2/src/web_workers/shared/messaging_api';
import { ObservableWrapper } from 'angular2/src/facade/async';
import { MessageBus } from 'angular2/src/web_workers/shared/message_bus';
import { AnchorBasedAppRootUrl } from 'angular2/src/compiler/anchor_based_app_root_url';
import { StringWrapper } from 'angular2/src/facade/lang';
import { Injectable } from 'angular2/src/core/di';
export let WebWorkerSetup = class {
    constructor(_bus, anchorBasedAppRootUrl) {
        this._bus = _bus;
        this.rootUrl = anchorBasedAppRootUrl.value;
    }
    start() {
        this._bus.initChannel(SETUP_CHANNEL, false);
        var sink = this._bus.to(SETUP_CHANNEL);
        var source = this._bus.from(SETUP_CHANNEL);
        ObservableWrapper.subscribe(source, (message) => {
            if (StringWrapper.equals(message, "ready")) {
                ObservableWrapper.callNext(sink, { "rootUrl": this.rootUrl });
            }
        });
    }
};
WebWorkerSetup = __decorate([
    Injectable(),
    __metadata('design:paramtypes', [MessageBus, AnchorBasedAppRootUrl])
], WebWorkerSetup);
//# sourceMappingURL=setup.js.map