Package com.axelor.meta.loader
Class ViewLoader
java.lang.Object
com.axelor.meta.loader.ViewLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddResolveTask(Class<?> type, String name, Long entityId, BiConsumer<Long, Long> consumer) protected voiddoLast(com.axelor.meta.loader.Module module, boolean update) protected voiddoLoad(com.axelor.meta.loader.Module module, boolean update) Implement this method the load the data.protected voidprotected voidfeedTransactionExecutor(ParallelTransactionExecutor transactionExecutor, com.axelor.meta.loader.Module module, boolean update, Set<Path> paths) findFiles(com.axelor.meta.loader.Module module) Returns items that have been visited several times.protected voidimportAction(Action action, com.axelor.meta.loader.Module module, boolean update) protected voidimportActionMenu(MenuItem menuItem, com.axelor.meta.loader.Module module, boolean update) protected voidimportMenu(MenuItem menuItem, com.axelor.meta.loader.Module module, boolean update) protected voidimportSelection(Selection selection, com.axelor.meta.loader.Module module, boolean update) protected voidprotected booleanChecks whether an element is already visited.protected booleanChecks whether an element is already visited.protected voidfinal voidload(com.axelor.meta.loader.Module module, boolean update) Resolve the given unresolved key.
All the pending values of the unresolved key are returned for further processing.protected voidprotected <T> voidsetUnresolved(Class<T> type, String unresolvedKey, Long entityId) Put a value of the given type for resolution for the given unresolved key.
The value is put inside aMapwith unresolvedKey as the key.protected voidReturn set of all the unresolved keys.
-
Constructor Details
-
ViewLoader
public ViewLoader()
-
-
Method Details
-
doLoad
-
findFiles
-
doLast
protected void doLast(com.axelor.meta.loader.Module module, boolean update) -
initialize
protected void initialize() -
terminate
protected void terminate() -
linkMissingGroups
protected void linkMissingGroups() -
importSelection
protected void importSelection(Selection selection, com.axelor.meta.loader.Module module, boolean update) -
importAction
-
importMenu
-
importActionMenu
protected void importActionMenu(MenuItem menuItem, com.axelor.meta.loader.Module module, boolean update) -
doLoad
protected void doLoad(com.axelor.meta.loader.Module module, boolean update) Implement this method the load the data.- Parameters:
module- the module for which to load the dataupdate- whether to force update while loading
-
feedTransactionExecutor
protected void feedTransactionExecutor(ParallelTransactionExecutor transactionExecutor, com.axelor.meta.loader.Module module, boolean update, Set<Path> paths) -
findFiles
-
isVisited
Checks whether an element is already visited. Element can be either identified the pairtype/nameor by itsxmlId.- Parameters:
type- element typename- element namebaseType- element base typexmlId- element xmlId- Returns:
- whether the element is already visited or not
-
isVisited
Checks whether an element is already visited. Element can be either identified the pairtype/nameor by itsxmlId.- Parameters:
type- element typename- element namexmlId- element xmlId- Returns:
- whether the element is already visited or not
-
getDuplicates
Returns items that have been visited several times.- Returns:
- duplicate items
-
setUnresolved
Put a value of the given type for resolution for the given unresolved key.
The value is put inside aMapwith unresolvedKey as the key.- Parameters:
type-unresolvedKey-entityId-
-
resolve
Resolve the given unresolved key.
All the pending values of the unresolved key are returned for further processing. The values are removed from the backingMap.- Parameters:
type- the type of pending objectsunresolvedKey- the unresolved key- Returns:
- a set of all the pending objects
-
addResolveTask
-
runResolveTasks
protected void runResolveTasks() -
unresolvedKeys
Return set of all the unresolved keys.- Returns:
- set of unresolved keys
-
load
public final void load(com.axelor.meta.loader.Module module, boolean update)
-