Merged V4.0-BUG-FIX to HEAD

33935: ALF-12854: SOLR - requires more detailed tracking information
   - Part 1: info reported for the SOLR SUMMARY action
   33936: ALF-11693: Treat logging.properties the same way as log4j.properties and excluded it from the core .jar
   33945: ALF-12867: RIP jmx-dumper.jar
   33946: Fix minor issue introduced in r33920
   33947: IT-6847 "Error displays on recent 4.0 TS upgrade while navigate to a document details page"
   - errors spotted on folder details & in document library list also resolved by this fix
   33951: ALF-12867: Fixed typo
   33955: Some unit tests and examples on how to implement file wiping or shredding
    - One API change: On EagerContentStoreCleaner, the following is now protected:
         protected boolean deleteFromStore(String contentUrl, ContentStore store)
    - Examples in unit test ContentStoreCleanerTest: testForcedImmediateShredding and testShreddingCleanup
   33962: RIP hyperic plugin
   33965: ALF-12697: Asynchronously get RSS items for dashlets on page load
   33969: Fix for ALF-12307 Solr backup fills the disk
   - number to Keep can be set by property/subsystem/Share admin
   - set default backup localtion
   33970: Fix for ALF-12854 SOLR - requires more detailed tracking information
   Part 2: basic stats added to JMX and improved statistical moment calculation
   33984: Update 4.0.1 installers to use Tomcat 6.0.35
   - Remembered to set useHttpOnly on <Context>
   - Also commented out JreMemoryLeakPreventionListener
   33988: ALF-12717	CIFS: Unfriendly message occurs when a user with consumer/contributor role tries to rename space.
   33997: ALF-12697: Remove async WebScript from dashlet family
   33999: Fix for ALF-12854 SOLR - requires more detailed tracking information
   - Final part - Expose via share admin
   34005: Fix for ALF-12708
   34007: Merged V3.4-BUG-FIX (3.4.9) to 3.4-BUG-FIX (4.0.1)
      34006: Merged V3.4 (3.4.8) to V3.4-BUG-FIX (3.4.9)
         34002: ALF-12898: MMT does not calculate the current version number correctly and does not report errors
            - ModuleManagementTool was constructing the wrong current war file version number.
              The minor and revision values were the wrong way around. 3.4.8 became 3.8.4
            - Modified unit test to use the actual version number in the test war 4.1.0 rather than 4.0.1
            - Modified the ModuleManagementTool so that problems would be reported to the user even if they did not have -verbose set
   34016: Update version.revision for 4.0.1
   34022: Merged V3.4-BUG-FIX to V4.0-BUG-FIX
      33952: ALF-5680: It is possible to cut/paste a locked file   
      34003: Merged DEV to V3.4-BUG-FIX
         34001: ALF-12709: CLONE - Run action Wizard. Can't run action.
            Fixed regression connected with separator of AVM path in .NodeRef. id that has been changed from .;. to .|.
   34023: Merged V3.4-BUG-FIX to V4.0-BUG-FIX (RECORD ONLY)
      33912: ALF-9899: Merged HEAD to V3.4-BUG-FIX (PARTIAL)
         31912: Merged DEV to HEAD
            31823: TransactionalCache provides REPEATABLE READ
                   - Values found in shared cache are placed into transactional cache
                   - Previously, values could keep changing until first write (READ COMMITTED)
                     but now the first read sets the value until it is changed by the current
                     transaction   
      33981: Updated version.revision for 3.4.9
      33985: ALF-12364: Merged V4.0-BUG-FIX to V3.4-BUG-FIX
         33984: Update 3.4.9 installers to use Tomcat 6.0.35
            - Remembered to set useHttpOnly on <Context>
            - Also commented out JreMemoryLeakPreventionListener


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@34024 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2012-02-18 12:12:01 +00:00
parent 42f24b1c6a
commit 6f7095f450
17 changed files with 511 additions and 46 deletions

View File

