// Path: hangar-api/src/main/java/com/spedge/hangar/config/HangarConfiguration.java
// public class HangarConfiguration extends Configuration
// {
// 
//     @JsonProperty
//     private IStorage storage;
// 
//     @JsonProperty
//     private IIndex artifactIndex;
// 
//     @NotEmpty
//     @JsonProperty
//     private List<IRepository> repositories;
// 
//     public List<IRepository> getRepositories()
//     {
//         return repositories;
//     }
// 
//     public void setRepositories(List<IRepository> repositories)
//     {
//         this.repositories = repositories;
//     }
// 
//     public IStorage getStorage()
//     {
//         return storage;
//     }
// 
//     public void setStorage(IStorage storage)
//     {
//         this.storage = storage;
//     }
// 
//     public IIndex getIndex()
//     {
//         return artifactIndex;
//     }
// 
//     public void setIndex(IIndex index)
//     {
//         this.artifactIndex = index;
//     }
// }
// 
// Path: hangar-api/src/main/java/com/spedge/hangar/config/HangarInjector.java
// public class HangarInjector extends AbstractModule
// {
//     @Override
//     protected void configure()
//     {
//     }
// }
// 
// Path: hangar-api/src/main/java/com/spedge/hangar/repo/IRepository.java
// @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
// @JsonSubTypes(
//     { @JsonSubTypes.Type(value = JavaDownloadEndpoint.class, name = "java-download"),
//       @JsonSubTypes.Type(value = JavaReleaseEndpoint.class, name = "java-release"),
//       @JsonSubTypes.Type(value = JavaSnapshotEndpoint.class, name = "java-snapshot"),
//       @JsonSubTypes.Type(value = PythonDownloadEndpoint.class, name = "python-download")
//     })
// public interface IRepository
// {
// 
//     /**
//      * Each repository should provide custom healthchecks for it's own use
//      * cases.
//      * 
//      * @return An map of healthchecks
//      */
//     Map<String, HealthCheck> getHealthChecks();
// 
//     /**
//      * After initial configuration, this command is run in order to set-up or
//      * load the repository and get it to a state where it's ready to run.
//      * 
//      * @param configuration HangarConfiguration passed in as YAML
//      * @param environment Dropwizard environment
//      * @throws StorageException Thrown when Storage initialisation fails.
//      * @throws IndexException Thrown when Index initialisation fails.
//      */
//     void loadRepository(HangarConfiguration configuration, Environment environment)
//             throws StorageException, IndexException;
// 
//     /**
//      * Retrieves the storage configured for the repositories (One storage for all
//      * repos).
//      * 
//      * @return Returns the storage for this repository
//      */
//     IStorage getStorage();
// 
//     /**
//      * Returns the index configured for the repositories (One index for all
//      * repos).
//      * 
//      * @return Returns the index for this repository
//      */
//     IIndex getIndex();
// }
// 
// Path: hangar-api/src/main/java/com/spedge/hangar/requests/TestRequest.java
// @Path("/test")
// public class TestRequest
// {
//     /**
//      * Simple way of looking at the headers of a request.
//      * Handy when working with Dropwizard.
//      * 
//      * @param httpHeaders Headers of the request
//      * @return Responses
//      */
//     @PUT
//     @Path("/headers")
//     public Response testThing(@Context HttpHeaders httpHeaders)
//     {
//         for (MediaType mt : httpHeaders.getAcceptableMediaTypes())
//         {
//             System.out.println("MediaType : " + mt.getType());
//         }
// 
//         return Response.ok().build();
//     }
// }


import com.google.inject.Guice;
import com.google.inject.Injector;
import com.spedge.hangar.config.HangarConfiguration;
import com.spedge.hangar.config.HangarInjector;
import com.spedge.hangar.repo.IRepository;
import com.spedge.hangar.requests.TestRequest;
import io.dropwizard.Application;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import java.util.List;
package com.spedge.hangar;




/**
 * The main entry point for the Hangar application.
 * 
 * @author Spedge
 *
 */
public class Hangar extends Application<HangarConfiguration>
{

