Class ScriptProfileFactory
java.lang.Object
org.openhab.core.automation.module.script.profile.ScriptProfileFactory
- All Implemented Interfaces:
ProfileFactory,ProfileTypeProvider
@NonNullByDefault
public class ScriptProfileFactory
extends Object
implements ProfileFactory, ProfileTypeProvider
The
ScriptProfileFactory creates ScriptProfile instances- Author:
- Jan N. Klug - Initial contribution
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbindScriptTransformationService(ScriptTransformationService service, Map<String, Object> properties) @Nullable ProfilecreateProfile(ProfileTypeUID profileTypeUID, ProfileCallback callback, ProfileContext profileContext) Creates aProfileinstance for the given profile type identifier.getProfileTypes(@Nullable Locale locale) Returns all profile types for the givenLocale.Return the identifiers of all supported profile types.voidunbindScriptTransformationService(ScriptTransformationService service, Map<String, Object> properties)
-
Field Details
-
PROFILE_CONFIG_URI_PREFIX
- See Also:
-
-
Constructor Details
-
ScriptProfileFactory
public ScriptProfileFactory()
-
-
Method Details
-
createProfile
public @Nullable Profile createProfile(ProfileTypeUID profileTypeUID, ProfileCallback callback, ProfileContext profileContext) Description copied from interface:ProfileFactoryCreates aProfileinstance for the given profile type identifier.- Specified by:
createProfilein interfaceProfileFactory- Parameters:
profileTypeUID- the profile type identifiercallback- theProfileCallbackinstance to be used by theProfileinstanceprofileContext- giving access to the profile's context like configuration, scheduler, etc.- Returns:
- the profile instance or
nullif this factory cannot handle the given link
-
getSupportedProfileTypeUIDs
Description copied from interface:ProfileFactoryReturn the identifiers of all supported profile types.- Specified by:
getSupportedProfileTypeUIDsin interfaceProfileFactory- Returns:
- a collection of all profile type identifier which this class is capable of creating
-
getProfileTypes
Description copied from interface:ProfileTypeProviderReturns all profile types for the givenLocale.- Specified by:
getProfileTypesin interfaceProfileTypeProvider- Parameters:
locale- (can be null)- Returns:
- all profile types or empty list if no profile type exists
-
bindScriptTransformationService
public void bindScriptTransformationService(ScriptTransformationService service, Map<String, Object> properties) -
unbindScriptTransformationService
public void unbindScriptTransformationService(ScriptTransformationService service, Map<String, Object> properties)
-