mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Added new filesystem filter for AVM stores - "site" stores.
Cleaned up default avmfilesystem config to make it more explicit which stores are going to be displayed in CIFS/FTP filesystem views. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9483 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -138,8 +138,9 @@
|
||||
</filesystem>
|
||||
|
||||
<!-- AVM virtualization view of all stores/versions for WCM -->
|
||||
<!-- virtual view can be any of the following: normal, site, staging, author, preview -->
|
||||
<avmfilesystem name="AVM">
|
||||
<virtualView/>
|
||||
<virtualView stores="site,staging,author" />
|
||||
</avmfilesystem>
|
||||
|
||||
</filesystems>
|
||||
|
@@ -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
|
||||
*
|
||||
@@ -227,6 +238,9 @@ public class AVMContext extends AlfrescoContext
|
||||
case StoreType.Normal:
|
||||
showStore = showNormalStores();
|
||||
break;
|
||||
case StoreType.SiteStore:
|
||||
showStore = showSiteStores();
|
||||
break;
|
||||
case StoreType.WebAuthorMain:
|
||||
showStore = showAuthorStores();
|
||||
break;
|
||||
|
@@ -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,7 +2388,8 @@ 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);
|
||||
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user