Class TagPropertyDirectory
- java.lang.Object
-
- com.inductiveautomation.ignition.common.tags.config.TagPropertyDirectory
-
- All Implemented Interfaces:
PropertyResolver
public class TagPropertyDirectory extends java.lang.Object implements PropertyResolver
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TagPropertyDirectory
getInstance()
boolean
isInternedStringProp(Property<java.lang.String> prop)
This should be consulted when setting string property values- if true, the value should be interned.boolean
isRemappedPath(TagPath path)
Property<?>
locate(java.lang.String name)
protected Property<?>
locate(java.lang.String name, boolean create)
Property<?>
locateCached(Property<?> property)
Returns the "official" version of a property, if it exists, otherwise registers this property.Property<?>
locateNotNull(java.lang.String name)
Use when you need a non-null property to be returned, even if it doesn't exist in the directory.Property<?>
locateRegistered(Property<?> property)
Returns the "official" version of a property, if it exists, otherwise returns the provided value.void
register(Property<?>[] values)
void
registerAlias(java.lang.String legacyName, java.lang.String newName)
void
registerInternedStringProp(Property<java.lang.String> prop)
Indicates that the values of the property specified should have string.intern() called on them.void
registerRemapper(Property<?> legacy, java.util.function.Function<TagPath,TagPath> mapper)
These manage upgrading properties that have more complicated re-mappings.void
registerRemapper(java.lang.String legacyName, java.util.function.Function<TagPath,TagPath> mapper)
These manage upgrading properties that have more complicated re-mappings.TagPath
remapPath(TagPath path)
If the path conforms to a remapped/upgraded scheme (isRemappedPath returns true), this will return the new equivilent path.Property<?>
resolve(java.lang.String id)
Returns the property represented by the id, or null if the property cannot be found.
-
-
-
Method Detail
-
getInstance
public static TagPropertyDirectory getInstance()
-
isInternedStringProp
public boolean isInternedStringProp(Property<java.lang.String> prop)
This should be consulted when setting string property values- if true, the value should be interned.
-
registerInternedStringProp
public void registerInternedStringProp(Property<java.lang.String> prop)
Indicates that the values of the property specified should have string.intern() called on them.
-
register
public void register(Property<?>[] values)
-
registerAlias
public void registerAlias(java.lang.String legacyName, java.lang.String newName)
-
registerRemapper
public void registerRemapper(Property<?> legacy, java.util.function.Function<TagPath,TagPath> mapper)
These manage upgrading properties that have more complicated re-mappings. These are typically runtime properties that used to be directly under a tag, but are now under an actor.
-
registerRemapper
public void registerRemapper(java.lang.String legacyName, java.util.function.Function<TagPath,TagPath> mapper)
These manage upgrading properties that have more complicated re-mappings. These are typically runtime properties that used to be directly under a tag, but are now under an actor.
-
locate
public Property<?> locate(java.lang.String name)
-
locateNotNull
public Property<?> locateNotNull(java.lang.String name)
Use when you need a non-null property to be returned, even if it doesn't exist in the directory. If the property does not exist, a new BasicProperty of type Object is returned. It will be cached for the next lookup, but replaced if properly registered.
-
locateCached
public Property<?> locateCached(Property<?> property)
Returns the "official" version of a property, if it exists, otherwise registers this property.
-
locateRegistered
public Property<?> locateRegistered(Property<?> property)
Returns the "official" version of a property, if it exists, otherwise returns the provided value.
-
locate
protected Property<?> locate(java.lang.String name, boolean create)
-
resolve
public Property<?> resolve(java.lang.String id)
Description copied from interface:PropertyResolver
Returns the property represented by the id, or null if the property cannot be found.- Specified by:
resolve
in interfacePropertyResolver
-
isRemappedPath
public boolean isRemappedPath(TagPath path)
-
-