Externalizable
, Serializable
, DataObject.Factory
UniFileLoader
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 | 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 | Description |
---|---|---|
protected abstract MultiDataObject |
createMultiObject(org.openide.filesystems.FileObject primaryFile) |
Creates the right data object for a given primary file.
|
protected abstract MultiDataObject.Entry |
createPrimaryEntry(MultiDataObject obj,
org.openide.filesystems.FileObject primaryFile) |
Creates the right primary entry for a given primary file.
|
protected abstract MultiDataObject.Entry |
createSecondaryEntry(MultiDataObject obj,
org.openide.filesystems.FileObject secondaryFile) |
Creates a new secondary entry for a given file.
|
protected abstract org.openide.filesystems.FileObject |
findPrimaryFile(org.openide.filesystems.FileObject fo) |
For a given file finds the primary file.
|
protected DataObject |
handleFindDataObject(org.openide.filesystems.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
@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(org.openide.filesystems.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 org.openide.filesystems.FileObject findPrimaryFile(org.openide.filesystems.FileObject fo)
fo
- the (secondary) filenull
if the file is not
recognized by this loaderprotected abstract MultiDataObject createMultiObject(org.openide.filesystems.FileObject primaryFile) throws DataObjectExistsException, IOException
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, org.openide.filesystems.FileObject primaryFile)
obj
- requesting objectprimaryFile
- primary file recognized by this loaderprotected abstract MultiDataObject.Entry createSecondaryEntry(MultiDataObject obj, org.openide.filesystems.FileObject secondaryFile)
obj
- requesting objectsecondaryFile
- a secondary fileBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.