DataObject.Factorypublic abstract class UniFileLoader extends MultiFileLoader
DataLoader.RecognizedFiles| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
PROP_EXTENSIONS |
name of property with extensions
|
PROP_ACTIONS, PROP_DISPLAY_NAME| Modifier | Constructor | Description |
|---|---|---|
protected |
UniFileLoader(java.lang.Class<? extends DataObject> representationClass) |
Deprecated.
Use UniFileLoader#UniFileLoader(String) instead.
|
protected |
UniFileLoader(java.lang.String representationClassName) |
Constructor.
|
| 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 MultiDataObject.Entry |
createPrimaryEntry(MultiDataObject obj,
org.openide.filesystems.FileObject primaryFile) |
Creates the right primary entry for a given primary file.
|
protected MultiDataObject.Entry |
createSecondaryEntry(MultiDataObject obj,
org.openide.filesystems.FileObject secondaryFile) |
Do not create a seconday entry.
|
protected org.openide.filesystems.FileObject |
findPrimaryFile(org.openide.filesystems.FileObject fo) |
Get the primary file.
|
ExtensionList |
getExtensions() |
Get the extension list for this data loader.
|
void |
readExternal(java.io.ObjectInput oi) |
Reads nothing from the stream.
|
void |
setExtensions(ExtensionList ext) |
Set the extension list for this data loader.
|
void |
writeExternal(java.io.ObjectOutput oo) |
Writes extensions to the stream.
|
actionsContext, clearSharedData, defaultActions, defaultDisplayName, findDataObject, findDataObject, getActions, getDisplayName, getLoader, getRepresentationClass, getRepresentationClassName, markFile, setActions, setDisplayNamehandleFindDataObjectpublic static final java.lang.String PROP_EXTENSIONS
@Deprecated protected UniFileLoader(java.lang.Class<? extends DataObject> representationClass)
representationClass - class that is produced by this loaderprotected UniFileLoader(java.lang.String representationClassName)
representationClassName - the fully qualified name of the
representation class.protected org.openide.filesystems.FileObject findPrimaryFile(org.openide.filesystems.FileObject fo)
findPrimaryFile in class MultiFileLoaderfo - the file to find the primary file fornull if its extension is not recognizedprotected abstract MultiDataObject createMultiObject(org.openide.filesystems.FileObject primaryFile) throws DataObjectExistsException, java.io.IOException
MultiFileLoaderMultiFileLoader.findPrimaryFile(org.openide.filesystems.FileObject).createMultiObject in class MultiFileLoaderprimaryFile - the primary fileDataObjectExistsException - if the primary file already has a data objectjava.io.IOExceptionprotected MultiDataObject.Entry createPrimaryEntry(MultiDataObject obj, org.openide.filesystems.FileObject primaryFile)
MultiFileLoadercreatePrimaryEntry in class MultiFileLoaderobj - requesting objectprimaryFile - primary file recognized by this loaderprotected MultiDataObject.Entry createSecondaryEntry(MultiDataObject obj, org.openide.filesystems.FileObject secondaryFile)
createSecondaryEntry in class MultiFileLoaderobj - ignoredsecondaryFile - ignoredjava.lang.UnsupportedOperationException - because this loader supports only a primary file objectpublic void setExtensions(ExtensionList ext)
ext - new list of extensionspublic ExtensionList getExtensions()
public void writeExternal(java.io.ObjectOutput oo)
throws java.io.IOException
writeExternal in class DataLoaderoo - ignoredjava.io.IOExceptionpublic void readExternal(java.io.ObjectInput oi)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in class DataLoaderoi - ignoredjava.io.IOExceptionjava.lang.ClassNotFoundExceptionBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.