2. Affärsnytta
• Lägre lagringskostnad
• Arkivera innehåll som inte används så
frekvent på långsammare, billigare diskar
• Arkiverat innehåll fortfarande åtkomligt
• Aktivt innehåll kvar på snabba diskar
• Endast tillgängligt i Enterpriseversionen!
3. Lagringsytor
• Definera lagringsytor i alfresco-
global.properties
dir.root=/data/alfesco/active (aktiv innehåll, snabb disk)
dir.root.archive=/data/alfresco/archive (det nya arkivet, långsammare disk)
4.
5. Konfigurera arkivet som ett nytt file
store
• Skapa en ny fil, content-store-selector-context.xml
• Definera ett nytt ”file store” i context-filen
<bean id="archiveFileContentStore"
class="org.alfresco.repo.content.filestore.FileContentStore">
<constructor-arg>
<value>${dir.root.archive}</value>
</constructor-arg>
</bean>
8. Flytta innehåll till det nya arkivet
• Applicera aspekten cm:contentStoreSelector och sätt värdet på propertyn
cm:storeName=”archive” på det innehåll som ska flyttas till arkivet.
• Då kommer själva filen att flyttas till den långsammare disken!
• Flytta tillbaka innehåll till default content store genom att sätta om
cm:storeName =”default”
• Propertyn kan appliceras via alfrescos webbgränssnitt, via en regel som kör
ett script eller programmatiskt
9. Exempel
//Applies the aspect store selector with the name of the file store to which the
content should be moved. In this case to the archive.
setContentStoreSelector(nodeRef, ”archive”);
public void setContentStoreToArchive(NodeRef
nodeRef) {
Map<QName, Serializable> aspectProps = new
HashMap<QName, Serializable>();
aspectProps.put(”cm:storeName”, ”archive”);
nodeService.addAspect(nodeRef,
”cm:contentStoreSelector”, aspectProps);
}
10. Exempel
//Applies the aspect store selector with the name of the file store to which the
content should be moved. In this case to the archive.
setContentStoreSelector(nodeRef, ”archive”);
public void setContentStoreToArchive(NodeRef
nodeRef) {
Map<QName, Serializable> aspectProps = new
HashMap<QName, Serializable>();
aspectProps.put(”cm:storeName”, ”archive”);
nodeService.addAspect(nodeRef,
”cm:contentStoreSelector”, aspectProps);
}