com.sap.netweaver.coll.attachment

Class AttachmentCopyUtility

java.lang.Object
  extended by com.sap.netweaver.coll.attachment.AttachmentCopyUtility

public final class AttachmentCopyUtility
extends Object

encapsulates the copy-functionality of the IResource and resolves possible ID-clashes in the target folder. It uses the IDResolver to take care of name clashes.


Constructor Summary
AttachmentCopyUtility(IResource source, ICollection target)
           
AttachmentCopyUtility(IResource source, com.sapportals.wcm.util.uri.RID target)
           
 
Method Summary
 IResource copy(boolean ignorePropertyFailures)
          copies the resource to the new target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentCopyUtility

public AttachmentCopyUtility(IResource source,
                             com.sapportals.wcm.util.uri.RID target)
                      throws com.sapportals.wcm.WcmException
Parameters:
source - the resource to be copied, must not be null
target - the collection to copy the resource to, must not be null If the target does not point to a valid ICollection, a ClassCastException will be thrown.
Throws:
com.sapportals.wcm.WcmException

AttachmentCopyUtility

public AttachmentCopyUtility(IResource source,
                             ICollection target)
                      throws com.sapportals.wcm.WcmException
Parameters:
source - the resource to be copied, must not be null
target - the collection to copy the resource to, must not be null
Throws:
com.sapportals.wcm.WcmException
Method Detail

copy

public IResource copy(boolean ignorePropertyFailures)
               throws com.sapportals.wcm.WcmException
copies the resource to the new target. If the flag's value is true, the copy will succeed, even if not all properties could be copied as well. If the flag's value is false, the copy will only be completed, if all properties could be copied with the resource.

Parameters:
ignorePropertyFailures - flag to allow copying even if not all properties could be copied
Returns:
Throws:
com.sapportals.wcm.WcmException


Copyright 2011 SAP AG Complete Copyright Notice