Your SlideShare is downloading. ×
  • Like
Alfresco content store selectors
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Alfresco content store selectors

  • 1,893 views
Published

Introduction to Alfresco content store selectors - in swedish

Introduction to Alfresco content store selectors - in swedish

Published in Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,893
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
6
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Alfresco content storeselectorLagra innehåll på olika lagringsmedierOskar ElissonRedpill Linpro
  • 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.propertiesdir.root=/data/alfesco/active (aktiv innehåll, snabb disk)dir.root.archive=/data/alfresco/archive (det nya arkivet, långsammare disk)
  • 4. Konfigurera arkivet som ett nytt filestore• 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>
  • 5. Definera nytt content store<bean id="storeSelectorContentStore" parent="storeSelectorContentStoreBase"><property name="defaultStoreName"><value>default</value></property><property name="storesByName"><map><entry key="default"><ref bean="fileContentStore" /></entry><entry key="archive"><ref bean="archiveFileContentStore" /></entry></map></property></bean>
  • 6. Content service konfigurering<bean id="contentService" parent="baseContentService"><property name="store"><ref bean="storeSelectorContentStore" /></property></bean>
  • 7. Flytta innehåll till det nya arkivet• Applicera aspekten cm:contentStoreSelector och sätt värdet på propertyncm: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 omcm:storeName =”default”• Propertyn kan appliceras via alfrescos webbgränssnitt, via en regel som körett script eller programmatiskt
  • 8. Exempel//Applies the aspect store selector with the name of the file store to which thecontent should be moved. In this case to the archive.setContentStoreSelector(nodeRef, ”archive”);public void setContentStoreToArchive(NodeRefnodeRef) {Map<QName, Serializable> aspectProps = newHashMap<QName, Serializable>();aspectProps.put(”cm:storeName”, ”archive”);nodeService.addAspect(nodeRef,”cm:contentStoreSelector”, aspectProps);}
  • 9. Exempel//Applies the aspect store selector with the name of the file store to which thecontent should be moved. In this case to the archive.setContentStoreSelector(nodeRef, ”archive”);public void setContentStoreToArchive(NodeRefnodeRef) {Map<QName, Serializable> aspectProps = newHashMap<QName, Serializable>();aspectProps.put(”cm:storeName”, ”archive”);nodeService.addAspect(nodeRef,”cm:contentStoreSelector”, aspectProps);}