au.com.prunge.jgenfile
Class PartialCopyException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--au.com.prunge.jgenfile.JGenFileException
                          |
                          +--au.com.prunge.jgenfile.PartialCopyException
All Implemented Interfaces:
Serializable

public class PartialCopyException
extends JGenFileException

An exception that occurs when a copy item operation attempts to copy a directory containing multiple files and only some of the files could be copied successfully.

It may be possible to get references to the items that could not be copied with the getNonCopiedItemReferences() method.

Version:
1.0
Author:
Peter Runge
See Also:
Serialized Form

Constructor Summary
PartialCopyException()
          Constructs a PartialCopyException.
PartialCopyException(Map nonCopiedItemReferenceToExceptionMap)
          Constructs a PartialCopyException with a mapping of relative item references which could not be copied as keys and PFileExceptions which caused each copy to fail as values in the map.
PartialCopyException(Set nonCopiedItemReferenceSet)
          Constructs a PartialCopyException with a set of item references for items that could not be copied.
PartialCopyException(String s)
          Constructs a PartialCopyException with a detail message.
PartialCopyException(String s, Map nonCopiedItemReferenceToExceptionMap)
          Constructs a PartialCopyException with a mapping of relative item references which could not be copied as keys and PFileExceptions which caused each copy to fail as values in the map.
PartialCopyException(String s, Set nonCopiedItemReferenceSet)
          Constructs a PartialCopyException with a set of item references for items that could not be copied and a detail message.
 
Method Summary
 Set getNonCopiedItemReferenceSet()
          Returns a set of references to items that could not be copied.
 Map getNonCopiedItemReferenceToExceptionMap()
          Returns a map of references to items that could not be copied as keys and exceptions as values for each item indicating why each copy failed.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PartialCopyException

public PartialCopyException()
Constructs a PartialCopyException.


PartialCopyException

public PartialCopyException(String s)
Constructs a PartialCopyException with a detail message.

Parameters:
s - the detail message.

PartialCopyException

public PartialCopyException(Set nonCopiedItemReferenceSet)
Constructs a PartialCopyException with a set of item references for items that could not be copied.

Parameters:
nonCopiedItemReferenceSet - a set of relative item references of items that could not be copied.
Throws:
NullPointerException - if nonCopiedItemReferenceList is null.

PartialCopyException

public PartialCopyException(Map nonCopiedItemReferenceToExceptionMap)
Constructs a PartialCopyException with a mapping of relative item references which could not be copied as keys and PFileExceptions which caused each copy to fail as values in the map.

Parameters:
nonCopiedItemReferenceToExceptionMap - a map of relative item references of items that could not be copied with values being the PFileExceptions that caused each copy to fail. Map keys are RelativeItemReference objects. Map values are PFileExceptions (or subclasses).
Throws:
NullPointerException - if nonCopiedItemReferenceToExceptionMap is null.

PartialCopyException

public PartialCopyException(String s,
                            Set nonCopiedItemReferenceSet)
Constructs a PartialCopyException with a set of item references for items that could not be copied and a detail message.

Parameters:
s - the detail message.
nonCopiedItemReferenceSet - a set of relative item references of items that could not be copied.
Throws:
NullPointerException - if nonCopiedItemReferenceList is null.

PartialCopyException

public PartialCopyException(String s,
                            Map nonCopiedItemReferenceToExceptionMap)
Constructs a PartialCopyException with a mapping of relative item references which could not be copied as keys and PFileExceptions which caused each copy to fail as values in the map. Also has a detail message.

Parameters:
s - the detail message.
nonCopiedItemReferenceToExceptionMap - a map of relative item references of items that could not be copied with values being the PFileExceptions that caused each copy to fail. Map keys are RelativeItemReference objects. Map values are PFileExceptions (or subclasses).
Throws:
NullPointerException - if nonCopiedItemReferenceToExceptionMap is null.
Method Detail

getNonCopiedItemReferenceSet

public Set getNonCopiedItemReferenceSet()
Returns a set of references to items that could not be copied. Returns null if the items that were not copied could not be determined.

Returns:
a set of RelativeItemReference objects, or null.

getNonCopiedItemReferenceToExceptionMap

public Map getNonCopiedItemReferenceToExceptionMap()
Returns a map of references to items that could not be copied as keys and exceptions as values for each item indicating why each copy failed. One or more exception values for each key in the map may be null if an exception that caused a copy failure cannot be determined.

Returns null if the items that were not copied could not be determined.

Returns:
a map of RelativeItemReference objects to PFileExceptions or subclasses of this exception.