createContentUpdater static method
- ContentType type
Creates a content updater for the given content type.
After creation, the content updater must be started by calling the ContentUpdater.update The content updater supports operation resume between SDK running sessions.
To check if there is a pending update operation started in a previous SDK session, user must do the following steps:
- create an updater with createContentUpdater
- check if ContentUpdater.status, if status != ContentUpdaterStatus.idle there is a pending update which can be resumed by calling ContentUpdater.update
Parameters
- IN type Content list type (see ContentType)
Returns
- Pair composed of the ContentUpdater object and the GemError. If a content updater already exists, it is returned together with GemError.exist.
Throws
- An exception if it fails to initialize.
Implementation
static Pair<ContentUpdater, GemError> createContentUpdater(
final ContentType type,
) {
final OperationResult resultString = objectMethod(
0,
'ContentStore',
'createContentUpdater',
args: type.id,
);
final dynamic result = resultString['result'];
return Pair<ContentUpdater, GemError>(
ContentUpdater.init(result['first'], 0),
GemErrorExtension.fromCode(result['second']),
);
}