Record Class DefaultResourceActions.MoveImpl.MoveContext

java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.gateway.config.actions.DefaultResourceActions.MoveImpl.MoveContext
Enclosing class:
DefaultResourceActions.MoveImpl

public static record DefaultResourceActions.MoveImpl.MoveContext(String oldName, String oldCollection, Resource resource, ResourceCodec<?> codec) extends Record
Used internally by the Move implementation for validation. This is mostly to marshall the resources using the correct codec along with additional details. The DefaultResourceActions.MoveResource record is the main way any of this is interacted with. This primarily serves as a bridge to get from the non-generic type world of Move into the generic typed world of validation.
  • Constructor Details

    • MoveContext

      public MoveContext(String oldName, String oldCollection, Resource resource, ResourceCodec<?> codec)
      Creates an instance of a MoveContext record class.
      Parameters:
      oldName - the value for the oldName record component
      oldCollection - the value for the oldCollection record component
      resource - the value for the resource record component
      codec - the value for the codec record component
  • Method Details

    • 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.
    • oldName

      public String oldName()
      Returns the value of the oldName record component.
      Returns:
      the value of the oldName record component
    • oldCollection

      public String oldCollection()
      Returns the value of the oldCollection record component.
      Returns:
      the value of the oldCollection record component
    • resource

      public Resource resource()
      Returns the value of the resource record component.
      Returns:
      the value of the resource record component
    • codec

      public ResourceCodec<?> codec()
      Returns the value of the codec record component.
      Returns:
      the value of the codec record component