Java Doc for IMemento.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » 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 Eclipse » ui workbench » org.eclipse.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.IMemento

All known Subclasses:   org.eclipse.ui.internal.util.ConfigurationElementMemento,  org.eclipse.ui.XMLMemento,
IMemento
public interface IMemento (Code)
Interface to a memento used for saving the important state of an object in a form that can be persisted in the file system.

Mementos were designed with the following requirements in mind:

  1. Certain objects need to be saved and restored across platform sessions.
  2. When an object is restored, an appropriate class for an object might not be available. It must be possible to skip an object in this case.
  3. When an object is restored, the appropriate class for the object may be different from the one when the object was originally saved. If so, the new class should still be able to read the old form of the data.

Mementos meet these requirements by providing support for storing a mapping of arbitrary string keys to primitive values, and by allowing mementos to have other mementos as children (arranged into a tree). A robust external storage format based on XML is used.

The key for an attribute may be any alpha numeric value. However, the value of TAG_ID is reserved for internal use.

This interface is not intended to be implemented or extended by clients.


See Also:   IPersistableElement
See Also:   IElementFactory


Field Summary
final public static  StringTAG_ID
     Special reserved key used to store the memento id (value "IMemento.internal.id").


Method Summary
public  IMementocreateChild(String type)
     Creates a new child of this memento with the given type.
public  IMementocreateChild(String type, String id)
     Creates a new child of this memento with the given type and id.
public  String[]getAttributeKeys()
     Returns an array of all the attribute keys of the memento.
public  BooleangetBoolean(String key)
     Returns the boolean value of the given key.
public  IMementogetChild(String type)
     Returns the first child with the given type id.
public  IMemento[]getChildren(String type)
     Returns all children with the given type id.
public  FloatgetFloat(String key)
     Returns the floating point value of the given key.
public  StringgetID()
     Returns the id for this memento.
public  IntegergetInteger(String key)
     Returns the integer value of the given key.
public  StringgetString(String key)
     Returns the string value of the given key.
public  StringgetTextData()
     Returns the data of the Text node of the memento.
public  StringgetType()
     Returns the type for this memento.
public  voidputBoolean(String key, boolean value)
     Sets the value of the given key to the given boolean value.
public  voidputFloat(String key, float value)
     Sets the value of the given key to the given floating point number.
public  voidputInteger(String key, int value)
     Sets the value of the given key to the given integer.
public  voidputMemento(IMemento memento)
     Copy the attributes and children from memento to the receiver.
public  voidputString(String key, String value)
     Sets the value of the given key to the given string.
public  voidputTextData(String data)
     Sets the memento's Text node to contain the given data.

Field Detail
TAG_ID
final public static String TAG_ID(Code)
Special reserved key used to store the memento id (value "IMemento.internal.id").
See Also:   IMemento.getID()





Method Detail
createChild
public IMemento createChild(String type)(Code)
Creates a new child of this memento with the given type.

The getChild and getChildren methods are used to retrieve children of a given type.


Parameters:
  type - the type a new child memento
See Also:   IMemento.getChild
See Also:   IMemento.getChildren



createChild
public IMemento createChild(String type, String id)(Code)
Creates a new child of this memento with the given type and id. The id is stored in the child memento (using a special reserved key, TAG_ID) and can be retrieved using getId.

The getChild and getChildren methods are used to retrieve children of a given type.


Parameters:
  type - the type
Parameters:
  id - the child id a new child memento with the given type and id
See Also:   IMemento.getID



getAttributeKeys
public String[] getAttributeKeys()(Code)
Returns an array of all the attribute keys of the memento. This will not be null. If there are no keys, an array of length zero will be returned. an array with all the attribute keys of the memento
since:
   3.4



getBoolean
public Boolean getBoolean(String key)(Code)
Returns the boolean value of the given key.
Parameters:
  key - the key the value, or null if the key was not found
since:
   3.4



getChild
public IMemento getChild(String type)(Code)
Returns the first child with the given type id.
Parameters:
  type - the type id the first child with the given type



getChildren
public IMemento[] getChildren(String type)(Code)
Returns all children with the given type id.
Parameters:
  type - the type id an array of children with the given type



getFloat
public Float getFloat(String key)(Code)
Returns the floating point value of the given key.
Parameters:
  key - the key the value, or null if the key was not found or was foundbut was not a floating point number



getID
public String getID()(Code)
Returns the id for this memento. the memento id, or null if none
See Also:   IMemento.createChild(java.lang.String,java.lang.String)



getInteger
public Integer getInteger(String key)(Code)
Returns the integer value of the given key.
Parameters:
  key - the key the value, or null if the key was not found or was foundbut was not an integer



getString
public String getString(String key)(Code)
Returns the string value of the given key.
Parameters:
  key - the key the value, or null if the key was not found



getTextData
public String getTextData()(Code)
Returns the data of the Text node of the memento. Each memento is allowed only one Text node. the data of the Text node of the memento, or nullif the memento has no Text node.
since:
   2.0



getType
public String getType()(Code)
Returns the type for this memento. the memento type
See Also:   IMemento.createChild(java.lang.String)
See Also:   IMemento.createChild(java.lang.String,java.lang.String)
since:
   3.4



putBoolean
public void putBoolean(String key, boolean value)(Code)
Sets the value of the given key to the given boolean value.
Parameters:
  key - the key
Parameters:
  value - the value
since:
   3.4



putFloat
public void putFloat(String key, float value)(Code)
Sets the value of the given key to the given floating point number.
Parameters:
  key - the key
Parameters:
  value - the value



putInteger
public void putInteger(String key, int value)(Code)
Sets the value of the given key to the given integer.
Parameters:
  key - the key
Parameters:
  value - the value



putMemento
public void putMemento(IMemento memento)(Code)
Copy the attributes and children from memento to the receiver.
Parameters:
  memento - the IMemento to be copied.



putString
public void putString(String key, String value)(Code)
Sets the value of the given key to the given string.
Parameters:
  key - the key
Parameters:
  value - the value



putTextData
public void putTextData(String data)(Code)
Sets the memento's Text node to contain the given data. Creates the Text node if none exists. If a Text node does exist, it's current contents are replaced. Each memento is allowed only one text node.
Parameters:
  data - the data to be placed on the Text node
since:
   2.0



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