Class ActionBuilder<T>
java.lang.Object
com.persequor.saga.modules.autocrud.modelcrud.ActionBuilder<T>
-
Method Summary
Modifier and TypeMethodDescriptionCall this method to apply validation to a model before saving changes applied viaCreateAction
.addDataExportOption
(String mapperId, Map<String, com.persequor.extension.frontend.IString> fileTypeOptions, com.persequor.extension.frontend.IString fileMapperOptions, Function<Stream<T>, DataWrapper<DataFrame>> mapperFunction) Call this method to apply validation to a model before saving changes applied viaDeleteAction
.addPageAction
(IPageAction<T> action) addRowAction
(IRowAction<T> action) Call this method to apply validation to a model before saving changes applied viaUpdateAction
.canCreate
(boolean canCreate) canDelete
(boolean canDelete) canEdit
(boolean canEdit) canExport
(boolean canExport) canView
(boolean canView) protected CreateAction<T>
Map<String,
IRowAction<T>> getSpecificAction
(String type, String action) For a given CREATE action, this provides the possibility to modify the initial object on the initial render.static <T> ActionBuilder<T>
of
(FieldBuilder<T> fieldBuilder, ICrudRepository<T> repository, Function<T, String> getDisplayName, com.persequor.extension.frontend.link.PageBuilderLink pageBuilderLink, String pagePath, CrudFrontendComponent<T> crudInstance, Class<T> modelClass, Supplier<String> getSingularLabel)
-
Method Details
-
getCreateAction
-
addRowAction
-
addPageAction
-
getRowActions
-
canDelete
-
canDelete
-
canEdit
-
canEdit
-
canView
-
canView
-
canExport
-
canExport
-
canCreate
-
canCreate
-
addCreateActionValidation
Call this method to apply validation to a model before saving changes applied viaCreateAction
.- Parameters:
function
- Validation function to be applied ahead of executing the creation action.- Returns:
- Current ActionBuilder
-
addUpdateActionValidation
Call this method to apply validation to a model before saving changes applied viaUpdateAction
.- Parameters:
function
- Validation function to be applied ahead of executing the update action.- Returns:
- Current ActionBuilder
-
addDeleteActionValidation
Call this method to apply validation to a model before saving changes applied viaDeleteAction
.- Parameters:
function
- Validation function to be applied ahead of executing the delete action.- Returns:
- Current ActionBuilder
-
getStartingModel
For a given CREATE action, this provides the possibility to modify the initial object on the initial render. If you need to modify any other starting model for an IPageAction, then that can be done via thegetPageActions()
}- Returns:
- T - The initialized Object that can be modified
-
addDataExportOption
public ActionBuilder<T> addDataExportOption(String mapperId, Map<String, com.persequor.extension.frontend.IString> fileTypeOptions, com.persequor.extension.frontend.IString fileMapperOptions, Function<Stream<T>, DataWrapper<DataFrame>> mapperFunction) -
clearDataExportOptions
-
of
public static <T> ActionBuilder<T> of(FieldBuilder<T> fieldBuilder, ICrudRepository<T> repository, Function<T, String> getDisplayName, com.persequor.extension.frontend.link.PageBuilderLink pageBuilderLink, String pagePath, CrudFrontendComponent<T> crudInstance, Class<T> modelClass, Supplier<String> getSingularLabel) -
getPageActions
-
getSpecificAction
- Throws:
UnknownActionTypeException
-