// Path: osgi.enroute.examples.backend.application/src/osgi/enroute/examples/backend/api/Backend.java
// public interface Backend {
// 	String TYPE = "type";
// 
// 	/**
// 	 * Save a blob
// 	 * 
// 	 * @param name
// 	 *            The name of the blob
// 	 * @param data
// 	 *            The actual data
// 	 * @return the meta data describing the details of the store
// 	 */
// 	MetaData save(String name, byte[] data) throws Exception;
// 
// 	/**
// 	 * Read the blob with the given name.
// 	 * 
// 	 * @param name
// 	 *            The name of the resource
// 	 * @return the data
// 	 */
// 	byte[] read(String name) throws Exception;
// 
// 	/**
// 	 * Return a list of the meta data of what the store has.
// 	 * 
// 	 * @return The list
// 	 */
// 	Collection<? extends MetaData> list() throws Exception;
// 
// 	/**
// 	 * Delete a blob
// 	 * 
// 	 * @param name
// 	 *            The name of the blob
// 	 * @return true if deleted, false if could not be deleted (might not exist)
// 	 */
// 	boolean delete(String name) throws Exception;
// }


import java.io.FileNotFoundException;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import osgi.enroute.configurer.api.RequireConfigurerExtender;
import osgi.enroute.examples.backend.api.Backend;
import osgi.enroute.google.angular.capabilities.RequireAngularWebResource;
import osgi.enroute.stackexchange.pagedown.capabilities.RequirePagedownWebResource;
import osgi.enroute.twitter.bootstrap.capabilities.RequireBootstrapWebResource;
import osgi.enroute.webserver.capabilities.RequireWebServerExtender;
package osgi.enroute.examples.backend.application;




/**
 * The Backend Application is the application core. It maintains a lost of
 * backends by name and provides access to it.
 *
 */
@RequireAngularWebResource(resource = { "angular.js", "angular-route.js",
		"angular-resource.js" }, priority = 1000)
@RequirePagedownWebResource(resource = "enmarkdown.js")
@RequireBootstrapWebResource(resource = { "css/bootstrap.css" })
@RequireWebServerExtender
@RequireConfigurerExtender
@Component(name = "osgi.enroute.examples.backends", service = BackendApplication.class)
public class BackendApplication {
// Path: osgi.enroute.examples.backend.application/src/osgi/enroute/examples/backend/api/Backend.java
// public interface Backend {
// 	String TYPE = "type";
// 
// 	/**
// 	 * Save a blob
// 	 * 
// 	 * @param name
// 	 *            The name of the blob
// 	 * @param data
// 	 *            The actual data
// 	 * @return the meta data describing the details of the store
// 	 */
// 	MetaData save(String name, byte[] data) throws Exception;
// 
// 	/**
// 	 * Read the blob with the given name.
// 	 * 
// 	 * @param name
// 	 *            The name of the resource
// 	 * @return the data
// 	 */
// 	byte[] read(String name) throws Exception;
// 
// 	/**
// 	 * Return a list of the meta data of what the store has.
// 	 * 
// 	 * @return The list
// 	 */
// 	Collection<? extends MetaData> list() throws Exception;
// 
// 	/**
// 	 * Delete a blob
// 	 * 
// 	 * @param name
// 	 *            The name of the blob
// 	 * @return true if deleted, false if could not be deleted (might not exist)
// 	 */
// 	boolean delete(String name) throws Exception;
// }


// Path: osgi.enroute.examples.backend.application/src/osgi/enroute/examples/backend/application/BackendApplication.java
import java.io.FileNotFoundException;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import osgi.enroute.configurer.api.RequireConfigurerExtender;
import osgi.enroute.examples.backend.api.Backend;
import osgi.enroute.google.angular.capabilities.RequireAngularWebResource;
import osgi.enroute.stackexchange.pagedown.capabilities.RequirePagedownWebResource;
import osgi.enroute.twitter.bootstrap.capabilities.RequireBootstrapWebResource;
import osgi.enroute.webserver.capabilities.RequireWebServerExtender;

package osgi.enroute.examples.backend.application;




/**
 * The Backend Application is the application core. It maintains a lost of
 * backends by name and provides access to it.
 *
 */
@RequireAngularWebResource(resource = { "angular.js", "angular-route.js",
		"angular-resource.js" }, priority = 1000)
@RequirePagedownWebResource(resource = "enmarkdown.js")
@RequireBootstrapWebResource(resource = { "css/bootstrap.css" })
@RequireWebServerExtender
@RequireConfigurerExtender
@Component(name = "osgi.enroute.examples.backends", service = BackendApplication.class)
public class BackendApplication {
	private ConcurrentMap<String, Backend> backends = new ConcurrentHashMap<>();