Package com.sodius.oslc.core.model
Class OslcCore.Finder<T>
- java.lang.Object
-
- com.sodius.oslc.core.model.OslcCore.Finder<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OslcCore.Finder<T>
defaultUsage()
Filters the capabilities to retain only the ones whose usage is"http://open-services.net/ns/core#default"
.OslcCore.Finder<T>
domain(URI domain)
Filters the services to retain only the ones declaring given domain.OslcCore.Finder<T>
excludeResourceType(URI resourceType)
Filters the capabilities to reject the ones declaring given resource type.OslcCore.Finder<T>
excludeUsage(URI usage)
Filters the capabilities to reject the ones declaring given usage.List<T>
findAll()
Returns all capabilities matching the specified criteria.T
findFirst()
Returns the first capability matching the specified criteria.static OslcCore.Finder<Dialog>
forCreationDialogs(Service service)
Returns a finder that can search for creation dialogs.static OslcCore.Finder<CreationFactory>
forCreationFactories(Service service)
Returns a finder that can search for creation factories.static OslcCore.Finder<QueryCapability>
forQueryCapabilities(Service service)
Returns a finder that can search for query capabilities.static OslcCore.Finder<Dialog>
forSelectionDialogs(Service service)
Returns a finder that can search for selection dialogs.static OslcCore.Finder<Service>
forServices(ServiceProvider serviceProvider)
Returns a finder that can search for services.OslcCore.Finder<T>
predicate(Predicate<T> predicate)
Filters the capabilities to retain only the ones verifying the given predicate.OslcCore.Finder<T>
resourceType(URI resourceType)
Filters the capabilities to retain only the ones declaring given resource type.OslcCore.Finder<T>
usage(URI usage)
Filters the capabilities to retain only the ones declaring given usage.
-
-
-
Method Detail
-
forServices
public static OslcCore.Finder<Service> forServices(ServiceProvider serviceProvider)
Returns a finder that can search for services.- Parameters:
serviceProvider
- the provider declaring services.- Returns:
- a finder that can search for services.
-
forSelectionDialogs
public static OslcCore.Finder<Dialog> forSelectionDialogs(Service service)
Returns a finder that can search for selection dialogs.- Parameters:
service
- the service declaring selection dialogs.- Returns:
- a finder that can search for selection dialogs.
-
forCreationDialogs
public static OslcCore.Finder<Dialog> forCreationDialogs(Service service)
Returns a finder that can search for creation dialogs.- Parameters:
service
- the service declaring creation dialogs.- Returns:
- a finder that can search for creation dialogs.
-
forCreationFactories
public static OslcCore.Finder<CreationFactory> forCreationFactories(Service service)
Returns a finder that can search for creation factories.- Parameters:
service
- the service declaring creation factories.- Returns:
- a finder that can search for creation factories.
-
forQueryCapabilities
public static OslcCore.Finder<QueryCapability> forQueryCapabilities(Service service)
Returns a finder that can search for query capabilities.- Parameters:
service
- the service declaring query capabilities.- Returns:
- a finder that can search for query capabilities.
-
defaultUsage
public final OslcCore.Finder<T> defaultUsage()
Filters the capabilities to retain only the ones whose usage is"http://open-services.net/ns/core#default"
.- Returns:
- the finder instance.
-
domain
public final OslcCore.Finder<T> domain(URI domain)
Filters the services to retain only the ones declaring given domain.- Parameters:
domain
- the domain that the services must define.- Returns:
- the find instance.
-
usage
public final OslcCore.Finder<T> usage(URI usage)
Filters the capabilities to retain only the ones declaring given usage.- Parameters:
usage
- the usage that the capabilities must declare.- Returns:
- the finder instance.
-
excludeUsage
public final OslcCore.Finder<T> excludeUsage(URI usage)
Filters the capabilities to reject the ones declaring given usage.- Parameters:
usage
- the usage that the capabilities must not declare.- Returns:
- the finder instance.
- Since:
- 1.11.0
-
resourceType
public final OslcCore.Finder<T> resourceType(URI resourceType)
Filters the capabilities to retain only the ones declaring given resource type.- Parameters:
resourceType
- the resource type the capabilities must declare.- Returns:
- the finder instance.
-
excludeResourceType
public final OslcCore.Finder<T> excludeResourceType(URI resourceType)
Filters the capabilities to reject the ones declaring given resource type.- Parameters:
resourceType
- the resource type the capabilities must not declare.- Returns:
- the finder instance.
- Since:
- 1.11.0
-
predicate
public final OslcCore.Finder<T> predicate(Predicate<T> predicate)
Filters the capabilities to retain only the ones verifying the given predicate.- Parameters:
predicate
- the predicate the capabilities must verify.- Returns:
- the finder instance.
- Since:
- 1.11.0
-
findAll
public final List<T> findAll()
Returns all capabilities matching the specified criteria.- Returns:
- the list of capabilities matching the specified criteria.
-
findFirst
public final T findFirst()
Returns the first capability matching the specified criteria.- Returns:
- the first capability matching the specified criteria,
null
if none.
-
-