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:
@@ -136,12 +136,13 @@
|
|||||||
</accessControl>
|
</accessControl>
|
||||||
-->
|
-->
|
||||||
</filesystem>
|
</filesystem>
|
||||||
|
|
||||||
<!-- AVM virtualization view of all stores/versions for WCM -->
|
<!-- 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">
|
<avmfilesystem name="AVM">
|
||||||
<virtualView/>
|
<virtualView stores="site,staging,author" />
|
||||||
</avmfilesystem>
|
</avmfilesystem>
|
||||||
|
|
||||||
</filesystems>
|
</filesystems>
|
||||||
</config>
|
</config>
|
||||||
|
|
||||||
|
@@ -61,9 +61,10 @@ public class AVMContext extends AlfrescoContext
|
|||||||
// Store types to show in the virtualization view
|
// Store types to show in the virtualization view
|
||||||
|
|
||||||
public static final int ShowNormalStores = 0x0001;
|
public static final int ShowNormalStores = 0x0001;
|
||||||
public static final int ShowStagingStores = 0x0002;
|
public static final int ShowSiteStores = 0x0002;
|
||||||
public static final int ShowAuthorStores = 0x0004;
|
public static final int ShowStagingStores = 0x0004;
|
||||||
public static final int ShowPreviewStores = 0x0008;
|
public static final int ShowAuthorStores = 0x0008;
|
||||||
|
public static final int ShowPreviewStores = 0x0010;
|
||||||
|
|
||||||
// Store, root path and version
|
// Store, root path and version
|
||||||
|
|
||||||
@@ -182,6 +183,16 @@ public class AVMContext extends AlfrescoContext
|
|||||||
return (m_showOptions & ShowNormalStores) != 0 ? true : false;
|
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
|
* Check if author stores should be shown in the virtualization view
|
||||||
*
|
*
|
||||||
@@ -222,21 +233,24 @@ public class AVMContext extends AlfrescoContext
|
|||||||
{
|
{
|
||||||
boolean showStore = false;
|
boolean showStore = false;
|
||||||
|
|
||||||
switch ( storeType)
|
switch (storeType)
|
||||||
{
|
{
|
||||||
case StoreType.Normal:
|
case StoreType.Normal:
|
||||||
showStore = showNormalStores();
|
showStore = showNormalStores();
|
||||||
break;
|
break;
|
||||||
case StoreType.WebAuthorMain:
|
case StoreType.SiteStore:
|
||||||
showStore = showAuthorStores();
|
showStore = showSiteStores();
|
||||||
break;
|
break;
|
||||||
case StoreType.WebStagingMain:
|
case StoreType.WebAuthorMain:
|
||||||
showStore = showStagingStores();
|
showStore = showAuthorStores();
|
||||||
break;
|
break;
|
||||||
case StoreType.WebAuthorPreview:
|
case StoreType.WebStagingMain:
|
||||||
case StoreType.WebStagingPreview:
|
showStore = showStagingStores();
|
||||||
showStore = showPreviewStores();
|
break;
|
||||||
break;
|
case StoreType.WebAuthorPreview:
|
||||||
|
case StoreType.WebStagingPreview:
|
||||||
|
showStore = showPreviewStores();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return showStore;
|
return showStore;
|
||||||
|
@@ -340,6 +340,9 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface
|
|||||||
if ( optList.containsString("normal"))
|
if ( optList.containsString("normal"))
|
||||||
showOptions += AVMContext.ShowNormalStores;
|
showOptions += AVMContext.ShowNormalStores;
|
||||||
|
|
||||||
|
if ( optList.containsString("site"))
|
||||||
|
showOptions += AVMContext.ShowSiteStores;
|
||||||
|
|
||||||
if ( optList.containsString("author"))
|
if ( optList.containsString("author"))
|
||||||
showOptions += AVMContext.ShowAuthorStores;
|
showOptions += AVMContext.ShowAuthorStores;
|
||||||
|
|
||||||
@@ -353,8 +356,9 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface
|
|||||||
{
|
{
|
||||||
// Old style show options
|
// Old style show options
|
||||||
|
|
||||||
showOptions = AVMContext.ShowNormalStores + AVMContext.ShowAuthorStores +
|
showOptions = AVMContext.ShowNormalStores + AVMContext.ShowSiteStores +
|
||||||
AVMContext.ShowPreviewStores + AVMContext.ShowStagingStores;
|
AVMContext.ShowAuthorStores + AVMContext.ShowPreviewStores +
|
||||||
|
AVMContext.ShowStagingStores;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the context
|
// Create the context
|
||||||
@@ -2365,6 +2369,12 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface
|
|||||||
|
|
||||||
webProjName = storeName.substring( 0, storeName.length() - "--preview".length());
|
webProjName = storeName.substring( 0, storeName.length() - "--preview".length());
|
||||||
}
|
}
|
||||||
|
else if ( props.containsKey(QName.createQName(null, ".sitestore")))
|
||||||
|
{
|
||||||
|
// Site data store type
|
||||||
|
|
||||||
|
storeType = StoreType.SiteStore;
|
||||||
|
}
|
||||||
|
|
||||||
// DEBUG
|
// DEBUG
|
||||||
|
|
||||||
@@ -2378,12 +2388,13 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface
|
|||||||
// Create the pseudo folder for the store
|
// Create the pseudo folder for the store
|
||||||
|
|
||||||
StorePseudoFile storeFolder = new StorePseudoFile( storeDesc, FileName.DOS_SEPERATOR_STR + storeName, storeType);
|
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.setWebProject( webProjName);
|
||||||
storeFolder.setUserName( userName);
|
storeFolder.setUserName( userName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the store pseudo folder to the root folder file list
|
// Add the store pseudo folder to the root folder file list
|
||||||
|
|
||||||
fstate.addPseudoFile( storeFolder);
|
fstate.addPseudoFile( storeFolder);
|
||||||
@@ -2903,7 +2914,7 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface
|
|||||||
filterList.addFile( storeFolder);
|
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
|
// 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;
|
public static final int Normal = 0;
|
||||||
|
|
||||||
|
// Site data store types
|
||||||
|
|
||||||
|
public static final int SiteStore = 1;
|
||||||
|
|
||||||
// Web project store types
|
// Web project store types
|
||||||
|
|
||||||
public static final int WebAuthorMain = 1;
|
public static final int WebAuthorMain = 2;
|
||||||
public static final int WebAuthorPreview = 2;
|
public static final int WebAuthorPreview = 3;
|
||||||
public static final int WebStagingPreview = 3;
|
public static final int WebStagingPreview = 4;
|
||||||
public static final int WebStagingMain = 4;
|
public static final int WebStagingMain = 5;
|
||||||
|
|
||||||
// Store type strings
|
// 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
|
* Return a store type as a string
|
||||||
|
Reference in New Issue
Block a user