Class EntityExplorerActionSelectionServiceImpl
java.lang.Object
ch.tocco.nice2.netui.impl.actions.entityoperation.EntityExplorerActionSelectionServiceImpl
- All Implemented Interfaces:
EntityExplorerActionSelectionService
@Component
public class EntityExplorerActionSelectionServiceImpl
extends Object
implements EntityExplorerActionSelectionService
-
Constructor Summary
ConstructorDescriptionEntityExplorerActionSelectionServiceImpl
(Context context, PersistenceService persistenceService, InternalSearchService internalSearchService, QueryBuilderFactory queryBuilderFactory, ClientQuestionService clientQuestionService, TextResources textResources, org.slf4j.Logger log, SecurityManager securityManager) -
Method Summary
Modifier and TypeMethodDescriptiongetQueryDefinition
(EntityExplorerActionSelection selection, boolean confirmSelection) Converts theEntityExplorerActionSelection
into aQueryDefinition
which can be used to create query builders (likeSinglePathQueryBuilder
orPathQueryBuilder
).getSelectedEntity
(EntityExplorerActionSelection selection) Returns exactly one entity (for actions which expect exactly one) or throws.Returns the list of entities for the selection made in the entity explorer, taking theEntityExplorerActionSelection.SelectionType
into consideration.getSelectionEntityList
(EntityExplorerActionSelection selection, int limit) Returns the list of entities for the selection made in the entity explorer, taking theEntityExplorerActionSelection.SelectionType
into consideration.Returns the list of entities for the selection made in the entity explorer, taking theEntityExplorerActionSelection.SelectionType
into consideration.void
setActionSelectionWarningThreshold
(String threshold)
-
Constructor Details
-
EntityExplorerActionSelectionServiceImpl
public EntityExplorerActionSelectionServiceImpl(Context context, PersistenceService persistenceService, InternalSearchService internalSearchService, QueryBuilderFactory queryBuilderFactory, ClientQuestionService clientQuestionService, TextResources textResources, org.slf4j.Logger log, SecurityManager securityManager)
-
-
Method Details
-
getSelectionEntityList
public EntityList getSelectionEntityList(EntityExplorerActionSelection selection) throws PersistException, RpcExecutionException Description copied from interface:EntityExplorerActionSelectionService
Returns the list of entities for the selection made in the entity explorer, taking theEntityExplorerActionSelection.SelectionType
into consideration. In case of a rather large or unusual selection, the user is asked for confirmation to avoid unnecessary long execution time caused by a unwanted selection.- Specified by:
getSelectionEntityList
in interfaceEntityExplorerActionSelectionService
- Parameters:
selection
- the selection of entries in the entity explorer.- Returns:
- the resolved list of entities.
- Throws:
PersistException
RpcExecutionException
-
getSelectionEntityList
public EntityList getSelectionEntityList(EntityExplorerActionSelection selection, int limit) throws PersistException, RpcExecutionException Description copied from interface:EntityExplorerActionSelectionService
Returns the list of entities for the selection made in the entity explorer, taking theEntityExplorerActionSelection.SelectionType
into consideration. In case of a rather large or unusual selection, the user is asked for confirmation to avoid unnecessary long execution time caused by a unwanted selection. If the size of the selection even exceeds the given limit, an error message is shown instead of the confirmation dialog and the user has to reduce the selection size.- Specified by:
getSelectionEntityList
in interfaceEntityExplorerActionSelectionService
- Parameters:
selection
- the selection of entries in the entity explorer.limit
- the limit for the selection size.- Returns:
- the resolved list of entities.
- Throws:
PersistException
RpcExecutionException
-
getSelectionEntityListConfirmed
public EntityList getSelectionEntityListConfirmed(EntityExplorerActionSelection selection) throws PersistException, RpcExecutionException Description copied from interface:EntityExplorerActionSelectionService
Returns the list of entities for the selection made in the entity explorer, taking theEntityExplorerActionSelection.SelectionType
into consideration. In contrary toEntityExplorerActionSelectionService.getSelectionEntityList(EntityExplorerActionSelection)
, this method does not ask the user for confirmation of his selection. Use this method ifEntityExplorerActionSelectionService.getSelectionEntityList(EntityExplorerActionSelection)
has already been called and confirmed by the user during a previous step of the action or if the action is known to definitely not take a long time to proceed, event if the selection is very large.- Specified by:
getSelectionEntityListConfirmed
in interfaceEntityExplorerActionSelectionService
- Parameters:
selection
- the selection of entries in the entity explorer.- Returns:
- the resolved list of entities.
- Throws:
PersistException
RpcExecutionException
-
getQueryDefinition
public QueryDefinition getQueryDefinition(EntityExplorerActionSelection selection, boolean confirmSelection) Description copied from interface:EntityExplorerActionSelectionService
Converts theEntityExplorerActionSelection
into aQueryDefinition
which can be used to create query builders (likeSinglePathQueryBuilder
orPathQueryBuilder
).- Specified by:
getQueryDefinition
in interfaceEntityExplorerActionSelectionService
-
getSelectedEntity
public Entity getSelectedEntity(EntityExplorerActionSelection selection) throws PersistException, RpcExecutionException Description copied from interface:EntityExplorerActionSelectionService
Returns exactly one entity (for actions which expect exactly one) or throws.- Specified by:
getSelectedEntity
in interfaceEntityExplorerActionSelectionService
- Parameters:
selection
- the selection of entries in the entity explorer.- Returns:
- a single selected entity
- Throws:
PersistException
RpcExecutionException
-
setActionSelectionWarningThreshold
@Value("${action.selection.warning.threshold}") public void setActionSelectionWarningThreshold(String threshold)
-