Record Class ResourceType
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.common.resourcecollection.ResourceType
- Record Components:
moduleId
- the module ID of the module this resource type belongs to.typeId
- the type ID of the Resource;null
for the resource that represents the module root folder.
- All Implemented Interfaces:
Serializable
public record ResourceType(@Nonnull String moduleId, @Nullable String typeId)
extends Record
implements Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResourceType
(String moduleId, String typeId) Creates an instance of aResourceType
record class. -
Method Summary
Modifier and TypeMethodDescriptionchildOrSubPath
(ResourcePath potentialFolder, String path) Creates a ResourcePath for a direct named child of this type.boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
moduleId()
Returns the value of themoduleId
record component.rootPath()
Creates a ResourcePath for a child descendent resource of this type, possibly nested within subfolderstoFilter()
toString()
Returns a string representation of this record class.typeId()
Returns the value of thetypeId
record component.
-
Constructor Details
-
Method Details
-
rootPath
- Returns:
- the ResourcePath for a resource to be placed in the module root. Applicable for root folders and singleton resources.
-
subPath
Creates a ResourcePath for a child descendent resource of this type, possibly nested within subfolders- Parameters:
path
- the path of the child resource. Will be parsed as a string path, e.g. "folder1/folder2/resourceName"
-
childPath
Creates a ResourcePath for a direct named child of this type.- Parameters:
name
- Name of the child resource. Will not be parsed, e.g. a value of "foo/bar" will not be parsed as "bar in a folder named foo" but rather "a child named 'foo/bar'"
-
childOrSubPath
-
matches
-
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)
. -
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. -
toFilter
- Returns:
- a ResourceFilter that matches only this resource type.
-
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. -
moduleId
Returns the value of themoduleId
record component.- Returns:
- the value of the
moduleId
record component
-
typeId
Returns the value of thetypeId
record component.- Returns:
- the value of the
typeId
record component
-