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 Details

  • Method Details

    • updateFile

      public void updateFile(String sourceUrl, Source source, InputStream is) throws Exception
      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 interface FileReloader
      Parameters:
      sourceUrl - the url of the file.
      source - the source to read, can be null if no file was read
      is - the input stream to read, can be null if no file was read
      Throws:
      Exception - something went wrong while reading the inputstream
    • getId

      public String getId(String sourceUrl)
      Description copied from interface: FileReloader
      Get an unique ID for this File Reloader
      Specified by:
      getId in interface FileReloader
      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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • initializer

      Returns the value of the initializer record component.
      Returns:
      the value of the initializer record component