public abstract class MultiFileLoader extends DataLoader
MultiDataObject
. It provides
support for recognition of a composite data object and registering
entries into it.DataLoader.RecognizedFiles
PROP_ACTIONS, PROP_DISPLAY_NAME
Modifier | Constructor and Description |
---|---|
protected |
MultiFileLoader(Class<? extends DataObject> representationClass)
Deprecated.
Use MultiFileLoader#MultiFileLoader(String) instead.
|
protected |
MultiFileLoader(String representationClassName)
Creates new multi file loader.
|
Modifier and Type | Method and Description |
---|---|
protected abstract MultiDataObject |
createMultiObject(FileObject primaryFile)
Creates the right data object for a given primary file.
|
protected abstract MultiDataObject.Entry |
createPrimaryEntry(MultiDataObject obj,
FileObject primaryFile)
Creates the right primary entry for a given primary file.
|
protected abstract MultiDataObject.Entry |
createSecondaryEntry(MultiDataObject obj,
FileObject secondaryFile)
Creates a new secondary entry for a given file.
|
protected abstract FileObject |
findPrimaryFile(FileObject fo)
For a given file finds the primary file.
|
protected DataObject |
handleFindDataObject(FileObject fo,
DataLoader.RecognizedFiles recognized)
Find a data object appropriate to the given file object (as implemented in subclasses).
|
actionsContext, clearSharedData, defaultActions, defaultDisplayName, findDataObject, findDataObject, getActions, getDisplayName, getLoader, getRepresentationClass, getRepresentationClassName, markFile, readExternal, setActions, setDisplayName, writeExternal
addNotify, addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, initialize, putProperty, putProperty, removeNotify, removePropertyChangeListener, reset, writeReplace
@Deprecated protected MultiFileLoader(Class<? extends DataObject> representationClass)
representationClass
- the representation classprotected MultiFileLoader(String representationClassName)
representationClassName
- the fully qualified name of the
representation class.protected final DataObject handleFindDataObject(FileObject fo, DataLoader.RecognizedFiles recognized) throws IOException
DataLoader
handleFindDataObject
in class DataLoader
fo
- file object to recognizerecognized
- recognized file buffernull
DataObjectExistsException
- as in #findDataObject
IOException
- as in #findDataObject
DataLoader.findDataObject(org.openide.filesystems.FileObject, java.util.Set<? super org.openide.filesystems.FileObject>)
protected abstract FileObject findPrimaryFile(FileObject fo)
fo
- the (secondary) filenull
if the file is not
recognized by this loaderprotected abstract MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException
MultiFileLoader.findPrimaryFile(org.openide.filesystems.FileObject)
.primaryFile
- the primary fileDataObjectExistsException
- if the primary file already has a data objectIOException
protected abstract MultiDataObject.Entry createPrimaryEntry(MultiDataObject obj, FileObject primaryFile)
obj
- requesting objectprimaryFile
- primary file recognized by this loaderprotected abstract MultiDataObject.Entry createSecondaryEntry(MultiDataObject obj, FileObject secondaryFile)
obj
- requesting objectsecondaryFile
- a secondary file