public abstract class AbstractDocumentManager extends Object implements DocumentManager, Observer
NOTIFY_AFTER_CREATEDOCUMENT, NOTIFY_AFTER_GETMAINWINDOW, NOTIFY_AFTER_GETPROPERTIESWINDOW| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDocumentManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(Observer o) |
Object |
create()
Crea una instancia de la extension y la retorna.
|
Object |
create(Map args) |
Object |
create(Object[] args)
Crea una instancia de la extension y la retorna.
|
AbstractDocument |
createDocumentByUser()
Uses a gui to be able from the characteristics that we want a
ProjectDocument
|
Iterator<? extends Document> |
createDocumentsByUser()
Uses a gui to be able from the characteristics that we want a
ProjectDocument
|
protected IDocumentWindow |
createDocumentWindow(Document document) |
Object |
createFromState(PersistentState state)
Create an instance of the object represented by the state.
|
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
boolean |
existName(Project project,
String documentName)
Deprecated.
use instead project.getProjectDocument
|
List<DynStruct> |
getDefinitions()
Return a List of the definition managed by this factory where the key is
className and value is definition |
protected abstract Class |
getDocumentClass()
Return the class or interface for the documents managed by this factory.
|
String |
getDomainName()
Returns the domain name of the objects persisted by this factory.
|
String |
getDomainURL()
Returns the domain URL to use for the schema.
|
ImageIcon |
getIcon()
Returns the icon for the type of document.
|
ImageIcon |
getIconSelected()
Returns the icon for the type of document when is selected
|
JComponent |
getMainComponent(Document doc)
Devuelbe el JComponent que se corresponde con el documento indicado.
|
JComponent |
getMainComponent(DocumentsContainer container,
Document doc)
Create a new JComponent for the document or if already exists
in the specified container, return this.
|
IWindow |
getMainWindow(Document doc)
Return the main window asociated to the passed document.
|
IWindow |
getMainWindow(Document doc,
WindowLayout layout)
Return the main window asociated to the document.
|
Class |
getManagedClass(Object object)
Return the class or interface the factory asociate to
the object.
|
Class |
getManagedClass(PersistentState state)
Return the class or interface the factory asociate to
the object.
|
Class |
getManagedClass(String name)
Return the class or interface the factory asociate to
the java class name.
|
List |
getManagedClasses()
Return the list of classes or interfaces managed by this
factory.
|
String |
getManagedClassName(Object object)
Return the name class or interface the factory asociate to
the object.
|
int |
getPriority()
Returns the type of document priority.
|
IWindow |
getPropertiesWindow(Document doc)
Return the windows properties asociated to the document.
|
String |
getTitle()
Returns the title of type of document.
|
void |
loadFromState(PersistentState state,
Object object)
Load a instance of
classToUse from state data. |
boolean |
manages(Class theClass)
Informs if
theClass is managed by this factory. |
boolean |
manages(PersistentState state)
Informs if this factory can recreate the object represented by
state. |
protected Notification |
notifyObservers(String type,
Document doc) |
protected Notification |
notifyObservers(String type,
IWindow doc) |
void |
registerMainComponent(DocumentsContainer container,
Document doc,
JComponent component) |
void |
saveToState(PersistentState state,
Object obj)
Fill
state with data to persist of obj. |
void |
unregisterMainComponent(DocumentsContainer container,
Document doc) |
void |
update(Observable observable,
Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateDocument, getMainWindowClass, getTypeNamegetDefinition, managespublic int getPriority()
getPriority in interface DocumentManagerpublic ImageIcon getIcon()
getIcon in interface DocumentManagerpublic ImageIcon getIconSelected()
getIconSelected in interface DocumentManagerpublic String getTitle()
getTitle in interface DocumentManagerpublic AbstractDocument createDocumentByUser()
DocumentManagercreateDocumentByUser in interface DocumentManagerpublic Iterator<? extends Document> createDocumentsByUser()
DocumentManagercreateDocumentsByUser in interface DocumentManagerpublic Object create()
ExtensionBuildercreate in interface ExtensionBuilderExtensionBuilderpublic Object create(Object[] args)
ExtensionBuildercreate in interface ExtensionBuilderExtensionBuilderpublic Object create(Map args)
create in interface ExtensionBuilderExtensionBuilderpublic IWindow getMainWindow(Document doc)
DocumentManagergetMainWindow in interface DocumentManagerpublic IWindow getMainWindow(Document doc, WindowLayout layout)
DocumentManagergetMainWindow in interface DocumentManagerpublic IWindow getPropertiesWindow(Document doc)
DocumentManagergetPropertiesWindow in interface DocumentManagerpublic JComponent getMainComponent(Document doc)
DocumentManagergetMainComponent in interface DocumentManagerpublic JComponent getMainComponent(DocumentsContainer container, Document doc)
DocumentManagergetMainComponent in interface DocumentManagerpublic void unregisterMainComponent(DocumentsContainer container, Document doc)
unregisterMainComponent in interface DocumentManagerpublic void registerMainComponent(DocumentsContainer container, Document doc, JComponent component)
registerMainComponent in interface DocumentManagerpublic boolean existName(Project project, String documentName)
existName in interface DocumentManagerproject - documentName - protected abstract Class getDocumentClass()
public Object createFromState(PersistentState state) throws PersistenceException
PersistenceFactoryPersistenceFactory.loadFromState(PersistentState, Object) only create
the object.createFromState in interface PersistenceFactoryPersistenceExceptionpublic void loadFromState(PersistentState state, Object object) throws PersistenceException
PersistenceFactoryclassToUse from state data.loadFromState in interface PersistenceFactoryPersistenceExceptionpublic void saveToState(PersistentState state, Object obj) throws PersistenceException
PersistenceFactorystate with data to persist of obj.saveToState in interface PersistenceFactoryPersistenceExceptionpublic boolean manages(Class theClass)
PersistenceFactorytheClass is managed by this factory.manages in interface PersistenceFactorypublic boolean manages(PersistentState state)
PersistenceFactorystate.manages in interface PersistenceFactorypublic List<DynStruct> getDefinitions()
PersistenceFactoryclassName and value is definitiongetDefinitions in interface PersistenceFactorypublic String getDomainName()
PersistenceFactorygetDomainName in interface PersistenceFactorypublic String getDomainURL()
PersistenceFactorygetDomainURL in interface PersistenceFactorypublic List getManagedClasses()
PersistenceFactorygetManagedClasses in interface PersistenceFactorypublic Class getManagedClass(Object object)
PersistenceFactorygetManagedClass in interface PersistenceFactorypublic Class getManagedClass(PersistentState state)
PersistenceFactorygetManagedClass in interface PersistenceFactorypublic Class getManagedClass(String name)
PersistenceFactorygetManagedClass in interface PersistenceFactorypublic String getManagedClassName(Object object)
PersistenceFactorygetManagedClassName in interface PersistenceFactoryprotected IDocumentWindow createDocumentWindow(Document document)
public void update(Observable observable, Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.
public void addObserver(Observer o)
addObserver in interface Observablepublic void deleteObserver(Observer o)
deleteObserver in interface Observablepublic void deleteObservers()
deleteObservers in interface Observableprotected Notification notifyObservers(String type, Document doc)
protected Notification notifyObservers(String type, IWindow doc)