Alfresco Content Store Selector
Content store selector
The content store selector provides users with a mechanism to bind content with
a specific content store. Alfresco provides the flexibility to have multiple content
stores, and you can decide what content needs to be stored in which store. This
is very useful in a scenario where you need to store different folder data in a
completely different store. You get the flexibility to place the less read, old conten
to any slow disk and all new content to any fast disk.
Using the content store selector
Follow the steps mentioned here to enable the content store selector:
1. Create a content store selector context file in <Alfresco_home>/shared/classes/alfresco/extension. A sample context file is provided with support files of this book.
2. Define the store as you require by defining beans, as shown in the following code sample:
3. List all the store beans with a store name that will be visible in the user
interface in the storeSelectorContentStore bean. Take a look at the
sample code snippet:
8. Now apply this aspect to any content and set the storeName based on the
store you want the content to be in, for example if you want to store all
marketing documents in the projectMarketing store, set the storeName
value to projectMarketing as defined in the store selector bean. The file will
be copied from the default content store to the new content store. If no value
is specified in storeName, it takes the default. The file in the old content
store will remain as it is, but it will be marked as orphan so the cleanup
process can clean these documents.