public interface EntityFacade<T>
| Modifier and Type | Method and Description |
|---|---|
EntityExcerpt |
createExcerpt(T nativeEntity)
Create an excerpt (id, type, title) of a native entity for display purposes.
|
NativeEntity<T> |
createNativeEntity(Entity entity,
Map<String,ValueReference> parameters,
Map<EntityDescriptor,Object> nativeEntities,
String username)
Create a native entity of type
T from an entity model. |
void |
delete(T nativeEntity)
Delete the given native entity.
|
Optional<Entity> |
exportEntity(EntityDescriptor entityDescriptor,
EntityDescriptorIds entityDescriptorIds)
Create an exportable model of a native entity referenced by an
EntityDescriptor
including optional constraints. |
default Optional<NativeEntity<T>> |
findExisting(Entity entity,
Map<String,ValueReference> parameters)
Find an existing instance of the native entity described by the entity model.
|
Set<EntityExcerpt> |
listEntityExcerpts()
Create entity excerpts of all native entities of type
T. |
Optional<NativeEntity<T>> |
loadNativeEntity(NativeEntityDescriptor nativeEntityDescriptor)
Loads the native entity instance for the given native entity descriptor.
|
default com.google.common.graph.Graph<Entity> |
resolveForInstallation(Entity entity,
Map<String,ValueReference> parameters,
Map<EntityDescriptor,Entity> entities)
Create the dependency graph of an entity described by the given entity model during content pack installation.
|
default com.google.common.graph.Graph<EntityDescriptor> |
resolveNativeEntity(EntityDescriptor entityDescriptor)
Create the dependency graph of a native entity described by the given entity descriptor.
|
Optional<Entity> exportEntity(EntityDescriptor entityDescriptor, EntityDescriptorIds entityDescriptorIds)
EntityDescriptor
including optional constraints.entityDescriptor - the descriptor of the native entity to exportentityDescriptorIds - the IDs for all entity descriptorsOptional.empty() if the entity couldn't be found.NativeEntity<T> createNativeEntity(Entity entity, Map<String,ValueReference> parameters, Map<EntityDescriptor,Object> nativeEntities, String username) throws InvalidRangeParametersException
T from an entity model.entity - the entity model from which a native entity should be createdparameters - user-provided parameters to resolve parameters in the entity modelnativeEntities - existing native entities to reference during the creation of the native entityusername - the name of the user creating the entityNativeEntityInvalidRangeParametersExceptionEntity,
NativeEntitydefault Optional<NativeEntity<T>> findExisting(Entity entity, Map<String,ValueReference> parameters)
entity - the entity model from which a native entity should be createdparameters - user-provided parameters to resolve parameters in the entity modelNativeEntity,
or Optional.empty() if the entity couldn't be found.Entity,
NativeEntityOptional<NativeEntity<T>> loadNativeEntity(NativeEntityDescriptor nativeEntityDescriptor)
nativeEntityDescriptor - the native entity descriptorNativeEntity,
or Optional.empty() if the native entity doesn't exist.void delete(T nativeEntity)
nativeEntity - The native entity to deleteEntityExcerpt createExcerpt(T nativeEntity)
nativeEntity - The native entity to create an excerpt ofEntityExcerptSet<EntityExcerpt> listEntityExcerpts()
T.TEntityExcerptdefault com.google.common.graph.Graph<EntityDescriptor> resolveNativeEntity(EntityDescriptor entityDescriptor)
entityDescriptor - the descriptor of the native entity to resolve dependencies forGraphdefault com.google.common.graph.Graph<Entity> resolveForInstallation(Entity entity, Map<String,ValueReference> parameters, Map<EntityDescriptor,Entity> entities)
entity - the entity model to resolve dependencies forGraphCopyright © 2012–2021 Graylog, Inc.. All rights reserved.