updated the pom with the new application entry point.
created new resource 'answers'.
created an abstract base for all resources.
refined 'forms' resource.
added answersresource to application bootstrap procedure.
added static fields to resource superclass.
these fields consist of common services and components needed by all resources.
such as: json parsing/generating components and redis key value store.
added a proof of concept for json parsing in answerresource#create endpoint.
initial commit for issue 14.
i've basically fleshed out the object model for application resources.
each resource will extend a base class and implement an interface for serialising and unserialising between json and pojos.
concrete implementation for each resource will be provided once we have decided on document formats and how data will be stored within redis.
removed the interface contained in baseresource.
it was sort of overkill.
i've baked in the behaviour it outlines into baseresource instead, as the parameters to each method are standard and can be safely provided by any subclasses.
this cleans up any extensions of baseresource considerably.
added usage examples for serialising and unserialising representation to and from json using the redis instance.
privatised some members of the jedisclient class. users of this client shouldn't be able to destruct the redis instance pool, borrow additional instances or return instances prematurely.
jedis client changes aren't concerned with this branch but are too urgent to ignore.
added an initial implementation of formsresource.
it's possible to push things into redis with a uuid key.
you can pull all values out of redis using the bare GET endpoint.
a standard uuid generator has been added to baseresource. it simply uses java.util.uuid, nothing special.
added an implementation for #getSingle(). returns a json representation similar to that of #getAll().
create and getall methods have been refactored for temporary test usage.
the apache stringutils usage has been factored out and put into baseresource for general resource usage.
made baseresource package-private.
committing before leaving for the weekend.
have removed resource's dependency on env and cfg during initialisation.
a temporary solution to a long running problem. will research this over the weekend.
factored out resource creation into base resource. should probably rename those methods to xRepresentation.
after researching standard ways of injecting dependencies into resources for dropwizard, i opted for the original way of referencing the jedisclient: by having it as a static field of each resource. the baseresource constructor has been altered for this.
added whitespace for readability to baseresource.
added a prototype representation for formsresource.
created some more room amongst the formsresource member methods for readability.
created a prototype representation for answersresource.
answersresource#create() simply echoes the inner most array passed in the json payload.
privatised baseresource#generateUUID() - i can't yet think of a reason to expose this method to subclasses.
added an instance field to baseresource for each subclass to assign to. this field will hold the class literal for each subclasses static inner class.
added a stub method to baseresource that checks whether a given key exists in redis. an implementation will be provided once this branch has been pushed and development focus switches to the jedis client implementation.
added accessor methods for formsrepresentation static inner class.
altered spacing for readability in formsresource.
altered spacing for readibility in answersresource.
added more return cases for each route to answersresource.
added initial implementations for answersresource. until rosafactory has been reviewed and/or rewritten, this is as far as we can go.
made the static inner class of answersrepresentation (the static inner class for answersresource) package private, for obvious reasons.
added a safety check to baseresource#implode()
improved readability of baseresource#createresource() and altered the method so that it doesn't generate an uuid until the argument provided has been checked for truthiness.
added a comment for formsrepresentation.
added a truth check for formsresource#create()
added some more whitespacing in formsresource#getall()
added truth checks for answersresource#create() and #update()
created comments explaining the purpose of answersrepresentation and answer.
updated the produces and consumes annotations for both resource subclasses as well as the specific method annotation overrides.
fixed illegal state exception in formsresource.
fixed unquoted json property values in http responses.
fixed formsresource#getsingle() not setting the correct content-type in the event of a request failure.