    public static void main(String[] args) throws Exception
    {
// Path: hangar-api/src/main/java/com/spedge/hangar/config/HangarConfiguration.java
// public class HangarConfiguration extends Configuration
// {
// 
//     @JsonProperty
//     private IStorage storage;
// 
//     @JsonProperty
//     private IIndex artifactIndex;
// 
//     @NotEmpty
//     @JsonProperty
//     private List<IRepository> repositories;
// 
//     public List<IRepository> getRepositories()
//     {
//         return repositories;
//     }
// 
//     public void setRepositories(List<IRepository> repositories)
//     {
//         this.repositories = repositories;
//     }
// 
//     public IStorage getStorage()
//     {
//         return storage;
//     }
// 
//     public void setStorage(IStorage storage)
//     {
//         this.storage = storage;
//     }
// 
//     public IIndex getIndex()
//     {
//         return artifactIndex;
//     }
// 
//     public void setIndex(IIndex index)
//     {
//         this.artifactIndex = index;
//     }
// }
// 
// Path: hangar-api/src/main/java/com/spedge/hangar/config/HangarInjector.java
// public class HangarInjector extends AbstractModule
// {
//     @Override
//     protected void configure()
//     {
//     }
// }
// 
// Path: hangar-api/src/main/java/com/spedge/hangar/repo/IRepository.java
// @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
// @JsonSubTypes(
//     { @JsonSubTypes.Type(value = JavaDownloadEndpoint.class, name = "java-download"),
//       @JsonSubTypes.Type(value = JavaReleaseEndpoint.class, name = "java-release"),
//       @JsonSubTypes.Type(value = JavaSnapshotEndpoint.class, name = "java-snapshot"),
//       @JsonSubTypes.Type(value = PythonDownloadEndpoint.class, name = "python-download")
//     })
// public interface IRepository
// {
// 
//     /**
//      * Each repository should provide custom healthchecks for it's own use
//      * cases.
//      * 
//      * @return An map of healthchecks
//      */
//     Map<String, HealthCheck> getHealthChecks();
// 
//     /**
//      * After initial configuration, this command is run in order to set-up or
//      * load the repository and get it to a state where it's ready to run.
//      * 
//      * @param configuration HangarConfiguration passed in as YAML
//      * @param environment Dropwizard environment
//      * @throws StorageException Thrown when Storage initialisation fails.
//      * @throws IndexException Thrown when Index initialisation fails.
//      */
//     void loadRepository(HangarConfiguration configuration, Environment environment)
//             throws StorageException, IndexException;
// 
//     /**
//      * Retrieves the storage configured for the repositories (One storage for all
//      * repos).
//      * 
//      * @return Returns the storage for this repository
//      */
//     IStorage getStorage();
// 
//     /**
//      * Returns the index configured for the repositories (One index for all
//      * repos).
//      * 
//      * @return Returns the index for this repository
//      */
//     IIndex getIndex();
// }
// 
// Path: hangar-api/src/main/java/com/spedge/hangar/requests/TestRequest.java
// @Path("/test")
// public class TestRequest
// {
//     /**
//      * Simple way of looking at the headers of a request.
//      * Handy when working with Dropwizard.
//      * 
//      * @param httpHeaders Headers of the request
//      * @return Responses
//      */
//     @PUT
//     @Path("/headers")
//     public Response testThing(@Context HttpHeaders httpHeaders)
//     {
//         for (MediaType mt : httpHeaders.getAcceptableMediaTypes())
//         {
//             System.out.println("MediaType : " + mt.getType());
//         }
// 
//         return Response.ok().build();
//     }
// }


// Path: hangar-api/src/main/java/com/spedge/hangar/Hangar.java
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.spedge.hangar.config.HangarConfiguration;
import com.spedge.hangar.config.HangarInjector;
import com.spedge.hangar.repo.IRepository;
import com.spedge.hangar.requests.TestRequest;
import io.dropwizard.Application;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import java.util.List;

package com.spedge.hangar;




/**
 * The main entry point for the Hangar application.
 * 
 * @author Spedge
 *
 */
public class Hangar extends Application<HangarConfiguration>
{

    public static void main(String[] args) throws Exception
    {
        Injector injector = Guice.createInjector(new HangarInjector());