diff --git a/config/alfresco/file-servers.xml b/config/alfresco/file-servers.xml index 6f85f0aa76..4672aacc70 100644 --- a/config/alfresco/file-servers.xml +++ b/config/alfresco/file-servers.xml @@ -136,12 +136,13 @@ --> - - + + + - + - + diff --git a/source/java/org/alfresco/filesys/avm/AVMContext.java b/source/java/org/alfresco/filesys/avm/AVMContext.java index 81113d3278..7046fd2c8a 100644 --- a/source/java/org/alfresco/filesys/avm/AVMContext.java +++ b/source/java/org/alfresco/filesys/avm/AVMContext.java @@ -61,9 +61,10 @@ public class AVMContext extends AlfrescoContext // Store types to show in the virtualization view public static final int ShowNormalStores = 0x0001; - public static final int ShowStagingStores = 0x0002; - public static final int ShowAuthorStores = 0x0004; - public static final int ShowPreviewStores = 0x0008; + public static final int ShowSiteStores = 0x0002; + public static final int ShowStagingStores = 0x0004; + public static final int ShowAuthorStores = 0x0008; + public static final int ShowPreviewStores = 0x0010; // Store, root path and version @@ -182,6 +183,16 @@ public class AVMContext extends AlfrescoContext return (m_showOptions & ShowNormalStores) != 0 ? true : false; } + /** + * Check if site data stores should be shown in the virtualization view + * + * @return boolean + */ + public final boolean showSiteStores() + { + return (m_showOptions & ShowSiteStores) != 0 ? true : false; + } + /** * Check if author stores should be shown in the virtualization view * @@ -222,21 +233,24 @@ public class AVMContext extends AlfrescoContext { boolean showStore = false; - switch ( storeType) + switch (storeType) { - case StoreType.Normal: - showStore = showNormalStores(); - break; - case StoreType.WebAuthorMain: - showStore = showAuthorStores(); - break; - case StoreType.WebStagingMain: - showStore = showStagingStores(); - break; - case StoreType.WebAuthorPreview: - case StoreType.WebStagingPreview: - showStore = showPreviewStores(); - break; + case StoreType.Normal: + showStore = showNormalStores(); + break; + case StoreType.SiteStore: + showStore = showSiteStores(); + break; + case StoreType.WebAuthorMain: + showStore = showAuthorStores(); + break; + case StoreType.WebStagingMain: + showStore = showStagingStores(); + break; + case StoreType.WebAuthorPreview: + case StoreType.WebStagingPreview: + showStore = showPreviewStores(); + break; } return showStore; diff --git a/source/java/org/alfresco/filesys/avm/AVMDiskDriver.java b/source/java/org/alfresco/filesys/avm/AVMDiskDriver.java index 11a129abdd..b56578aa10 100644 --- a/source/java/org/alfresco/filesys/avm/AVMDiskDriver.java +++ b/source/java/org/alfresco/filesys/avm/AVMDiskDriver.java @@ -340,6 +340,9 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface if ( optList.containsString("normal")) showOptions += AVMContext.ShowNormalStores; + if ( optList.containsString("site")) + showOptions += AVMContext.ShowSiteStores; + if ( optList.containsString("author")) showOptions += AVMContext.ShowAuthorStores; @@ -353,8 +356,9 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface { // Old style show options - showOptions = AVMContext.ShowNormalStores + AVMContext.ShowAuthorStores + - AVMContext.ShowPreviewStores + AVMContext.ShowStagingStores; + showOptions = AVMContext.ShowNormalStores + AVMContext.ShowSiteStores + + AVMContext.ShowAuthorStores + AVMContext.ShowPreviewStores + + AVMContext.ShowStagingStores; } // Create the context @@ -2365,6 +2369,12 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface webProjName = storeName.substring( 0, storeName.length() - "--preview".length()); } + else if ( props.containsKey(QName.createQName(null, ".sitestore"))) + { + // Site data store type + + storeType = StoreType.SiteStore; + } // DEBUG @@ -2378,12 +2388,13 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface // Create the pseudo folder for the store StorePseudoFile storeFolder = new StorePseudoFile( storeDesc, FileName.DOS_SEPERATOR_STR + storeName, storeType); - if ( storeType != StoreType.Normal) + if (storeType == StoreType.WebAuthorMain || storeType == StoreType.WebAuthorPreview || + storeType == StoreType.WebStagingMain || storeType == StoreType.WebStagingPreview) { storeFolder.setWebProject( webProjName); storeFolder.setUserName( userName); } - + // Add the store pseudo folder to the root folder file list fstate.addPseudoFile( storeFolder); @@ -2903,7 +2914,7 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface filterList.addFile( storeFolder); } } - else if ( avmCtx.showNormalStores()) + else if ( avmCtx.showNormalStores() || avmCtx.showSiteStores()) { // Store is not linked to a web project, allow access to the store diff --git a/source/java/org/alfresco/filesys/avm/StoreType.java b/source/java/org/alfresco/filesys/avm/StoreType.java index c8bfe28342..6da691cc45 100644 --- a/source/java/org/alfresco/filesys/avm/StoreType.java +++ b/source/java/org/alfresco/filesys/avm/StoreType.java @@ -27,16 +27,20 @@ public class StoreType { public static final int Normal = 0; + // Site data store types + + public static final int SiteStore = 1; + // Web project store types - public static final int WebAuthorMain = 1; - public static final int WebAuthorPreview = 2; - public static final int WebStagingPreview = 3; - public static final int WebStagingMain = 4; + public static final int WebAuthorMain = 2; + public static final int WebAuthorPreview = 3; + public static final int WebStagingPreview = 4; + public static final int WebStagingMain = 5; // Store type strings - private static final String[] _types = { "Normal", "AuthorMain", "AuthorPreview", "StagingPreview", "StagingMain" }; + private static final String[] _types = { "Normal", "SiteStore", "AuthorMain", "AuthorPreview", "StagingPreview", "StagingMain" }; /** * Return a store type as a string