org.xwiki.extension.script.internal.safe
Class SafeSearchableExtensionRepository<T extends ExtensionRepository>
java.lang.Object
org.xwiki.extension.wrap.AbstractWrappingObject<T>
org.xwiki.extension.internal.safe.AbstractSafeObject<T>
org.xwiki.extension.script.internal.safe.AbstractNoExceptionSafeObject<T>
org.xwiki.extension.script.internal.safe.SafeExtensionRepository<T>
org.xwiki.extension.script.internal.safe.SafeSearchableExtensionRepository<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- ExtensionRepository, Searchable
- Direct Known Subclasses:
- SafeCoreExtensionRepository, SafeInstalledExtensionRepository, SafeLocalExtensionRepository
public class SafeSearchableExtensionRepository<T extends ExtensionRepository>
- extends SafeExtensionRepository<T>
- implements Searchable
Provide a public script access to a Searchable
extension repository.
SafeSearchableExtensionRepository
public SafeSearchableExtensionRepository(T repository,
ScriptSafeProvider<?> safeProvider,
Execution execution,
boolean hasProgrammingRight)
- Parameters:
repository
- wrapped repositorysafeProvider
- the provider of instances safe for public scriptsexecution
- provide access to the current contexthasProgrammingRight
- does the caller script has programming right
search
public IterableResult<Extension> search(String pattern,
int offset,
int nb)
throws SearchException
- Description copied from interface:
Searchable
- Search extension based of the provided pattern.
The pattern is a simple character chain.
- Specified by:
search
in interface Searchable
- Parameters:
pattern
- the pattern to searchoffset
- the offset from where to start returning search resultsnb
- the maximum number of search results to return
- Returns:
- the found extensions descriptors, empty list if nothing could be found
- Throws:
SearchException
- error when trying to search provided pattern