mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD (V2.1 sourced fixes)
7121: Merged V2.1 to V2.2 7049: Fix for unreported duplicate component ID error (very rarely seen) in browse WCM sandbox JSP 7058: Fixes failure to rollback correctly on failed alfresco->alfresco deployment. 7074: Added filtering/access control checks to the AVM virtualization view. 7083: Added transaction handling to calls involving preview store 7084: xmlsec library update to 1.4.1 7092: Missing config update from the AVM filtering checkin. 7124: Merged V2.1 to V2.2 7091: Fix to several issues found with Regenerate Renditions wizard and FormsService 7125: Merged V2.1 to V2.2 7093: Fixes to workaround some deployment issues being experienced by a customer. 7094: Fix for previous build failure git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7373 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -56,6 +56,10 @@ public class AVMSearchContext extends SearchContext {
|
||||
|
||||
private String m_parentPath;
|
||||
|
||||
// Mark all files/folders as read-only
|
||||
|
||||
private boolean m_readOnly;
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
@@ -63,8 +67,9 @@ public class AVMSearchContext extends SearchContext {
|
||||
* @param attrib int
|
||||
* @param filter WildCard
|
||||
* @param parentPath String
|
||||
* @param readOnly boolean
|
||||
*/
|
||||
public AVMSearchContext( AVMNodeDescriptor[] fileList, int attrib, WildCard filter, String parentPath)
|
||||
public AVMSearchContext( AVMNodeDescriptor[] fileList, int attrib, WildCard filter, String parentPath, boolean readOnly)
|
||||
{
|
||||
m_attrib = attrib;
|
||||
m_filter = filter;
|
||||
@@ -73,6 +78,8 @@ public class AVMSearchContext extends SearchContext {
|
||||
m_parentPath = parentPath;
|
||||
if ( m_parentPath != null && m_parentPath.endsWith( FileName.DOS_SEPERATOR_STR) == false)
|
||||
m_parentPath = m_parentPath + FileName.DOS_SEPERATOR_STR;
|
||||
|
||||
m_readOnly = readOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,6 +184,12 @@ public class AVMSearchContext extends SearchContext {
|
||||
curFile.getName().equalsIgnoreCase( "Desktop.ini") ||
|
||||
curFile.getName().equalsIgnoreCase( "Thumbs.db"))
|
||||
attr += FileAttribute.Hidden;
|
||||
|
||||
if ( isReadOnly())
|
||||
attr += FileAttribute.ReadOnly;
|
||||
|
||||
if ( attr == 0)
|
||||
attr = FileAttribute.NTNormal;
|
||||
|
||||
info.setFileAttributes( attr);
|
||||
|
||||
@@ -293,4 +306,24 @@ public class AVMSearchContext extends SearchContext {
|
||||
m_fileIdx = curFileIdx;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if all files/folders returned by the search should be marked as read-only
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public final boolean isReadOnly()
|
||||
{
|
||||
return m_readOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set all files/folders returned by the search as read-only
|
||||
*
|
||||
* @param readOnly boolean
|
||||
*/
|
||||
public final void setReadOnly( boolean readOnly)
|
||||
{
|
||||
m_readOnly = readOnly;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user