Big honkin' merge from head. Sheesh!

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3617 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-08-27 01:01:30 +00:00
parent e2c66899cc
commit 8031cc6574
322 changed files with 20776 additions and 6550 deletions

View File

@@ -16,29 +16,37 @@
*/
package org.alfresco.service.cmr.model;
import org.alfresco.service.cmr.repository.NodeRef;
/**
* Common, checked exception thrown when an operation fails because
* of a name clash.
*
* @author Derek Hulley
*/
public class FileExistsException extends Exception
public class FileExistsException extends RuntimeException
{
private static final long serialVersionUID = -4133713912784624118L;
private FileInfo existing;
private NodeRef parentNodeRef;
private String name;
public FileExistsException(FileInfo existing)
public FileExistsException(NodeRef parentNodeRef, String name)
{
super("" +
(existing.isFolder() ? "Folder " : "File ") +
existing.getName() +
super("Existing file or folder " +
name +
" already exists");
this.existing = existing;
this.parentNodeRef = parentNodeRef;
this.name = name;
}
public FileInfo getExisting()
public NodeRef getParentNodeRef()
{
return existing;
return parentNodeRef;
}
public String getName()
{
return name;
}
}