android-components / / SearchUseCases


class SearchUseCases (source)

Contains use cases related to the search feature.


onNoSession - When invoking a use case that requires a (selected) Session and when no Session is available this (optional) lambda will be invoked to create a Session. The default implementation creates a Session and adds it to the SessionManager.


Name Summary
DefaultSearchUseCase class DefaultSearchUseCase : SearchUseCase
NewTabSearchUseCase class NewTabSearchUseCase : SearchUseCase
SearchUseCase interface SearchUseCase


| Name | Summary | |—|—| | <init> | SearchUseCases(context: <ERROR CLASS>, searchEngineManager: SearchEngineManager, sessionManager: SessionManager, onNoSession: (String) -> Session = { url -> Session(url).apply { sessionManager.add(this) } })
Contains use cases related to the search feature. |


Name Summary
defaultSearch val defaultSearch: DefaultSearchUseCase
newPrivateTabSearch val newPrivateTabSearch: NewTabSearchUseCase
newTabSearch val newTabSearch: NewTabSearchUseCase

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.