Class AbstractDescriptor.ResourceDescriptor

java.lang.Object
de.espirit.firstspirit.module.descriptor.AbstractDescriptor.ResourceDescriptor
All Implemented Interfaces:
Serializable
Enclosing class:
AbstractDescriptor

public static class AbstractDescriptor.ResourceDescriptor extends Object implements Serializable
A resource available on the Java classpath (e.g. a JAR file)
Since:
5.2.240501
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    @Nullable String
    The maximum supported compatible version of this resource is used to find the best version if multiple components define the same resource.
    @Nullable String
    The minimal supported compatible version of this resource is used to find the best version if multiple components define the same resource.
    @Nullable String
    The name of the resource, may be a Maven identifier like "org.apache.logging.log4j:log4j-api".
    @NotNull String
    Returns the descriptor's parent identifier, which may represent a module name or component identifier for example.
    @NotNull String
    The actual filename of the resource in the FSM file.
    @Nullable String
    The path where the resource should be available, useful for static resources.
    @Nullable String
    The version of the resource (e.g. "1.0.0"), used to detect potential conflicts.
    int
     
    boolean
    Indicates if a resource is globally visible (i.e. for all other modules, too) or only locally for the same module.
    boolean
    Allows to differentiate between legacy and isolated resources.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ResourceDescriptor

      public ResourceDescriptor()
  • Method Details

    • getName

      @Nullable public @Nullable String getName()
      The name of the resource, may be a Maven identifier like "org.apache.logging.log4j:log4j-api".
      Returns:
      the name of the resource, may be null if unset.
      Since:
      5.2.240501
    • getVersion

      @Nullable public @Nullable String getVersion()
      The version of the resource (e.g. "1.0.0"), used to detect potential conflicts.
      Returns:
      The version of the resource, may be null if unset.
      Since:
      5.2.240501
    • getMinVersion

      @Nullable public @Nullable String getMinVersion()
      The minimal supported compatible version of this resource is used to find the best version if multiple components define the same resource.
      Returns:
      The minimal supported compatible version of this resource, may be null if unset.
      Since:
      5.2.240501
    • getMaxVersion

      @Nullable public @Nullable String getMaxVersion()
      The maximum supported compatible version of this resource is used to find the best version if multiple components define the same resource.
      Returns:
      The maximum supported compatible version of this resource, may be null if unset.
      Since:
      5.2.240501
    • getResource

      @NotNull public @NotNull String getResource()
      The actual filename of the resource in the FSM file.
      Returns:
      The filename of the resource, never null.
      Since:
      5.2.240501
    • getParentIdentifier

      @NotNull public @NotNull String getParentIdentifier()
      Returns the descriptor's parent identifier, which may represent a module name or component identifier for example.
      Since:
      5.2.240501
    • getTarget

      @Nullable public @Nullable String getTarget()
      The path where the resource should be available, useful for static resources.
      Returns:
      The path where the resource should be available, may be null if unset.
      Since:
      5.2.240501
    • isGlobal

      public boolean isGlobal()
      Indicates if a resource is globally visible (i.e. for all other modules, too) or only locally for the same module.
      Returns:
      true if the resource is globally visible, false otherwise.
      Since:
      5.2.240501
    • isLegacy

      public boolean isLegacy()
      Allows to differentiate between legacy and isolated resources. This is mainly important for resources of modules where legacy resources have access to several internal resources of the server while isolated resources are limited to a specific runtime.
      Returns:
      true if the mode of this resource is LEGACY (the default) or falseif the mode is ISOLATED.
      Since:
      5.2.240501
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object