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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bindScriptTransformationService
(ScriptTransformationService service, Map<String, Object> properties) @Nullable Profile
createProfile
(ProfileTypeUID profileTypeUID, ProfileCallback callback, ProfileContext profileContext) Creates aProfile
instance 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.void
unbindScriptTransformationService
(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:ProfileFactory
Creates aProfile
instance for the given profile type identifier.- Specified by:
createProfile
in interfaceProfileFactory
- Parameters:
profileTypeUID
- the profile type identifiercallback
- theProfileCallback
instance to be used by theProfile
instanceprofileContext
- giving access to the profile's context like configuration, scheduler, etc.- Returns:
- the profile instance or
null
if this factory cannot handle the given link
-
getSupportedProfileTypeUIDs
Description copied from interface:ProfileFactory
Return the identifiers of all supported profile types.- Specified by:
getSupportedProfileTypeUIDs
in interfaceProfileFactory
- Returns:
- a collection of all profile type identifier which this class is capable of creating
-
getProfileTypes
Description copied from interface:ProfileTypeProvider
Returns all profile types for the givenLocale
.- Specified by:
getProfileTypes
in 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)
-