anchor.diff:  [[content-repositories]]
   = Working with Spring Stores
   
  -The goal of the Spring Content is to significantly reduce the amount of boilerplate code required to implement handling of rich-content resources and other media by providing content access, metadata association, search and transformation capabilities for various implementations of Content Store.
  +The goal of the Spring Content is to make it easy to create applications that manage content such as documents, images and video by significantly reducing the amount of boilerplate code that the Developer must create for themselves.  The Developer just provides interfaces that declare the intent for content-related functionality.  Based on these and on class-path dependencies Spring Content is then able to inject storage-specific implementations.
   
   [IMPORTANT]
   ====
  -This chapter explains the core concepts and interfaces for Spring Content stores. The information in this chapter is pulled from the Spring Content Commons.  It uses the configuration and code samples for the S3 module.  Adapt the Java configuration and the types to be extended to the equivalents of the particular module that you are using.
  +This chapter explains the core concepts and interfaces for Spring Content. The examples in this chapter use Java configuration and code samples for the Spring Content S3 module.  Adapt the Java configuration and the types to be extended to the equivalents for the particular Spring Content module that you are using.
   ====
   
   [[content-repositories.core-concepts]]
   == Core concepts
  -The central interface in the Spring Content is the `ContentStore` abstraction.  This interface provides CRUD functionality and metadata association for content.  It is typed to the Spring Data domain class to which the content is associated, and to the type of the content ID attribute on that domain class. 
  +The central interface in the Spring Content is the `ContentStore`.  This interface provides CRUD functionality and entity association for content.  As such a ContentStore is typed to the Spring Data Entity to which content is associated, and to the type of a `@ContentId` field on that domain class.
   
   [[content-repositories.repository]]
   
  
positive.code:   	@Autowired private SopDocumentContentStore contentStore;
  
  	public void doSomething() {
  	
  		SopDocument doc = new SopDocument();
  		doc.setTitle("example");
  		contentStore.setContent(doc, new ByteArrayInputStream("some interesting content".getBytes())); # <1>
  		doc.save(); 
  		...
  		
  		InputStream content = contentStore.getContent(sopDocument);
  		...
  		
  		List<SopDocument> docs = doc.findAllByContentId(contentStore.findKeyword("interesting"));
  		...
  		
  	}
  }
  ----
  
negative.code: }
  ----
  ====
  The down-side of this approach is that it does not filter events based on Entity.
  
  ==== Writing an Annotated StoreEventHandler ====
  
  Another approach is to use an annotated handler, which does filter events based on Entity.
  
  To declare a handler, create a POJO and annotate it as `@StoreEventHandler`. This tells
  Spring Content that this class needs to be inspected for handler methods.  It
  iterates over the class's methods and looks for annotations that correspond to the
  event.  There are 6 handler annotations:
  
  * HandleBeforeSetContent
  
  * HandleAfterSetContent
  
  * HandleBeforeGetContent
  