You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is an abstraction (ICriteriaEntityRestorer) that allows running of Entity Centre in functional entity companion. However this is only narrowed down to the cases where selectionCriteria was added into the context of functional entity.
At this stage there is a need to have API for the following three cases:
Create default Entity Centre configuration from miType with ability modify it through ICentreDomainTreeManagerAndEnhancer and to run it; no database interactions needed here
Create Entity Centre configuration copy from miType + saveAsName for current user with ability modify it through ICentreDomainTreeManagerAndEnhancer and to run it; original configuration should not be affected; original configuration should always drive downstream changes
Create Entity Centre configuration copy from miType + saveAsName + user with ability modify it through ICentreDomainTreeManagerAndEnhancer and to run it; original configuration should not be affected; original configuration should always drive downstream changes; configuration "sharing" mechanism may be used for implementation i.e. to guard security aspect of this
Impl details
ICriteriaEntityCreator interface may be added for these three cases. Some thoughts:
miType at first may be represented as String full class name, until we consider moving this UI concept to pojo-bl modules
configUuid should be considered to be used instead of saveAsName
at this stage we only use PREVIOUSLY_RUN surrogate centre for running named/default configuration; for second/third cases we probably want to take SAVED configuration and make a copy from it
we don't want to have second/third cases present in Load Config dialog for respective users
Expected outcome
Ability for developer to run any centre configuration inside [functional] entity companions.
The text was updated successfully, but these errors were encountered:
First case may be achieved with following (but one PREVIOUSLY_RUNEntityCentreConfig record will be created each time):
final var centreContextHolder = new CentreContextHolder();
centreContextHolder.setCustomObject(linkedMapOf(t2("@@miType", "fielden.main.menu.work.MiReWorkActivity"), t2("@@saveAsName", UUID.randomUUID().toString())));
centreContextHolder.setModifHolder(linkedMapOf(t2("version", 0)));
final var criteriaEntity = criteriaEntityRestorer.restoreCriteriaEntity(centreContextHolder);
final var rootType = ReWorkActivity.class;
criteriaEntity.getCentreDomainTreeMangerAndEnhancer().getFirstTick().setValue(rootType, ReWorkActivity_.scheduledStart_, new DateTime().withTimeAtStartOfDay().toDate());
criteriaEntity.getCentreDomainTreeMangerAndEnhancer().getFirstTick().setValue2(rootType, ReWorkActivity_.scheduledStart_, new DateTime().withTime(23, 59, 59, 999).toDate());
final var was = co(rootType).getFirstEntities(
from(criteriaEntity.createQuery().modelAsEntity(rootType))
.with(criteriaEntity.createResultSetFetchProvider().copy(rootType).fetchModel())
.with(criteriaEntity.getParameters())
.with(DynamicOrderingBuilder.createOrderingModel(rootType, criteriaEntity.getCentreDomainTreeMangerAndEnhancer().getSecondTick().orderedProperties(rootType)))
.model(),
100
);
System.out.println("was = " + was);
Description
Currently there is an abstraction (
ICriteriaEntityRestorer
) that allows running of Entity Centre in functional entity companion. However this is only narrowed down to the cases whereselectionCriteria
was added into the context of functional entity.At this stage there is a need to have API for the following three cases:
miType
with ability modify it throughICentreDomainTreeManagerAndEnhancer
and to run it; no database interactions needed heremiType
+saveAsName
for current user with ability modify it throughICentreDomainTreeManagerAndEnhancer
and to run it; original configuration should not be affected; original configuration should always drive downstream changesmiType
+saveAsName
+user
with ability modify it throughICentreDomainTreeManagerAndEnhancer
and to run it; original configuration should not be affected; original configuration should always drive downstream changes; configuration "sharing" mechanism may be used for implementation i.e. to guard security aspect of thisImpl details
ICriteriaEntityCreator
interface may be added for these three cases. Some thoughts:miType
at first may be represented asString
full class name, until we consider moving this UI concept topojo-bl
modulesconfigUuid
should be considered to be used instead ofsaveAsName
PREVIOUSLY_RUN
surrogate centre for running named/default configuration; for second/third cases we probably want to takeSAVED
configuration and make a copy from itExpected outcome
Ability for developer to run any centre configuration inside [functional] entity companions.
The text was updated successfully, but these errors were encountered: