anchor.diff:  Same as above but an instance of +CrmResourceRef+ will be used as template.
   
   
  -=== Events
  -
  -You can also send an asynchronous event that results in a FreeMarker template being parsed.
  +== Events
  +
  +You can also send an asynchronous event that results in a template being parsed.
  +
  +=== parseTemplate
   
   [source,groovy]
   .EventBasedTemplateParsingTests.groovy
  
positive.code: the domain instance using a *Resource Identifier* and the +res+ property contains the provider specific URI to the content.
  This is nothing that you need to care about, the framework takes care about setting these properties when you create and attach content.
  
  
  == CrmContentService
  
  This is the main service that you use to create, find, edit and delete files and folders with.
  
  +CrmResourceRef createResource(InputStream inputStream, String filename, Long length, String contentType, Object reference, Map params = [:])+
  
  Create a new file.
  
  +def withInputStream(URI uri, Closure work)+
  
  For content referenced by a +URI+ create a new InputStream and pass it into a closure. This method ensures the stream is closed after the closure returns.
  
  +Map<String, Object> getMetadata(URI resource)+
  
  Get metadata for the content specified by +resource+. The metadata Map contains the following keys:
  
  - *uri* the provider specific URI for the content
  - *contentType* = MIME content type
  - *bytes* = length in bytes
  - *size* = formatted length
  - *icon* = name of icon that best described the content
  - *created* = Date instance when content was created
  - *modified* = Date instance when content was last updated
  - *hash* = MD5 hash of the content
  - *encrypted* = type of encrypted storage (0 = no encryption)
  
  +long updateResource(CrmResourceRef resource, InputStream inputStream, String contentType = null)+
  
  
negative.code: ----
  <1> The stream is closed by createResource(...)
  
  TIP: You can look at the source code for the https://github.com/technipelago/grails-crm-content/tree/master/test/integration/grails/plugins/crm/content[integration tests^] to find more code examples.
  
  == Configuration
  
  