Interface EnumerationInfoProvider
- All Known Implementing Classes:
AbstractEnumerationInfoProvider
public interface EnumerationInfoProvider
The interface defines how to implement a custom dynamic enumeration provider. Do not implement this interface
directly, instead extend
Instances of this will be instantiated through reflection. Therefore a public no-arg constructor is required. Any exceptions thrown from the methods in this interface will result in an empty enumeration.
Supported API: true
Extendable: false
AbstractEnumerationInfoProvider Instances of this will be instantiated through reflection. Therefore a public no-arg constructor is required. Any exceptions thrown from the methods in this interface will result in an empty enumeration.
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionReturn the enumeration info generated by this provider.Get the enumeration info manager.Get the initialization string This is expected to return the same parameter string that was passed in during initialization.voidinitialize(EnumerationInfoManager manager, String parameters) This method is used to initialize the provider.
-
Method Details
-
initialize
This method is used to initialize the provider. It will be called before getEnumerationInfo() is invoked.
Supported API: true- Parameters:
manager- An enumeration manager is used to trigger the refresh of the enumeration cache.EnumerationInfoManager.resetEnumeration(com.ptc.core.lwc.common.dynamicEnum.EnumerationInfoProvider)parameters- An initialization string (e.g. filled on Type Manager UI) when the provider is registered for the constraint. The structure of the string is defined by the provider implementation.
-
getManager
EnumerationInfoManager getManager()Get the enumeration info manager. This is expected to return the same manager that was passed in during initialization.
Supported API: true- Returns:
- The enumeration info manager.
-
getParameters
String getParameters()Get the initialization string This is expected to return the same parameter string that was passed in during initialization.
Supported API: true- Returns:
- The initialization string.
-
getEnumerationInfo
EnumerationInfo getEnumerationInfo()Return the enumeration info generated by this provider. This enumeration info will be cached by the manager. The enumeration info is not thread safe and should not be modified once it's handed off to the manager.
Supported API: true- Returns:
- The enumeration info generated by this provider. If null is returned an empty enumeration will be used.
-