Class ServicesListQuery
java.lang.Object
org.opencastproject.list.api.DefaultResourceListQuery
org.opencastproject.list.common.query.ServicesListQuery
- All Implemented Interfaces:
ResourceListQuery
Query for the services list.
The following filters can be used:
- name
- host
- status
- actions
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringActions filter label.static final StringHostname filter label.static final StringName filter label.static final StringNodeName filter label.static final StringStatus filter label.static final StringActions filter name.static final StringHostname filter name.static final StringName 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 <Boolean> ResourceListFilter<Boolean> createActionsFilter(Optional<Boolean> value) Create a newResourceListFilterbased on any actions.static <String> ResourceListFilter<String> createFreeTextFilter(Optional<String> value) Create a newResourceListFilterbased on a free text.static <String> ResourceListFilter<String> createHostnameFilter(Optional<String> value) Create a newResourceListFilterbased on a hostname.static <String> ResourceListFilter<String> createNameFilter(Optional<String> value) Create a newResourceListFilterbased on a name.static ResourceListFilter<String> createNodeNameFilter(Optional<String> value) Create a newResourceListFilterbased on a nodeName.static <String> ResourceListFilter<String> createStatusFilter(Optional<String> value) Create a newResourceListFilterbased on a status.Returns anOptionalcontaining boolean value used to filter any actions if set.Returns anOptionalcontaining the free text used to filter if set.Returns anOptionalcontaining the hostname used to filter if set.getName()Returns anOptionalcontaining the name used to filter if set.Returns anOptionalcontaining the node name used to filter if set.Returns anOptionalcontaining the status used to filter if set.voidwithActions(Optional<Boolean> hasActions) Add aResourceListFilterfilter to the query with any actions.voidwithFreeText(Optional<String> freeText) Add aResourceListFilterfilter to the query with the given free text.voidwithHostname(Optional<String> hostname) Add aResourceListFilterfilter to the query with the given hostname.voidAdd aResourceListFilterfilter to the query with the given name.voidwithNodeName(String nodeName) Add aResourceListFilterfilter to the query with the given node name.voidwithStatus(Optional<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_NAME
Name filter name.- See Also:
-
FILTER_LABEL_NAME
Name filter label.- See Also:
-
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:
-
FILTER_NAME_ACTIONS
Actions filter name.- See Also:
-
FILTER_LABEL_ACTIONS
Actions filter label.- See Also:
-
-
Constructor Details
-
ServicesListQuery
public ServicesListQuery()Default constructor. -
ServicesListQuery
Copy constructor for the base classResourceListQuery.- Parameters:
query- copy values from the given query
-
-
Method Details
-
withName
Add aResourceListFilterfilter to the query with the given name.- Parameters:
name- the name to filter for
-
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
-
withActions
Add aResourceListFilterfilter to the query with any actions.- Parameters:
hasActions- any actions to filter
-
withFreeText
Add aResourceListFilterfilter to the query with the given free text.- Parameters:
freeText- the free text to filter for
-
getName
Returns anOptionalcontaining the name used to filter if set.Optional.empty()otherwise.- Returns:
- an
Optionalcontaining the name or none.
-
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.
-
getActions
Returns anOptionalcontaining boolean value used to filter any actions if set.Optional.empty()otherwise.- Returns:
- an
Optionalcontaining the boolean value for any actions or none.
-
getFreeText
Returns anOptionalcontaining the free text used to filter if set.Optional.empty()otherwise.- Returns:
- an
Optionalcontaining the free text or none.
-
createNameFilter
Create a newResourceListFilterbased on a name.- Parameters:
value- the name to filter on wrapped in anOptionalorOptional.empty()- Returns:
- a new
ResourceListFilterfor a name based query
-
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
-
createActionsFilter
Create a newResourceListFilterbased on any actions.- Parameters:
value- the boolean value for any action to filter on wrapped in anOptionalorOptional.empty()- Returns:
- a new
ResourceListFilterfor a any actions 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
-