Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.io.source
Class URLSource<P extends ImportProvider>

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.io.source.AbstractSource<P>
      extended by eu.esdihumboldt.hale.ui.io.source.AbstractProviderSource<P>
          extended by eu.esdihumboldt.hale.ui.io.source.URLSource<P>
Type Parameters:
P - the supported IOProvider type
All Implemented Interfaces:
ImportSource<P>

public class URLSource<P extends ImportProvider>
extends AbstractProviderSource<P>

URL import source

Since:
2.5
Author:
Simon Templer

Nested Class Summary
 
Nested classes/interfaces inherited from interface eu.esdihumboldt.hale.ui.io.ImportSource
ImportSource.SourceConfiguration<P extends ImportProvider>
 
Constructor Summary
URLSource()
           
 
Method Summary
 void createControls(org.eclipse.swt.widgets.Composite parent)
          Create the controls that enable the user to define the import source.
 void dispose()
          Dispose any resources when the source page is disposed.
protected  LocatableInputSupplier<? extends InputStream> getSource()
          Get the source to configure the import provider with.
protected  boolean isValidSource()
          Determines if the current page state will result in a valid source for the import provider.
 void onActivate()
          Method that is called when the source page is activated.
protected  void updateContentType()
          Update the content type.

The default implementation only calls AbstractProviderSource.updateProvider().
protected  void updateState(boolean updateContentType)
          Update the page state.
 
Methods inherited from class eu.esdihumboldt.hale.ui.io.source.AbstractProviderSource
createProviders, getProviders, onProviderSelectionChanged, updateConfiguration, updateProvider
 
Methods inherited from class eu.esdihumboldt.hale.ui.io.source.AbstractSource
getConfiguration, getPage, setConfiguration, setPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLSource

public URLSource()
Method Detail

createControls

public void createControls(org.eclipse.swt.widgets.Composite parent)
Description copied from interface: ImportSource
Create the controls that enable the user to define the import source. ImportSource.setPage(WizardPage) and ImportSource.setConfiguration(SourceConfiguration) must have been called before calling this method.

Parameters:
parent - the parent composite, implementors may assign a custom layout to this composite
See Also:
ImportSource.createControls(Composite)

updateContentType

protected void updateContentType()
Description copied from class: AbstractProviderSource
Update the content type.

The default implementation only calls AbstractProviderSource.updateProvider(). Subclasses may add logic to change the content type in the source configuration.

Overrides:
updateContentType in class AbstractProviderSource<P extends ImportProvider>
See Also:
AbstractProviderSource.updateContentType()

updateState

protected void updateState(boolean updateContentType)
Description copied from class: AbstractProviderSource
Update the page state. This includes setting a provider factory on the wizard if applicable and setting the complete state of the page.

This should be called in ImportSource.createControls(Composite) to initialize the page state.

Overrides:
updateState in class AbstractProviderSource<P extends ImportProvider>
Parameters:
updateContentType - if true the content type and the supported providers will be updated before updating the page state
See Also:
AbstractProviderSource.updateState(boolean)

isValidSource

protected boolean isValidSource()
Description copied from class: AbstractProviderSource
Determines if the current page state will result in a valid source for the import provider. Used among others to determine the complete state of the wizard page.

Specified by:
isValidSource in class AbstractProviderSource<P extends ImportProvider>
Returns:
if the source is valid
See Also:
AbstractProviderSource.isValidSource()

getSource

protected LocatableInputSupplier<? extends InputStream> getSource()
Description copied from class: AbstractProviderSource
Get the source to configure the import provider with.

Specified by:
getSource in class AbstractProviderSource<P extends ImportProvider>
Returns:
the input supplier as source for the import provider or null if no valid source can be created
See Also:
AbstractProviderSource.getSource()

dispose

public void dispose()
Description copied from interface: ImportSource
Dispose any resources when the source page is disposed.

Specified by:
dispose in interface ImportSource<P extends ImportProvider>
Overrides:
dispose in class AbstractSource<P extends ImportProvider>
See Also:
AbstractSource.dispose()

onActivate

public void onActivate()
Description copied from class: AbstractSource
Method that is called when the source page is activated.

The default implementation does nothing, override to to react on activation of the source page.

Specified by:
onActivate in interface ImportSource<P extends ImportProvider>
Overrides:
onActivate in class AbstractSource<P extends ImportProvider>
See Also:
AbstractSource.onActivate()

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d