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:
Mark Rogers
2011-10-19 15:55:01 +00:00
parent 3c079c5983
commit 912e873620
13 changed files with 359 additions and 173 deletions

View File

@@ -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();