## org.plovr
Class CssHandler

    java.lang.Object
      org.plovr.CssHandler

All Implemented Interfaces:
  com.sun.net.httpserver.HttpHandler

    public class CssHandler

extends Object

Nested Class Summary
`static class` `CssHandler.ErrorManager`

Field Summary
`protected CompilationServer` `server`

Constructor Summary
`CssHandler(CompilationServer server)`

Method Summary
`static com.google.common.css.JobDescription` `createJobFromConfig(Config config, boolean prettyPrint)`
`protected void` `doGet(com.sun.net.httpserver.HttpExchange exchange, QueryData data, Config config)` All parameters are guaranteed to be non-null.
`static String` `execute(com.google.common.css.JobDescription job, CssHandler.ErrorManager errorManager)`
`protected Compilation` `getCompilation(com.sun.net.httpserver.HttpExchange exchange, QueryData data, Config config)` Successfully returns a `Compilation` (and records it as the latest `Compilation` for the config), or returns null, indicating that no `Compilation` could be found and that an error message was already written.
`protected Compilation` `getCompilation(com.sun.net.httpserver.HttpExchange exchange, QueryData data, Config config, boolean recordCompilation)`
`void` `handle(com.sun.net.httpserver.HttpExchange ex)`
`protected void` `setCacheHeaders(com.sun.net.httpserver.Headers headers)` Sets the cache headers to disable caching of resources.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### server

    protected final CompilationServer server

Constructor Detail

### CssHandler

    public CssHandler(CompilationServer server)

Method Detail

### doGet

    protected void doGet(com.sun.net.httpserver.HttpExchange exchange,
                         QueryData data,
                         Config config)
                  throws IOException

  All parameters are guaranteed to be non-null.

  Throws:
    `IOException`

### createJobFromConfig

    public static com.google.common.css.JobDescription createJobFromConfig(Config config,
                                                                           boolean prettyPrint)

### execute

    public static String execute(com.google.common.css.JobDescription job,
                                 CssHandler.ErrorManager errorManager)
                          throws com.google.common.css.compiler.ast.GssParserException

  Throws:
    `com.google.common.css.compiler.ast.GssParserException`

### handle

    public final void handle(com.sun.net.httpserver.HttpExchange ex)
                      throws IOException

  Specified by:
    `handle` in interface `com.sun.net.httpserver.HttpHandler`
  Throws:
    `IOException`

### setCacheHeaders

    protected void setCacheHeaders(com.sun.net.httpserver.Headers headers)

  Sets the cache headers to disable caching of resources. See http://code.google.com/p/doctype/wiki/ArticleHttpCaching

### getCompilation

    @Nullable
    protected final Compilation getCompilation(com.sun.net.httpserver.HttpExchange exchange,
                                                        QueryData data,
                                                        Config config)
                                        throws IOException

  Successfully returns a `Compilation` (and records it as the latest `Compilation` for the config), or returns null, indicating that no `Compilation` could be found and that an error message was already written.

  Throws:
    `IOException`

### getCompilation

    @Nullable
    protected final Compilation getCompilation(com.sun.net.httpserver.HttpExchange exchange,
                                                        QueryData data,
                                                        Config config,
                                                        boolean recordCompilation)
                                        throws IOException

  Throws:
    `IOException`