Package se.conciliate.extensions.content
Interface RestContext
public interface RestContext
Loads and makes available a set of data for a context within
the current workspace. All of the data in the context is loaded
before it can be used, which makes this useful for operations
such as exporting and publishing data. Note that individual
chunks of data might be serialized to disk to keep down the
memory footprint. This should be transparent to clients of
the context other than that data should not be fetched on the EDT.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionattribute
(long id) void
dispose()
Disposes of the context.Deprecated.Deprecated.Deprecated.Deprecated.documentType
(long id) documentType
(String uuid) boolean
isLoaded()
returns true if the context is loadedvoid
load
(BiConsumer<String, Integer> progress) Loads all data in the context.void
loadAdditionalModels
(Collection<Long> modelIDs) Adds more models and loads data for added models in an already loaded context.void
loadAdditionalObjects
(Collection<Long> objectIDs) Adds more objects and loads data for added models in an already loaded context.model
(long id) modelIDs()
models()
modelsContainingObject
(String uuid) object
(long id) objects()
-
Method Details
-
load
Loads all data in the context.- Parameters:
progress
- Progress callback with message and percent of completion. A percent value of -1 means that the current stage is indeterminate.
-
isLoaded
boolean isLoaded()returns true if the context is loaded -
loadAdditionalModels
Adds more models and loads data for added models in an already loaded context.- Parameters:
modelIDs
- The set of models to be added in to the context. is indeterminate.
-
loadAdditionalObjects
Adds more objects and loads data for added models in an already loaded context. Also loads a model that uses the newly loaded objects.- Parameters:
objectIDs
- The set of objects to be added in to the context. is indeterminate.
-
dispose
void dispose()Disposes of the context. Always do this when not using it anymore to make sure the context is not remaining in db storage. -
modelIDs
-
model
-
model
-
models
-
objectIDs
-
objects
Stream<RestObject> objects() -
object
-
object
-
modelsContainingObject
-
documentType
-
documentType
-
attribute
-
attribute
-
layer
-
layer
-
document
Deprecated. -
document
Deprecated. -
document
Deprecated. -
documents
Deprecated.
-