de.scheisseichfindemalkeinen.hoster
Interface IHosterURLAdder


public interface IHosterURLAdder

Interface which a host-classes can implement, but it is not needed. But when a host-class has implemented this interface, then the isFromThisHoster-Method of this IHoster is called first, and if it is true returned then the isFromThisHoster-Method of this interface will also called. This interface can be used to add additional URLs to the array. An example for this could be, to download all pictures from a thread in forums which has more than one pages. The other difference to IHoster is, that the URL-Object is the argument, not only the url. And so the host-class could now also change the target-path at this point. When additional URLs are added, then it could be required to not accept the Container-URL, so when the isFromThisHoster-Argument is set to false, then the additional URLs are added, but the Container-URL is not accepted. However the isFromThisHoster-Method from IHoster-Interface needs to return true, otherwise this would not work.


Method Summary
 java.util.Vector<URL> isFromThisHoster(URL url, BooleanWrapper isFromThisHoster, ProgressObserver progress)
          The host-class can modifie some data of the url-Object and can return array with URLs to be added to the URL-array which contains the actual url-Object.
 

Method Detail

isFromThisHoster

java.util.Vector<URL> isFromThisHoster(URL url,
                                       BooleanWrapper isFromThisHoster,
                                       ProgressObserver progress)
                                       throws java.lang.Exception
The host-class can modifie some data of the url-Object and can return array with URLs to be added to the URL-array which contains the actual url-Object. When a host-class only wants to modifie the data of the url-object then null should be returned.

Parameters:
url - URL-Object
isFromThisHoster - Flag to set if url given is also accepted or not
progress - ProgressObserver
Returns:
Array with additional urls
Throws:
java.lang.Exception