public class PipelineRuleFacade extends Object implements EntityFacade<RuleDao>
| Constructor and Description |
|---|
PipelineRuleFacade(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
RuleService ruleService) |
| Modifier and Type | Method and Description |
|---|---|
EntityExcerpt |
createExcerpt(RuleDao ruleDao)
Create an excerpt (id, type, title) of a native entity for display purposes.
|
NativeEntity<RuleDao> |
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(RuleDao 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. |
Optional<NativeEntity<RuleDao>> |
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<RuleDao>> |
loadNativeEntity(NativeEntityDescriptor nativeEntityDescriptor)
Loads the native entity instance for the given native entity descriptor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresolveForInstallation, resolveNativeEntitypublic static final ModelType TYPE_V1
@Inject
public PipelineRuleFacade(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
RuleService ruleService)
public NativeEntity<RuleDao> createNativeEntity(Entity entity, Map<String,ValueReference> parameters, Map<EntityDescriptor,Object> nativeEntities, String username)
EntityFacadeT from an entity model.createNativeEntity in interface EntityFacade<RuleDao>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 entityNativeEntityEntity,
NativeEntitypublic Optional<NativeEntity<RuleDao>> loadNativeEntity(NativeEntityDescriptor nativeEntityDescriptor)
EntityFacadeloadNativeEntity in interface EntityFacade<RuleDao>nativeEntityDescriptor - the native entity descriptorNativeEntity,
or Optional.empty() if the native entity doesn't exist.public void delete(RuleDao nativeEntity)
EntityFacadedelete in interface EntityFacade<RuleDao>nativeEntity - The native entity to deletepublic Optional<NativeEntity<RuleDao>> findExisting(Entity entity, Map<String,ValueReference> parameters)
EntityFacadefindExisting in interface EntityFacade<RuleDao>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,
NativeEntitypublic EntityExcerpt createExcerpt(RuleDao ruleDao)
EntityFacadecreateExcerpt in interface EntityFacade<RuleDao>ruleDao - The native entity to create an excerpt ofEntityExcerptpublic Set<EntityExcerpt> listEntityExcerpts()
EntityFacadeT.listEntityExcerpts in interface EntityFacade<RuleDao>TEntityExcerptpublic Optional<Entity> exportEntity(EntityDescriptor entityDescriptor, EntityDescriptorIds entityDescriptorIds)
EntityFacadeEntityDescriptor
including optional constraints.exportEntity in interface EntityFacade<RuleDao>entityDescriptor - the descriptor of the native entity to exportentityDescriptorIds - the IDs for all entity descriptorsOptional.empty() if the entity couldn't be found.Copyright © 2012–2021 Graylog, Inc.. All rights reserved.