T
- type of the expected query resultpublic abstract class DefinitionQuery<T> extends Object
Constructor and Description |
---|
DefinitionQuery() |
Modifier and Type | Method and Description |
---|---|
DefinitionQuery<T> |
at(Pattern locationRegexPattern) |
DefinitionQuery<T> |
at(String locationRegexPattern) |
abstract Collection<DefinitionProvider<T>> |
findMultiple()
Returns all providers matching the given criteria or an empty collection if there are no matches.
|
DefinitionProvider<T> |
findSingle()
Returns a single provider matching the criteria or throws an exception if not unique.
|
DefinitionQuery<T> |
from(String moduleName) |
Pattern |
getLocationPattern() |
String |
getModule() |
String |
getName() |
DefinitionType |
getType() |
DefinitionQuery<T> |
named(String defName) |
DefinitionQuery<T> |
ofType(DefinitionType type) |
String |
toString() |
public DefinitionQuery<T> from(String moduleName)
public DefinitionQuery<T> named(String defName)
public DefinitionQuery<T> ofType(DefinitionType type)
public DefinitionQuery<T> at(String locationRegexPattern)
public DefinitionQuery<T> at(Pattern locationRegexPattern)
public String getModule()
public String getName()
public DefinitionType getType()
public Pattern getLocationPattern()
public DefinitionProvider<T> findSingle()
Registry.NoSuchDefinitionException
- (which is a RuntimeException) if the query doesn't match any definition.public abstract Collection<DefinitionProvider<T>> findMultiple()
Copyright © 2003–2016 Magnolia International Ltd.. All rights reserved.