guardian/frontend — pull request #6254 by janua (2014-10-02 14:58:46+00:00)
Title: Start using facia-scala-client

**TLDR**; I have removed a lot of types and replace them with the types from `facia-scala-client`.

This adds `facia-scala-client` as a dependency to `frontend`, and removes objects from `frontend` that now exist in `facia-scala-client`.

This means now when adding new fields for use in `facia-tool`, `facia-press` and `facia`, it will need to be added to the dependency repo, and will keep apps and other clients inline with what `frontend` uses.

#### Changes:
- `frontsapi.model.Front` replaced with `com.gu.facia.client.models.Front`
- `model.Config` replaced with `com.gu.facia.client.models.CollectionConfig`
- `frontsapi.model.Config` replaced with `com.gu.facia.client.models.Config`
- `frontsapi.model.Trail` replaced with `com.gu.facia.client.models.Trail`
- `itemMetaWhitelist` is gone
- `DfpAgent` needs to be called directly

#### Things to look out for
This work is not finished yet, but this is most of it.
- `CollectionConfig` now does not carry the `ID` of the collection it it describing due to the the format of the `json`. In `frontend` we have a new object for this; `CollectionConfigWithId`.
- `dataId` (which is basically the collection id) is being explicitly passed around in the templates (it came before`CollectionConfigWithId`). In general this seems to be used as a `data-id` attribute, hence the name. We will change over to `CollectionConfigWithId` in the future.
- There are still calls going out to S3 directly from `frontend` via `S3FrontsApi`. Mainly `getBlock` and `getMasterConfig`. These will be switched over.
- The default client is blocking, but some of our calls were using `SecureS3Request`, which uses `WS` to make the calls `async`; I don't know if this will be much of an issue. We can make a new client easily for the library that fully uses `WS` if needed.
- Instead of the nasty default parameters of `CollectionConfig`, we now use `withDefaults`.

#### Other stuff left to do
- `ConfigAgentTrait` can probably be either moved to `facia-scala-client` or refactored. There is probably some unnecessary code in there; it currently has only changed to conform.
- Objects such as `UpdateManager` need to be changed over.
- Writing the object back to `S3` needs to use the new objects.

@robertberry @stephanfowler