Package com.contentful.java.cma
Class ModuleScheduledActions
- java.lang.Object
-
- com.contentful.java.cma.ModuleScheduledActions
-
public class ModuleScheduledActions extends java.lang.ObjectScheduled Actions Module.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classModuleScheduledActions.AsyncAsync module.
-
Constructor Summary
Constructors Constructor Description ModuleScheduledActions(retrofit2.Retrofit retrofit, java.util.concurrent.Executor callbackExecutor, java.lang.String spaceId, java.lang.String environmentId, boolean environmentIdConfigured)Create scheduled actions module.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModuleScheduledActions.Asyncasync()CMAScheduledActioncancel(java.lang.String scheduledActionId)Cancel a scheduled action.CMAScheduledActioncreate(CMAScheduledAction scheduledAction)Create a new scheduled action.protected com.contentful.java.cma.ServiceScheduledActionscreateService(retrofit2.Retrofit retrofit)CMAArray<CMAScheduledAction>fetchAll()Fetch all scheduled actions.CMAArray<CMAScheduledAction>fetchAll(java.lang.String spaceId, java.lang.String environmentId)Fetch all scheduled actions in the given space and environment.CMAScheduledActionfetchOne(java.lang.String scheduledActionId, java.lang.String entityId)Fetch a scheduled action by ID.CMAScheduledActionfetchOne(java.lang.String spaceId, java.lang.String environmentId, java.lang.String scheduledActionId, java.lang.String entityId)Fetch a scheduled action by ID from a specific space and environment.CMAScheduledActionupdate(java.lang.String scheduledActionId, CMAScheduledAction scheduledAction)Update an existing scheduled action.
-
-
-
Constructor Detail
-
ModuleScheduledActions
public ModuleScheduledActions(retrofit2.Retrofit retrofit, java.util.concurrent.Executor callbackExecutor, java.lang.String spaceId, java.lang.String environmentId, boolean environmentIdConfigured)Create scheduled actions module.- Parameters:
retrofit- the retrofit instance to be used to create the service.callbackExecutor- to tell on which thread it should run.spaceId- the space to be used when not given.environmentId- the environment to be used when not given.environmentIdConfigured- internal helper to see if environment was set.
-
-
Method Detail
-
createService
protected com.contentful.java.cma.ServiceScheduledActions createService(retrofit2.Retrofit retrofit)
-
fetchAll
public CMAArray<CMAScheduledAction> fetchAll()
Fetch all scheduled actions.- Returns:
CMAArrayresult instance- Throws:
java.lang.IllegalArgumentException- if spaceId or environmentId is null.
-
fetchAll
public CMAArray<CMAScheduledAction> fetchAll(java.lang.String spaceId, java.lang.String environmentId)
Fetch all scheduled actions in the given space and environment.- Parameters:
spaceId- Space IDenvironmentId- Environment ID- Returns:
CMAArrayof scheduled actions matching the query.- Throws:
java.lang.IllegalArgumentException- if spaceId, entityId, or environmentId is null.
-
fetchOne
public CMAScheduledAction fetchOne(java.lang.String scheduledActionId, java.lang.String entityId)
Fetch a scheduled action by ID.- Parameters:
scheduledActionId- Scheduled action IDentityId- Entity ID- Returns:
CMAScheduledActionresult instance- Throws:
java.lang.IllegalArgumentException- if spaceId, environmentId, or actionId is null.
-
fetchOne
public CMAScheduledAction fetchOne(java.lang.String spaceId, java.lang.String environmentId, java.lang.String scheduledActionId, java.lang.String entityId)
Fetch a scheduled action by ID from a specific space and environment.- Parameters:
spaceId- Space IDenvironmentId- Environment IDscheduledActionId- Scheduled action IDentityId- Entity ID- Returns:
CMAScheduledActionresult instance- Throws:
java.lang.IllegalArgumentException- if spaceId, environmentId, actionId, or entityId is null.
-
create
public CMAScheduledAction create(CMAScheduledAction scheduledAction)
Create a new scheduled action.- Returns:
CMAScheduledActionresult instance
-
update
public CMAScheduledAction update(java.lang.String scheduledActionId, CMAScheduledAction scheduledAction)
Update an existing scheduled action.- Parameters:
scheduledActionId- Scheduled action ID- Returns:
CMAScheduledActionresult instance
-
cancel
public CMAScheduledAction cancel(java.lang.String scheduledActionId)
Cancel a scheduled action.- Parameters:
scheduledActionId- Scheduled action ID- Returns:
CMAScheduledActionresult instance
-
async
public ModuleScheduledActions.Async async()
- Returns:
- a module with a set of asynchronous methods.
-
-