Extending CollectionSpace

CollectionSpace offers several extension points, or "hooks," where you can insert your own code to either add new functionality or change CollectionSpace's current behaviors.

Among these extension points:

  • SQL scripts. You can add your own SQL scripts and have them executed each time that CollectionSpace is started.
  • Batch jobs. You can create batch jobs, conforming to a Java interface, which can perform batch operations on demand: on a single record; on multiple records, specified by their CSIDs; or on the records included in a Group.
  • Event listeners/handlers. You can set up listeners that will 'fire' when selected events occur, such as the creation or updating of specified types of records, and then handle those events by executing your Java code. This code can perform just about any actions that you might require.

Individual pages with further details about each of these extension points are slated to be added here. Until then, you can:


  • View a description of how to add your own SQL scripts in this comment on issue CSPACE-5978.
    (Note that the description of Method 1 - only - in that comment is likely pertinent only to CollectionSpace 3.3 and earlier; you'd need to instead add a similar entry to an Application layer configuration file in CollectionSpace 4.0 and later.)
  • View examples of batch jobs in the CollectionSpace Services layer source code, within the batch module.
  • View examples of event listener/handlers CollectionSpace Services layer source code, within the 3rdparty module.

See Also