Package com.pnfsoftware.jeb.core.units
Class AbstractBinaryUnit
java.lang.Object
com.pnfsoftware.jeb.core.events.JebEventSource
com.pnfsoftware.jeb.core.units.AbstractUnit
com.pnfsoftware.jeb.core.units.AbstractBinaryUnit
- All Implemented Interfaces:
IUnitCreator,IUserDataSupport,IBinaryUnit,IUnit,IEventSource
- Direct Known Subclasses:
AbstractCodeObjectUnit,AbstractInteractiveBinaryUnit,UnknownBinaryUnit
This extension class provides basic implementations for methods specific to binary units.
Implementors must implement their own constructor; the default constructor is used for deserialization only. Example of a typical binary unit constructor:
public DerivedClass(String name, IInput input, IUnitProcessor unitProcessor, IUnitCreator parent,
IPropertyDefinitionManager pdm) {
super(..., input, ..., name, unitProcessor, parent, pdm);
...
}
-
Field Summary
Fields inherited from class com.pnfsoftware.jeb.core.events.JebEventSource
onEventCallCount -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate a binary unit using the parent unit's processor and property definitions.protectedAbstractBinaryUnit(String mimeType, IInput input, String formatType, String name, IUnitProcessor unitProcessor, IUnitCreator parent, IPropertyDefinitionManager pdm) Create a binary unit. -
Method Summary
Modifier and TypeMethodDescriptiongetInput()The default implementation returns the input provided to the constructor.The default implementation returns the MIME type provided to the constructor.voidSet the binary input.voidsetMimeType(String mimeType) Set the MIME type.Methods inherited from class com.pnfsoftware.jeb.core.units.AbstractUnit
addChild, addChild, addChild, addNotification, canBePersisted, clearAllData, dispose, finalize, generateQuickState, getAllData, getChildren, getContributions, getCreationTimestamp, getData, getDescription, getFormatter, getFormatType, getIconData, getInterpreters, getLock, getName, getNotes, getNotificationManager, getParent, getPropertyDefinitionManager, getPropertyManager, getRealName, getStatus, getUid, getUnitProcessor, hasChildren, initializePropertyObjects, internalSwapChildren, isDeserialized, isDisposed, isProcessed, isStale, isTransientChild, logError, logException, logInfo, logTrace, logWarn, onPropertyChange, postDeserialization, process, processInternal, removeChild, removeChild, setChild, setChild, setData, setName, setNotes, setParent, setProcessed, setProcessed, setRealName, setStatus, setStatus, setUnitProcessor, toStringMethods inherited from class com.pnfsoftware.jeb.core.events.JebEventSource
addListener, countListeners, getListeners, getParentSource, insertListener, notifyListeners, notifyListeners, notifyListeners, removeListener, setParentSourceMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.pnfsoftware.jeb.util.events.IEventSource
addListener, countListeners, getListeners, getParentSource, insertListener, notifyListeners, removeListener, setParentSourceMethods inherited from interface com.pnfsoftware.jeb.core.units.IUnit
addChild, addChild, canBePersisted, dispose, execprvfunc, generateQuickState, getChildren, getContributions, getCreationTimestamp, getDescription, getExtraInputs, getFormatter, getFormatType, getIconData, getInterpreters, getLock, getName, getNotes, getNotificationManager, getParent, getParentArtifact, getParentProject, getPropertyDefinitionManager, getPropertyManager, getRealName, getStatus, getUid, getUnitProcessor, initializePropertyObjects, isDisposed, isProcessed, isStale, isTransientChild, notifyGenericChange, postDeserialization, process, removeChild, setName, setNotes, setParent, setRealName, setUnitProcessorMethods inherited from interface com.pnfsoftware.jeb.core.IUserDataSupport
clearAllData, getAllData, getData, setData
-
Constructor Details
-
AbstractBinaryUnit
protected AbstractBinaryUnit(String mimeType, IInput input, String formatType, String name, IUnit parent) Create a binary unit using the parent unit's processor and property definitions.- Parameters:
mimeType- MIME type; defaults toapplication/octet-streamif null or emptyinput- mandatory binary inputformatType- unit format typename- unit nameparent- parent unit
-
AbstractBinaryUnit
protected AbstractBinaryUnit(String mimeType, IInput input, String formatType, String name, IUnitProcessor unitProcessor, IUnitCreator parent, IPropertyDefinitionManager pdm) Create a binary unit.- Parameters:
mimeType- MIME type; defaults toapplication/octet-streamif null or emptyinput- mandatory binary inputformatType- unit format typename- unit nameunitProcessor- unit processorparent- parent unit or artifactpdm- property definition manager
-
-
Method Details
-
getMimeType
The default implementation returns the MIME type provided to the constructor.- Specified by:
getMimeTypein interfaceIBinaryUnit- Returns:
- optional content-type
-
setMimeType
Set the MIME type.- Parameters:
mimeType- MIME type
-
getInput
The default implementation returns the input provided to the constructor.- Specified by:
getInputin interfaceIBinaryUnit- Specified by:
getInputin interfaceIUnit- Specified by:
getInputin interfaceIUnitCreator- Returns:
- a mandatory input object
-
setInput
Set the binary input.- Parameters:
input- binary input
-