public class InputServiceImpl extends PersistedServiceImpl implements InputService
mongoConnection
Constructor and Description |
---|
InputServiceImpl(MongoConnection mongoConnection,
ExtractorFactory extractorFactory,
ConverterFactory converterFactory,
MessageInputFactory messageInputFactory,
ClusterEventBus clusterEventBus) |
collection, collection, count, count, cursorToList, destroy, destroyAll, destroyAll, destroyAll, embed, findOne, findOne, findOne, findOne, get, get, get, query, query, query, query, query, removeEmbedded, removeEmbedded, totalCount, totalCount, validate, validate, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroyAll, validate, validate, validate
@Inject public InputServiceImpl(MongoConnection mongoConnection, ExtractorFactory extractorFactory, ConverterFactory converterFactory, MessageInputFactory messageInputFactory, ClusterEventBus clusterEventBus)
public List<Input> all()
all
in interface InputService
public List<Input> allOfThisNode(String nodeId)
allOfThisNode
in interface InputService
public <T extends Persisted> String save(T model) throws ValidationException
save
in interface PersistedService
save
in class PersistedServiceImpl
ValidationException
public String update(Input model) throws ValidationException
update
in interface InputService
ValidationException
public <T extends Persisted> String saveWithoutValidation(T model)
saveWithoutValidation
in interface PersistedService
saveWithoutValidation
in class PersistedServiceImpl
public <T extends Persisted> int destroy(T model)
destroy
in interface PersistedService
destroy
in class PersistedServiceImpl
public Input create(String id, Map<String,Object> fields)
create
in interface InputService
public Input create(Map<String,Object> fields)
create
in interface InputService
public Input find(String id) throws NotFoundException
find
in interface InputService
NotFoundException
public Input findForThisNodeOrGlobal(String nodeId, String id) throws NotFoundException
findForThisNodeOrGlobal
in interface InputService
NotFoundException
public Input findForThisNode(String nodeId, String id) throws NotFoundException, IllegalArgumentException
findForThisNode
in interface InputService
NotFoundException
IllegalArgumentException
public void addExtractor(Input input, Extractor extractor) throws ValidationException
addExtractor
in interface InputService
ValidationException
public void updateExtractor(Input input, Extractor extractor) throws ValidationException
updateExtractor
in interface InputService
ValidationException
public void addStaticField(Input input, String key, String value) throws ValidationException
addStaticField
in interface InputService
ValidationException
public List<Map.Entry<String,String>> getStaticFields(Input input)
getStaticFields
in interface InputService
public List<Extractor> getExtractors(Input input)
getExtractors
in interface InputService
public Extractor getExtractor(Input input, String extractorId) throws NotFoundException
getExtractor
in interface InputService
NotFoundException
public void removeExtractor(Input input, String extractorId)
removeExtractor
in interface InputService
public void removeStaticField(Input input, String key)
removeStaticField
in interface InputService
public MessageInput getMessageInput(Input io) throws NoSuchInputTypeException
getMessageInput
in interface InputService
NoSuchInputTypeException
public long totalCount()
totalCount
in interface InputService
public long globalCount()
globalCount
in interface InputService
public long localCount()
localCount
in interface InputService
public Map<String,Long> totalCountByType()
totalCountByType
in interface InputService
public long localCountForNode(String nodeId)
localCountForNode
in interface InputService
nodeId
- the node ID to querypublic long totalCountForNode(String nodeId)
totalCountForNode
in interface InputService
nodeId
- the node ID to querypublic long totalExtractorCount()
totalExtractorCount
in interface InputService
public Map<Extractor.Type,Long> totalExtractorCountByType()
totalExtractorCountByType
in interface InputService
Copyright © 2012–2018 Graylog, Inc.. All rights reserved.