Package org.forgerock.am.iot
Class ThingsResource
java.lang.Object
org.forgerock.am.iot.ThingsResource
- All Implemented Interfaces:
CollectionResourceProvider
ThingsResource handles REST calls made to the things endpoint. It provides access to a thing's identity
attributes and actions that can be performed on the thing.
Note that this endpoint is not annotated with API description as it is not a supported endpoint and therefore should
not be part of the API documentation or Amster.
-
Constructor Summary
ConstructorsConstructorDescriptionThingsResource(IdentityStoreFactory identityStoreFactory, IotServiceConfig iotServiceConfig, Map<String, org.forgerock.am.iot.ThingsActionHandler> actionHandlers) Create a new instance of the ThingsResource. -
Method Summary
Modifier and TypeMethodDescriptionactionInstance(Context context, String id, ActionRequest request) Performs the providedactionagainst a resource within the collection.readInstance(Context context, String id, ReadRequest request) Readsan existing resource within the collection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.forgerock.json.resource.CollectionResourceProvider
actionCollection, createInstance, deleteInstance, patchInstance, queryCollection, updateInstance
-
Constructor Details
-
ThingsResource
@Inject public ThingsResource(IdentityStoreFactory identityStoreFactory, IotServiceConfig iotServiceConfig, @Named("ThingsActionHandlers") Map<String, org.forgerock.am.iot.ThingsActionHandler> actionHandlers) Create a new instance of the ThingsResource.- Parameters:
identityStoreFactory- factory for creatingAMIdentityinstances.iotServiceConfig- interface for accessing IoT service configuration in a given realm.actionHandlers- theThingsActionHandlerused for handling CREST actions.
-
-
Method Details
-
actionInstance
public Promise<ActionResponse,ResourceException> actionInstance(Context context, String id, ActionRequest request) Description copied from interface:CollectionResourceProviderPerforms the providedactionagainst a resource within the collection.- Specified by:
actionInstancein interfaceCollectionResourceProvider- Parameters:
context- The request server context.id- The ID of the targeted resource within the collection.request- The action request.- Returns:
- A
Promisecontaining the result of the operation. - See Also:
-
readInstance
public Promise<ResourceResponse,ResourceException> readInstance(Context context, String id, ReadRequest request) Description copied from interface:CollectionResourceProviderReadsan existing resource within the collection.- Specified by:
readInstancein interfaceCollectionResourceProvider- Parameters:
context- The request server context.id- The ID of the targeted resource within the collection.request- The read request.- Returns:
- A
Promisecontaining the result of the operation. - See Also:
-