Record Class DefaultStaticPageInitializer.PageModelReloader
java.lang.Object
java.lang.Record
org.ametys.plugins.workspaces.initialization.DefaultStaticPageInitializer.PageModelReloader
- Record Components:
path
- the file path.initializer
- the initializer component
- All Implemented Interfaces:
FileReloader
- Enclosing class:
- DefaultStaticPageInitializer
protected static record DefaultStaticPageInitializer.PageModelReloader(String path, DefaultStaticPageInitializer initializer)
extends Record
implements FileReloader
File reloader for the page model configuration
-
Constructor Summary
ModifierConstructorDescriptionprotected
PageModelReloader
(String path, DefaultStaticPageInitializer initializer) Creates an instance of aPageModelReloader
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Get an unique ID for this File Reloaderfinal int
hashCode()
Returns a hash code value for this object.Returns the value of theinitializer
record component.path()
Returns the value of thepath
record component.final String
toString()
Returns a string representation of this record class.void
updateFile
(String sourceUrl, Source source, InputStream is) Update the file, the sourceUrl is only there if you manage multiple files, the Configuration object is already present to read it
-
Constructor Details
-
PageModelReloader
Creates an instance of aPageModelReloader
record class.- Parameters:
path
- the value for thepath
record componentinitializer
- the value for theinitializer
record component
-
-
Method Details
-
updateFile
Description copied from interface:FileReloader
Update the file, the sourceUrl is only there if you manage multiple files, the Configuration object is already present to read it- Specified by:
updateFile
in interfaceFileReloader
- Parameters:
sourceUrl
- the url of the file.source
- the source to read, can be null if no file was readis
- the input stream to read, can be null if no file was read- Throws:
Exception
- something went wrong while reading the inputstream
-
getId
Description copied from interface:FileReloader
Get an unique ID for this File Reloader- Specified by:
getId
in interfaceFileReloader
- Parameters:
sourceUrl
- this is passed as an argument if your class read multiple files. If it reads only one file, the full class name can be a good enough ID- Returns:
- an unique ID
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
path
Returns the value of thepath
record component.- Returns:
- the value of the
path
record component
-
initializer
Returns the value of theinitializer
record component.- Returns:
- the value of the
initializer
record component
-