User Tools

Site Tools


dev-guide:embedded-file-object

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev-guide:embedded-file-object [2025/01/08 18:54] – [Custom object persistence] gaetandev-guide:embedded-file-object [2025/01/08 19:11] (current) gaetan
Line 11: Line 11:
 In GroIMP embedded objects are objects whose persistence is pushed in a file.  In GroIMP embedded objects are objects whose persistence is pushed in a file. 
  
-EmbeddedSharedObject is a class, thus the object needs to extends it.  +EmbeddedSharedObject (ESO) is a class, thus the object needs to extends it.  
-The EmbeddedSharedObject create on the fly and manage an EmbeddedFileObject. +The ESO create on the fly and manage an EmbeddedFileObject (EFO)
  
-The object that extends EmbeddedSharedObject need to implements the following methods:+The object that extends ESO need to implements the following methods:
   * ''public MimeType getMimeType()'': to provide the mimetype to use when writing and loading the object (see GroIMP [[:groimp-platform:input-and-output-in-groimp:mimetype|mimetype]]).   * ''public MimeType getMimeType()'': to provide the mimetype to use when writing and loading the object (see GroIMP [[:groimp-platform:input-and-output-in-groimp:mimetype|mimetype]]).
   * ''public String getExtension()'': to provide the file extension (can be an empty string. File extensions are used to make it easier read files but are usually not required).   * ''public String getExtension()'': to provide the file extension (can be an empty string. File extensions are used to make it easier read files but are usually not required).
Line 21: Line 21:
   * ''public boolean hasContent()'': custom way to check if the object actually needs to be disposed. Can be set to true if it is always the case.   * ''public boolean hasContent()'': custom way to check if the object actually needs to be disposed. Can be set to true if it is always the case.
  
 +
 +Check [[:tutorials:create-parameternode-eso|this tutorial]] for an example.
  
  
dev-guide/embedded-file-object.1736358868.txt.gz · Last modified: 2025/01/08 18:54 by gaetan