org.eclipse.emf.emfstore.internal.client.ui.dialogs.admin.acimport
Class ImportSource

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.ui.dialogs.admin.acimport.ImportSource
All Implemented Interfaces:
org.eclipse.jface.viewers.IContentProvider, org.eclipse.jface.viewers.IStructuredContentProvider, org.eclipse.jface.viewers.ITreeContentProvider
Direct Known Subclasses:
CSVImportSource, LdapImportSource

public abstract class ImportSource
extends Object
implements org.eclipse.jface.viewers.ITreeContentProvider

Author:
deser, karakoc

Constructor Summary
ImportSource()
           
 
Method Summary
abstract  Object[] getChildren(Object obj)
           
abstract  Object[] getElements(Object obj)
           
abstract  String getLabel()
           
abstract  String getMessage()
           
 Object getParent(Object obj)
           
 boolean hasChildren(Object arg0)
           
abstract  boolean init(org.eclipse.swt.widgets.Shell shell)
           
 void setOptions(Properties properties)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.viewers.IContentProvider
dispose, inputChanged
 

Constructor Detail

ImportSource

public ImportSource()
Method Detail

getChildren

public abstract Object[] getChildren(Object obj)
Specified by:
getChildren in interface org.eclipse.jface.viewers.ITreeContentProvider
Parameters:
obj - the object to get the children from.
Returns:
the children of the given object.

getParent

public Object getParent(Object obj)
Specified by:
getParent in interface org.eclipse.jface.viewers.ITreeContentProvider
Parameters:
obj - Object from which the parent object will be returned
Returns:
the parent object of the given object
See Also:
getParent(java.lang.Object)

hasChildren

public boolean hasChildren(Object arg0)
Specified by:
hasChildren in interface org.eclipse.jface.viewers.ITreeContentProvider
Parameters:
arg0 - the object to get the information, if it has children.
Returns:
whether the given object has children or not.

getElements

public abstract Object[] getElements(Object obj)
Specified by:
getElements in interface org.eclipse.jface.viewers.IStructuredContentProvider
Specified by:
getElements in interface org.eclipse.jface.viewers.ITreeContentProvider
Parameters:
obj - The object to get the root elements from.
Returns:
The root elements of the given object.

setOptions

public void setOptions(Properties properties)
Parameters:
properties - the properties of the import source

getLabel

public abstract String getLabel()
Returns:
a small label for the import source.

init

public abstract boolean init(org.eclipse.swt.widgets.Shell shell)
Parameters:
shell - Shell for UI actions, if needed. This parameter can be ignored, if there is no use for it.
Returns:
whether the initialization of the source worked or not.

getMessage

public abstract String getMessage()
Returns:
Returns a little description of the current ImportSource, e.g. the server String of an LDAP server or the file of an CSV import.


Copyright © 2015. All Rights Reserved.