Class ServersListQuery
java.lang.Object
org.opencastproject.list.api.DefaultResourceListQuery
org.opencastproject.list.common.query.ServersListQuery
- All Implemented Interfaces:
ResourceListQuery
Query for the servers list.
The following filters can be used:
- hostname
- status
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringHostname filter label.static final StringNodeName filter label.static final StringStatus filter label.static final StringHostname filter name.static final StringNodeName filter name.static final StringStatus filter name.Fields inherited from class org.opencastproject.list.api.DefaultResourceListQuery
availableFilters, sortBy -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.Copy constructor for the base classResourceListQuery. -
Method Summary
Modifier and TypeMethodDescriptionstatic <String> ResourceListFilter<String> createFreeTextFilter(Optional<String> value) Create a newResourceListFilterbased on a free text.static ResourceListFilter<String> createHostnameFilter(Optional<String> value) Create a newResourceListFilterbased on a hostname.static ResourceListFilter<String> createNodeNameFilter(Optional<String> value) Create a newResourceListFilterbased on a nodeName.static ResourceListFilter<String> createStatusFilter(Optional<String> value) Create a newResourceListFilterbased on a status.Returns anOptionalcontaining the free text used to filter if set.Returns anOptionalcontaining the hostname used to filter if set.Returns anOptionalcontaining the node name used to filter if set.Returns anOptionalcontaining the status used to filter if set.voidwithFreeText(String freeText) Add aResourceListFilterfilter to the query with the given free text.voidwithHostname(String hostname) Add aResourceListFilterfilter to the query with the given hostname.voidwithNodeName(String nodeName) Add aResourceListFilterfilter to the query with the given node name.voidwithStatus(String status) Add aResourceListFilterfilter to the query with the given status.Methods inherited from class org.opencastproject.list.api.DefaultResourceListQuery
addFilter, getAvailableFilters, getFilter, getFilters, getFilterValue, getLimit, getOffset, getSortBy, hasFilter, removeFilter, setLimit, setOffset
-
Field Details
-
FILTER_NAME_HOSTNAME
Hostname filter name.- See Also:
-
FILTER_LABEL_HOSTNAME
Hostname filter label.- See Also:
-
FILTER_NAME_NODE_NAME
NodeName filter name.- See Also:
-
FILTER_LABEL_NODE_NAME
NodeName filter label.- See Also:
-
FILTER_NAME_STATUS
Status filter name.- See Also:
-
FILTER_LABEL_STATUS
Status filter label.- See Also:
-
-
Constructor Details
-
ServersListQuery
public ServersListQuery()Default constructor. -
ServersListQuery
Copy constructor for the base classResourceListQuery.- Parameters:
query- copy values from the given query
-
-
Method Details
-
withHostname
Add aResourceListFilterfilter to the query with the given hostname.- Parameters:
hostname- the hostname to filter for
-
withNodeName
Add aResourceListFilterfilter to the query with the given node name.- Parameters:
nodeName- the node name to filter for
-
withStatus
Add aResourceListFilterfilter to the query with the given status.- Parameters:
status- the status to filter for
-
withFreeText
Add aResourceListFilterfilter to the query with the given free text.- Parameters:
freeText- the free text to filter for
-
getHostname
Returns anOptionalcontaining the hostname used to filter if set.Optional.empty()otherwise.- Returns:
- an
Optionalcontaining the hostname or none.
-
getNodeName
Returns anOptionalcontaining the node name used to filter if set.Optional.empty()otherwise.- Returns:
- an
Optionalcontaining the node name or none.
-
getStatus
Returns anOptionalcontaining the status used to filter if set.Optional.empty()otherwise.- Returns:
- an
Optionalcontaining the status or none.
-
getFreeText
Returns anOptionalcontaining the free text used to filter if set.Optional.empty()otherwise.- Returns:
- an
Optionalcontaining the free text or none.
-
createHostnameFilter
Create a newResourceListFilterbased on a hostname.- Parameters:
value- the hostname to filter on wrapped in anOptionalorOptional.empty()- Returns:
- a new
ResourceListFilterfor a hostname based query
-
createNodeNameFilter
Create a newResourceListFilterbased on a nodeName.- Parameters:
value- the nodeName to filter on wrapped in anOptionalorOptional.empty()- Returns:
- a new
ResourceListFilterfor a nodeName based query
-
createStatusFilter
Create a newResourceListFilterbased on a status.- Parameters:
value- the status to filter on wrapped in anOptionalorOptional.empty()- Returns:
- a new
ResourceListFilterfor a status based query
-
createFreeTextFilter
Create a newResourceListFilterbased on a free text.- Parameters:
value- the free text to filter on wrapped in anOptionalorOptional.empty()- Returns:
- a new
ResourceListFilterfor a free text based query
-