public abstract class ListLinkHandlerFactory extends LinkHandlerFactory
Constructor and Description |
---|
ListLinkHandlerFactory() |
Modifier and Type | Method and Description |
---|---|
ListLinkHandler |
fromId(String id) |
ListLinkHandler |
fromId(String id,
String baseUrl) |
ListLinkHandler |
fromQuery(String id,
List<String> contentFilters,
String sortFilter) |
ListLinkHandler |
fromQuery(String id,
List<String> contentFilters,
String sortFilter,
String baseUrl) |
ListLinkHandler |
fromUrl(String url)
Builds a
LinkHandler from a url.Be sure to call Utils.followGoogleRedirectIfNeeded(String) on the url if overriding
this function. |
ListLinkHandler |
fromUrl(String url,
String baseUrl)
Builds a
LinkHandler from an URL and a base URL. |
String[] |
getAvailableContentFilter()
Will returns content filter the corresponding extractor can handle like "channels", "videos",
"music", etc.
|
String[] |
getAvailableSortFilter()
Will returns sort filter the corresponding extractor can handle like "A-Z", "oldest first",
"size", etc.
|
String |
getUrl(String id)
For making ListLinkHandlerFactory compatible with LinkHandlerFactory we need to override
this, however it should not be overridden by the actual implementation.
|
abstract String |
getUrl(String id,
List<String> contentFilter,
String sortFilter) |
String |
getUrl(String id,
List<String> contentFilter,
String sortFilter,
String baseUrl) |
String |
getUrl(String id,
String baseUrl) |
acceptUrl, getId, onAcceptUrl
public abstract String getUrl(String id, List<String> contentFilter, String sortFilter) throws ParsingException
ParsingException
public String getUrl(String id, List<String> contentFilter, String sortFilter, String baseUrl) throws ParsingException
ParsingException
public ListLinkHandler fromUrl(String url) throws ParsingException
LinkHandlerFactory
LinkHandler
from a url.Utils.followGoogleRedirectIfNeeded(String)
on the url if overriding
this function.fromUrl
in class LinkHandlerFactory
url
- the url to extract path and id fromLinkHandler
complete with informationParsingException
public ListLinkHandler fromUrl(String url, String baseUrl) throws ParsingException
LinkHandlerFactory
LinkHandler
from an URL and a base URL. The URL is expected to be already
polished from Google search redirects (otherwise how could baseUrl
have been
extracted?).Utils.followGoogleRedirectIfNeeded(String)
on the URL if overriding
this function, since that should be done in LinkHandlerFactory.fromUrl(String)
.fromUrl
in class LinkHandlerFactory
url
- the URL without Google search redirects to extract id frombaseUrl
- the base URLLinkHandler
complete with informationParsingException
public ListLinkHandler fromId(String id) throws ParsingException
fromId
in class LinkHandlerFactory
ParsingException
public ListLinkHandler fromId(String id, String baseUrl) throws ParsingException
fromId
in class LinkHandlerFactory
ParsingException
public ListLinkHandler fromQuery(String id, List<String> contentFilters, String sortFilter) throws ParsingException
ParsingException
public ListLinkHandler fromQuery(String id, List<String> contentFilters, String sortFilter, String baseUrl) throws ParsingException
ParsingException
public String getUrl(String id) throws ParsingException
getUrl
in class LinkHandlerFactory
ParsingException
public String getUrl(String id, String baseUrl) throws ParsingException
getUrl
in class LinkHandlerFactory
ParsingException
public String[] getAvailableContentFilter()
public String[] getAvailableSortFilter()