Interface EntityWithExcerptFacade<EntityClass,ExcerptClass>
- All Known Subinterfaces:
EntityFacade<T>
- All Known Implementing Classes:
DashboardFacade
,DashboardV1Facade
,EventDefinitionFacade
,GrokPatternFacade
,InputFacade
,LookupCacheFacade
,LookupDataAdapterFacade
,LookupTableFacade
,NotificationFacade
,OutputFacade
,PipelineFacade
,PipelineRuleFacade
,RootEntityFacade
,SearchFacade
,SidecarCollectorConfigurationFacade
,SidecarCollectorFacade
,StreamFacade
,UnsupportedEntityFacade
,UrlWhitelistFacade
,ViewFacade
public interface EntityWithExcerptFacade<EntityClass,ExcerptClass>
-
Method Summary
Modifier and TypeMethodDescriptioncreateExcerpt
(ExcerptClass nativeEntity) Create an excerpt (id, type, title) of a native entity for display purposes.createNativeEntity
(Entity entity, Map<String, ValueReference> parameters, Map<EntityDescriptor, Object> nativeEntities, String username) Create a native entity of typeT
from an entity model.void
delete
(EntityClass nativeEntity) Delete the given native entity.exportEntity
(EntityDescriptor entityDescriptor, EntityDescriptorIds entityDescriptorIds) Create an exportable model of a native entity referenced by anEntityDescriptor
including optional constraints.default Optional<NativeEntity<EntityClass>>
findExisting
(Entity entity, Map<String, ValueReference> parameters) Find an existing instance of the native entity described by the entity model.Create entity excerpts of all native entities of typeT
.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.default boolean
The implementing facade should return true if the corresponding database entity supports scopes by extendingScopedEntity
.
-
Method Details
-
exportEntity
Optional<Entity> exportEntity(EntityDescriptor entityDescriptor, EntityDescriptorIds entityDescriptorIds) Create an exportable model of a native entity referenced by anEntityDescriptor
including optional constraints.- Parameters:
entityDescriptor
- the descriptor of the native entity to exportentityDescriptorIds
- the IDs for all entity descriptors- Returns:
- an exportable (serializable) model of the entity including optional constraints,
or
Optional.empty()
if the entity couldn't be found.
-
createNativeEntity
NativeEntity<EntityClass> createNativeEntity(Entity entity, Map<String, ValueReference> parameters, Map<EntityDescriptor, throws InvalidRangeParametersExceptionObject> nativeEntities, String username) Create a native entity of typeT
from an entity model.- Parameters:
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 entity- Returns:
- the created native entity wrapped in
- Throws:
InvalidRangeParametersException
- See Also:
-
findExisting
default Optional<NativeEntity<EntityClass>> findExisting(Entity entity, Map<String, ValueReference> parameters) Find an existing instance of the native entity described by the entity model.- Parameters:
entity
- the entity model from which a native entity should be createdparameters
- user-provided parameters to resolve parameters in the entity model- Returns:
- the existing native entity in the database wrapped in
NativeEntity<T>
, orOptional.empty()
if the entity couldn't be found. - See Also:
-
loadNativeEntity
Loads the native entity instance for the given native entity descriptor.- Parameters:
nativeEntityDescriptor
- the native entity descriptor- Returns:
- the existing native entity in the database wrapped in
NativeEntity<T>
, orOptional.empty()
if the native entity doesn't exist.
-
delete
Delete the given native entity.- Parameters:
nativeEntity
- The native entity to delete
-
createExcerpt
Create an excerpt (id, type, title) of a native entity for display purposes.- Parameters:
nativeEntity
- The native entity to create an excerpt of- Returns:
- The entity excerpt of the native entity
- See Also:
-
listEntityExcerpts
Set<EntityExcerpt> listEntityExcerpts()Create entity excerpts of all native entities of typeT
.- Returns:
- A collection of entity excerpts of all native entities of type
T
- See Also:
-
resolveNativeEntity
default com.google.common.graph.Graph<EntityDescriptor> resolveNativeEntity(EntityDescriptor entityDescriptor) Create the dependency graph of a native entity described by the given entity descriptor.- Parameters:
entityDescriptor
- the descriptor of the native entity to resolve dependencies for- Returns:
- A directed graph of the native entity with entity descriptors as nodes.
- See Also:
-
Graph
-
resolveForInstallation
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.- Parameters:
entity
- the entity model to resolve dependencies for- Returns:
- A directed graph of the native entity with entity models as nodes.
- See Also:
-
Graph
-
usesScopedEntities
default boolean usesScopedEntities()The implementing facade should return true if the corresponding database entity supports scopes by extendingScopedEntity
. This provides scope awareness within the implementing facade.
-