mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-10902 : No friendly notification occurs when Editor or Collaborator tries to delete content
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31363 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -37,7 +37,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
*
|
||||
* @author gkspencer
|
||||
*/
|
||||
public class CacheLookupSearchContext extends ContentSearchContext {
|
||||
public class CacheLookupSearchContext extends DotDotContentSearchContext {
|
||||
|
||||
// Debug logging
|
||||
|
||||
@@ -47,11 +47,6 @@ public class CacheLookupSearchContext extends ContentSearchContext {
|
||||
|
||||
private FileStateCache m_stateCache;
|
||||
|
||||
// File information for the '.' and '..' pseduo entries, returned during a wildcard search
|
||||
|
||||
private FileInfo m_dotInfo;
|
||||
private FileInfo m_dotDotInfo;
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
@@ -125,77 +120,7 @@ public class CacheLookupSearchContext extends ContentSearchContext {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the '.' and '..' pseudo file entries are available
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean hasDotFiles() {
|
||||
return (m_dotInfo != null && m_dotDotInfo != null) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the '.' pseudo file entry details
|
||||
*
|
||||
* @param finfo FileInfo
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean getDotInfo(FileInfo finfo) {
|
||||
|
||||
// Check if the '.' file information is valid
|
||||
|
||||
if ( m_dotInfo != null) {
|
||||
finfo.copyFrom( m_dotInfo);
|
||||
return true;
|
||||
}
|
||||
|
||||
// File information not valid
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the '..' pseudo file entry details
|
||||
*
|
||||
* @param finfo FileInfo
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean getDotDotInfo(FileInfo finfo) {
|
||||
|
||||
// Check if the '..' file information is valid
|
||||
|
||||
if ( m_dotDotInfo != null) {
|
||||
finfo.copyFrom( m_dotDotInfo);
|
||||
return true;
|
||||
}
|
||||
|
||||
// File information not valid
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the '.' pseudo file entry details
|
||||
*
|
||||
* @param finfo FileInfo
|
||||
*/
|
||||
protected void setDotInfo(FileInfo finfo) {
|
||||
m_dotInfo = finfo;
|
||||
if ( m_dotInfo != null)
|
||||
m_dotInfo.setFileName( ".");
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the '..' pseudo file entry details
|
||||
*
|
||||
* @param finfo FileInfo
|
||||
*/
|
||||
protected void setDotDotInfo(FileInfo finfo) {
|
||||
m_dotDotInfo = finfo;
|
||||
if ( m_dotDotInfo != null)
|
||||
m_dotDotInfo.setFileName( "..");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the search as a string
|
||||
*
|
||||
@@ -217,10 +142,11 @@ public class CacheLookupSearchContext extends ContentSearchContext {
|
||||
sb.append(",cache=");
|
||||
sb.append(m_stateCache);
|
||||
|
||||
if ( m_dotInfo != null)
|
||||
sb.append(",Dot");
|
||||
if ( m_dotDotInfo != null)
|
||||
sb.append(",DotDot");
|
||||
// if ( super.getDotInfo(finfo)
|
||||
// != null)
|
||||
// sb.append(",Dot");
|
||||
// if ( m_dotDotInfo != null)
|
||||
// sb.append(",DotDot");
|
||||
sb.append("]");
|
||||
|
||||
return sb.toString();
|
||||
|
Reference in New Issue
Block a user