Package com.aquima.web.rest.v1.service
Class ShortcutService
java.lang.Object
com.aquima.web.rest.v1.service.ShortcutService
Service responsible for retrieving shortcuts.
NOTE TO DEVELOPERS: this class is not converted to .NET. There is no shortcut functionality in .NET Runtime. In order to be consistent with other services, this service is implemented in a similar manner.
- Since:
- 9.6
- Author:
- Radu Batori, Voicu Moldovan
-
Constructor Summary
ConstructorsConstructorDescriptionShortcutService
(com.blueriq.component.api.shortcut.IShortcutManager shortcutManager, IShortcutConverter converter, PaginatorFactory paginatorFactory, IResourceLinker<Shortcut> linker) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptiongetShortcut
(Shortcut shortcut, String name) This method populates the Shortcut resource for REST API response.getShortcuts
(PagedObject<Shortcut> pagedObject, Integer page, Integer pageSize, String sortParameter) This method populates the PagedObject resource for REST API response.
-
Constructor Details
-
ShortcutService
public ShortcutService(com.blueriq.component.api.shortcut.IShortcutManager shortcutManager, IShortcutConverter converter, PaginatorFactory paginatorFactory, IResourceLinker<Shortcut> linker) Creates a new instance.- Parameters:
shortcutManager
- The shortcut manager. Provides shortcuts.converter
- The shortcut converter.paginatorFactory
- The paginator factory.linker
- The shortcut linker.
-
-
Method Details
-
getShortcuts
public PagedObject<Shortcut> getShortcuts(PagedObject<Shortcut> pagedObject, Integer page, Integer pageSize, String sortParameter) This method populates the PagedObject resource for REST API response.- Parameters:
pagedObject
- The paged object to be populated with Shortcut resource items.page
- The page number (Optional parameter).pageSize
- The page size number (Optional parameter).sortParameter
- The sort string (Optional parameter).- Returns:
- requested shortcuts
-
getShortcut
This method populates the Shortcut resource for REST API response.Validates if the Shortcut with the given name exists.
- Parameters:
shortcut
- The Shortcut to be populated with data.name
- The name of the Shortcut.- Returns:
- the requested shortcut
- Throws:
ResourceNotFoundException
- if there is no Shortcut with the given name.
-