Java Doc for Model.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » insync » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.insync 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.visualweb.insync.Model

All known Subclasses:   org.netbeans.modules.visualweb.insync.models.FacesModel,  org.netbeans.modules.visualweb.insync.models.FacesConfigModel,
Model
abstract public class Model implements SourceUnitListener(Code)
General Model abstraction. A Model is a wrapper for one or more Units and serves to bootstrap the units and coordinate them with Project and its Items.
author:
   cquinn

Inner Class :public interface Factory

Field Summary
final public static  booleanCHECK_CIRCULAR_SYNC
    
final public static  Model[]EMPTY_ARRAY
    
protected  FileObjectfile
    
protected  booleanneedSyncing
    
protected  ModelSetowner
    
protected  ExceptionsyncInProgress
    
protected  UndoManagerundoManager
     Manager tracking source unit updates for this model and coordinating undo/redo operations.

Constructor Summary
protected  Model(ModelSet owner, FileObject file)
    

Method Summary
protected  voidbeginMdrTransation()
    
public  voiddestroy()
     Destroy this model causing it to clean up all its references.
protected  voidendMdrTransaction()
    
public  voidfileRenamed(String oldName, String newName, String ext, FileObject file, boolean remove)
     Called when a file in the project is renamed by the user.
public  voidfireModelChanged()
    
public  voidflush()
     Cause the model to flush any model changes down to the underlying souce buffers as needed.
abstract public  voidflushImpl()
    
public  voidflushNonJavaUnits()
     Should only be used if you are certain this will not cause a problem.
abstract public  voidflushNonJavaUnitsImpl()
    
abstract public  ParserAnnotation[]getErrors()
    
public  FileObjectgetFile()
     Get the primary FileObject that this Model is abstracting.
protected static  ModelgetInstance(FileObject file, Class modelSetType, boolean forceCreate)
    
protected static  ModelgetModel(FileObject file)
    
public  ModelSetgetOwner()
     Get the owning ModelSet for this Model.
public  ProjectgetProject()
    
public  UndoManagergetUndoManager()
     Get the undo manager associated with this model.
public  FileObjectgetWebFolder()
     Get the folder within the owning Project that holds the web source files. the web source folder.
public  booleanisValid()
     Return true ONLY if I have an owner and all my file objects are valid. I had to add this in order to handle issues with threading, queue on different threads, during refactoring.
abstract public  booleanisWriteLocked()
    
public  voidresetOwner()
     ONLY called when my parent is being destroy'ed, in order to make sure there are no contexts active while client views are updating during event notification of models being destroyed.
abstract public  voidsaveUnits()
    
public  voidsourceUnitModelDirtied(SourceUnit unit)
    
public  voidsourceUnitSaved(SourceUnit unit)
    
public  voidsourceUnitSourceDirtied(SourceUnit unit)
    
public  voidsync()
     Cause the model to synchronize its state with the underlying source buffers as needed.
abstract protected  voidsyncImpl()
    
public  StringtoString()
     Provide for an easier string to be displayed when this object is seen in an object inspector.
public  voidtoString(StringBuffer buffer)
     Subclasses should override this to add extra information desired for the string to be displayed when this object is seen in an object inspector.
abstract public  UndoEventwriteLock(String description)
     Lock the entire model for write access.
abstract public  voidwriteUnlock(UndoEvent event)
     Unlock a previously locked model.

Field Detail
CHECK_CIRCULAR_SYNC
final public static boolean CHECK_CIRCULAR_SYNC(Code)



EMPTY_ARRAY
final public static Model[] EMPTY_ARRAY(Code)



file
protected FileObject file(Code)



needSyncing
protected boolean needSyncing(Code)



owner
protected ModelSet owner(Code)
NB and Project coordination



syncInProgress
protected Exception syncInProgress(Code)



undoManager
protected UndoManager undoManager(Code)
Manager tracking source unit updates for this model and coordinating undo/redo operations.




Constructor Detail
Model
protected Model(ModelSet owner, FileObject file)(Code)
Construct a new model under a given owner and for a given NB file
Parameters:
  owner -
Parameters:
  file -




