Prospecto is a toolkit for producing textual views of the information in the domain model of a Java application.
Using Prospecto, you write _view templates_ in Java using a fluent builder API to describe the model objects and properties to include in a view. You can then your templates to generate views which Prospecto can easily transform into JSON, XML, and practically any other structured representation format. ASN.1 anyone?
In addition to supporting the generation of views to produce a textual representation of your domain model, Prospecto can also apply the information in a textual representation of your model to create or update domain model instances. In other words, you can use Prospecto to facilitate "editing" of your domain model instances, as well as creating new model instances.
When Prospecto applies a view to create or update a model instance, it does so transitively with respect to associated model objects. So you can even edit objects that are composed inside of other objects; e.g. when a one-to-one relationship exists between a model entity and another model entity. The transitive update also applies to collections/arrays of model objects; e.g. where you have a one-to-many relationship between a model entity and a collection/array of related entities. Prospecto's collection update supports adding new objects to a collection, edit existing objects in the collection, and removing objects from the the collection.
When applying a view to update a model instance, Prospecto uses standard JavaBeans mechanisms for property injection and collection management. Often a domain model provides its own methods to manage relationships between entities. For these situations, Prospecto provides powerful hooks to allow you to customize the model update process to ensure that your domain model is updated according to the API it exposes.
Package | Description |
---|---|
org.soulwing.prospecto |
Static producers for various framework components
|
org.soulwing.prospecto.api |
View and View Template API
|
org.soulwing.prospecto.api.association |
Association manager API
|
org.soulwing.prospecto.api.converter |
Model type to view type conversion API
|
org.soulwing.prospecto.api.discriminator |
Polymorphic type discrimination API
|
org.soulwing.prospecto.api.factory |
Object factory API
|
org.soulwing.prospecto.api.json | |
org.soulwing.prospecto.api.listener |
View node listener API
|
org.soulwing.prospecto.api.meta |
View metadata API
|
org.soulwing.prospecto.api.options |
Option configuration for views, view writers, and view readers
|
org.soulwing.prospecto.api.reference |
Reference resolver API
|
org.soulwing.prospecto.api.scope |
Scope API
|
org.soulwing.prospecto.api.splice | |
org.soulwing.prospecto.api.template |
Template and node API
|
org.soulwing.prospecto.api.text | |
org.soulwing.prospecto.api.url |
URL resolver API
|
org.soulwing.prospecto.spi |
Service provider interface
|