public final class ModuleRoles.Async
extends java.lang.Object
Constructor and Description |
---|
Async() |
Modifier and Type | Method and Description |
---|---|
CMACallback<CMARole> |
create(CMARole role,
CMACallback<CMARole> callback)
Asynchronously create a new role.
|
CMACallback<CMARole> |
create(java.lang.String spaceId,
CMARole role,
CMACallback<CMARole> callback)
Asynchronously create a new role.
|
CMACallback<java.lang.Integer> |
delete(CMARole role,
CMACallback<java.lang.Integer> callback)
Delete the given role instance asynchronously.
|
CMACallback<CMAArray<CMARole>> |
fetchAll(CMACallback<CMAArray<CMARole>> callback)
Fetch all roles of this space, asynchronously.
|
CMACallback<CMAArray<CMARole>> |
fetchAll(java.util.Map<java.lang.String,java.lang.String> query,
CMACallback<CMAArray<CMARole>> callback)
Fetch specific roles of this space.
|
CMACallback<CMAArray<CMARole>> |
fetchAll(java.lang.String spaceId,
CMACallback<CMAArray<CMARole>> callback)
Fetch all roles of this space, asynchronously.
|
CMACallback<CMAArray<CMARole>> |
fetchAll(java.lang.String spaceId,
java.util.Map<java.lang.String,java.lang.String> query,
CMACallback<CMAArray<CMARole>> callback)
Fetch specific roles of this space.
|
CMACallback<CMARole> |
fetchOne(java.lang.String roleId,
CMACallback<CMARole> callback)
Fetches one role by its id from Contentful asynchronously.
|
CMACallback<CMARole> |
fetchOne(java.lang.String spaceId,
java.lang.String roleId,
CMACallback<CMARole> callback)
Fetches one role by its id from Contentful asynchronously.
|
CMACallback<CMARole> |
update(CMARole role,
CMACallback<CMARole> callback)
Update the given role instance on Contentful, asynchronously.
|
public CMACallback<CMAArray<CMARole>> fetchAll(CMACallback<CMAArray<CMARole>> callback)
callback
- a callback to be called, once the results are present.java.lang.IllegalArgumentException
- if spaceId is null.CMANotWithEnvironmentsException
- if environmentId was set using
CMAClient.Builder.setEnvironmentId(String)
.ModuleRoles.fetchAll(String)
public CMACallback<CMAArray<CMARole>> fetchAll(java.lang.String spaceId, CMACallback<CMAArray<CMARole>> callback)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)
and will ignore
CMAClient.Builder.setEnvironmentId(String)
.
spaceId
- the space identifier identifying the space.callback
- a callback to be called, once the results are present.java.lang.IllegalArgumentException
- if spaceId is null.ModuleRoles.fetchAll(String)
public CMACallback<CMAArray<CMARole>> fetchAll(java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMARole>> callback)
query
- the search criteria to search for.callback
- the callback to be informed about success or failure.java.lang.IllegalArgumentException
- if configured spaceId is null.CMANotWithEnvironmentsException
- if environmentId was set using
CMAClient.Builder.setEnvironmentId(String)
.CMAClient.Builder.setSpaceId(String)
,
ModuleRoles.fetchAll(String)
public CMACallback<CMAArray<CMARole>> fetchAll(java.lang.String spaceId, java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMARole>> callback)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)
and will ignore
CMAClient.Builder.setEnvironmentId(String)
.
spaceId
- the space identifier identifying the space.query
- the search criteria to search for.callback
- the callback to be informed about success or failure.java.lang.IllegalArgumentException
- if spaceId is null.ModuleRoles.fetchAll(String)
public CMACallback<CMARole> fetchOne(java.lang.String spaceId, java.lang.String roleId, CMACallback<CMARole> callback)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)
and will ignore
CMAClient.Builder.setEnvironmentId(String)
.
spaceId
- the space this role is hosted by.roleId
- the id of the role to be found.callback
- a callback to be called, once the results are present.java.lang.IllegalArgumentException
- if space id is null.java.lang.IllegalArgumentException
- if role id is null.ModuleRoles.fetchOne(String, String)
public CMACallback<CMARole> fetchOne(java.lang.String roleId, CMACallback<CMARole> callback)
roleId
- the id of the role to be found.callback
- a callback to be called, once the results are present.java.lang.IllegalArgumentException
- if space id is null.java.lang.IllegalArgumentException
- if role id is null.CMANotWithEnvironmentsException
- if environmentId was set using
CMAClient.Builder.setEnvironmentId(String)
.CMAClient.Builder.setSpaceId(String)
,
ModuleRoles.fetchOne(String, String)
public CMACallback<CMARole> create(java.lang.String spaceId, CMARole role, CMACallback<CMARole> callback)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)
and will ignore
CMAClient.Builder.setEnvironmentId(String)
.
spaceId
- the space id to host the role.role
- the new role to be created.callback
- a callback to be called, once the results are present.java.lang.IllegalArgumentException
- if space id is null.java.lang.IllegalArgumentException
- if role is null.ModuleRoles.create(String, CMARole)
public CMACallback<CMARole> create(CMARole role, CMACallback<CMARole> callback)
role
- the new role to be created.callback
- a callback to be called, once the results are present.java.lang.IllegalArgumentException
- if space id is null.java.lang.IllegalArgumentException
- if role is null.CMANotWithEnvironmentsException
- if environmentId was set using
CMAClient.Builder.setEnvironmentId(String)
.CMAClient.Builder.setSpaceId(String)
,
ModuleRoles.create(String, CMARole)
public CMACallback<CMARole> update(CMARole role, CMACallback<CMARole> callback)
Please make sure that the instance provided is fetched from Contentful. Otherwise you will get an exception thrown.
role
- the role fetched from Contentful, updated by caller, to be updated.callback
- a callback to be called, once the results are present.java.lang.IllegalArgumentException
- if space id is null.java.lang.IllegalArgumentException
- if role is null.java.lang.IllegalArgumentException
- if role id is null.java.lang.IllegalArgumentException
- if role does not have a version attached.ModuleRoles.update(CMARole)
public CMACallback<java.lang.Integer> delete(CMARole role, CMACallback<java.lang.Integer> callback)
Please make sure that the instance provided is fetched from Contentful. Otherwise you will get an exception thrown.
role
- the role fetched from Contentful, updated by caller, to be deleted.callback
- a callback to be called, once the results are present.java.lang.IllegalArgumentException
- if space id is null.java.lang.IllegalArgumentException
- if role id is null.ModuleRoles.delete(CMARole)
Copyright © 2019 Contentful, GmbH.. All Rights Reserved.