Method Detail
beginMdrTransation
protected void beginMdrTransation()(Code)



destroy
public void destroy()(Code)
Destroy this model causing it to clean up all its references. Called when the project is closing, or the underlying file is deleted. Models must never be used after destroy is called.



endMdrTransaction
protected void endMdrTransaction()(Code)



fileRenamed
public void fileRenamed(String oldName, String newName, String ext, FileObject file, boolean remove)(Code)
Called when a file in the project is renamed by the user. Model implementations should handle this by updating all internal references.
Parameters:
  oldName - The old name of the renamed file.
Parameters:
  newName - The new name of the renamed file.
Parameters:
  ext - The file extension which can be used to determine the type of file.
Parameters:
  file - The actual NB file object.
Parameters:
  remove - Indicates if the model needs to be removed



fireModelChanged
public void fireModelChanged()(Code)



flush
public void flush()(Code)
Cause the model to flush any model changes down to the underlying souce buffers as needed. Will do nothing if the source buffers are already up to date.
See Also:    writeLock,writeUnlock for the prefered way to commit changes to source.



flushImpl
abstract public void flushImpl()(Code)



flushNonJavaUnits
public void flushNonJavaUnits()(Code)
Should only be used if you are certain this will not cause a problem. At moment this is only used by refactoring mechanism. See the caller in ModelSet.plannedChange for more information.



flushNonJavaUnitsImpl
abstract public void flushNonJavaUnitsImpl()(Code)



getErrors
abstract public ParserAnnotation[] getErrors()(Code)



getFile
public FileObject getFile()(Code)
Get the primary FileObject that this Model is abstracting. the primary FileObject that this Model is abstracting



getInstance
protected static Model getInstance(FileObject file, Class modelSetType, boolean forceCreate)(Code)



getModel
protected static Model getModel(FileObject file)(Code)



getOwner
public ModelSet getOwner()(Code)
Get the owning ModelSet for this Model. the owning ModelSet for this Model.



getProject
public Project getProject()(Code)



getUndoManager
public UndoManager getUndoManager()(Code)
Get the undo manager associated with this model. the undo manager associated with this model



getWebFolder
public FileObject getWebFolder()(Code)
Get the folder within the owning Project that holds the web source files. the web source folder.



isValid
public boolean isValid()(Code)
Return true ONLY if I have an owner and all my file objects are valid. I had to add this in order to handle issues with threading, queue on different threads, during refactoring. We can run into a case where a file has been removed, but the model is still around. This is not a good situation, so now we check for isValid.



isWriteLocked
abstract public boolean isWriteLocked()(Code)



resetOwner
public void resetOwner()(Code)
ONLY called when my parent is being destroy'ed, in order to make sure there are no contexts active while client views are updating during event notification of models being destroyed.



saveUnits
abstract public void saveUnits()(Code)



sourceUnitModelDirtied
public void sourceUnitModelDirtied(SourceUnit unit)(Code)



sourceUnitSaved
public void sourceUnitSaved(SourceUnit unit)(Code)



sourceUnitSourceDirtied
public void sourceUnitSourceDirtied(SourceUnit unit)(Code)



sync
public void sync()(Code)
Cause the model to synchronize its state with the underlying source buffers as needed. Will do nothing if the model is already in a sync'd state.



syncImpl
abstract protected void syncImpl()(Code)



toString
public String toString()(Code)
Provide for an easier string to be displayed when this object is seen in an object inspector.



toString
public void toString(StringBuffer buffer)(Code)
Subclasses should override this to add extra information desired for the string to be displayed when this object is seen in an object inspector.
Parameters:
  buffer -



writeLock
abstract public UndoEvent writeLock(String description)(Code)
Lock the entire model for write access.
Parameters:
  description - The human readable description of the operation to be performed duringlock. The undo event object that will be populated with state needed to undo what is doneduring the lock.



writeUnlock
abstract public void writeUnlock(UndoEvent event)(Code)
Unlock a previously locked model. Unlock should always be called exactly once after lock, and so should be placed in a finally block.
Parameters:
  event - The undo event object that was returned from writeLock().



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.