@@ -633,6 +633,7 @@ public class CifsHelper
/**
* Move a node
* @deprecated - not used by live code - exception handling is too severe
*
* @param nodeToMoveRef Node to be moved
* @param newParentNodeRef New parent folder node
@@ -661,6 +662,7 @@ public class CifsHelper
/**
* Rename a node
* @deprecated - not used by live code - exception handling is too severe
*
* @param nodeToRenameRef Node to be renamed
* @param newName New name for the node

View File

@@ -49,6 +49,7 @@ import org.alfresco.jlan.server.filesys.DiskFullException;
import org.alfresco.jlan.server.filesys.DiskInterface;
import org.alfresco.jlan.server.filesys.DiskSizeInterface;
import org.alfresco.jlan.server.filesys.FileAttribute;
import org.alfresco.jlan.server.filesys.FileExistsException;
import org.alfresco.jlan.server.filesys.FileInfo;
import org.alfresco.jlan.server.filesys.FileName;
import org.alfresco.jlan.server.filesys.FileOpenParams;
@@ -56,6 +57,7 @@ import org.alfresco.jlan.server.filesys.FileStatus;
import org.alfresco.jlan.server.filesys.IOControlNotImplementedException;
import org.alfresco.jlan.server.filesys.IOCtlInterface;
import org.alfresco.jlan.server.filesys.NetworkFile;
import org.alfresco.jlan.server.filesys.PermissionDeniedException;
import org.alfresco.jlan.server.filesys.SearchContext;
import org.alfresco.jlan.server.filesys.SrvDiskInfo;
import org.alfresco.jlan.server.filesys.TreeConnection;
@@ -1338,11 +1340,12 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
// Rename or move the file/folder to another folder
if (sameFolder == true)
{
getCifsHelper().rename(nodeToMoveRef, name);
fileFolderService.rename(nodeToMoveRef, name);
}
else
{
getCifsHelper().move(nodeToMoveRef, sourceFolderRef, targetFolderRef, name);
fileFolderService.moveFrom(nodeToMoveRef, sourceFolderRef, targetFolderRef, name);
}
if (logger.isDebugEnabled())
@@ -1354,10 +1357,7 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
else
{
// Rename a file within the same folder
//
// Check if the target file already exists
final int newExists = fileExists(session, tree, newName);
if (logger.isDebugEnabled())
{
logger.debug(
@@ -1369,40 +1369,55 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
" Node: " + nodeToMoveRef + "\n" +
" Aspects: " + nodeService.getAspects(nodeToMoveRef));
}
getCifsHelper().rename(nodeToMoveRef, name);
fileFolderService.rename(nodeToMoveRef, name);
}
}
catch (org.alfresco.service.cmr.model.FileNotFoundException e)
{
if (logger.isDebugEnabled())
{
logger.debug("Rename file - about to throw file not exists exception file:" + oldName, e);
}
throw new java.io.FileNotFoundException("renameFile: file not found file: + oldName");
}
catch (org.alfresco.service.cmr.model.FileExistsException e)
{
if (logger.isDebugEnabled())
{
logger.debug("Rename file - about to throw file exists exception", e);
}
throw new org.alfresco.jlan.server.filesys.FileExistsException(newName);
}
catch (org.alfresco.repo.security.permissions.AccessDeniedException ex)
{
if (logger.isDebugEnabled())
{
logger.debug("Rename file - access denied, " + oldName);
logger.debug("Rename file - about to throw permissions denied exception", ex);
}
// Convert to a filesystem access denied status
throw new AccessDeniedException("Rename file " + oldName);
throw new org.alfresco.jlan.server.filesys.PermissionDeniedException("renameFile: No permissions to rename file:" + oldName);
}
catch (NodeLockedException ex)
{
if (logger.isDebugEnabled())
{
logger.debug("Rename file", ex);
logger.debug("Rename file - about to throw access denied exception", ex);
}
// Convert to an filesystem access denied exception
throw new AccessDeniedException("Node locked " + oldName);
}
throw new AccessDeniedException("renameFile: Access Denied - Node locked file:" + oldName);
}
catch (AlfrescoRuntimeException ex)
{
if (logger.isDebugEnabled())
{
logger.debug("Rename file", ex);
logger.debug("Rename file about to throw access denied exception", ex);
}
throw new AlfrescoRuntimeException("renameFile failed: \n" +
" Old name: " + oldName + "\n" +
" New name: " + newName + "\n" +
ex);
// Convert to a general I/O exception
throw new AccessDeniedException("Rename file " + oldName);
}
}
}
/**