use of com.rebuild.core.metadata.EntityRecordCreator in project rebuild by getrebuild.
the class MetaschemaImporter method performTrigger.
private void performTrigger(String entity, JSONObject config) {
Entity configEntity = MetadataHelper.getEntity(EntityHelper.RobotTriggerConfig);
config.put("metadata", JSONUtils.toJSONObject("entity", configEntity.getName()));
config.put("belongEntity", entity);
String actionType = config.getString("actionType");
boolean available = false;
for (ActionType type : ActionFactory.getAvailableActions()) {
if (type.name().equalsIgnoreCase(actionType)) {
available = true;
break;
}
}
if (!available) {
log.warn("Trigger `{}` unavailable", actionType);
return;
}
Record record = new EntityRecordCreator(configEntity, config, getUser()).create();
Application.getBean(RobotTriggerConfigService.class).create(record);
}
use of com.rebuild.core.metadata.EntityRecordCreator in project rebuild by getrebuild.
the class MetaschemaImporter method performFilter.
private void performFilter(String entity, JSONObject config) {
Entity configEntity = MetadataHelper.getEntity(EntityHelper.FilterConfig);
config.put("metadata", JSONUtils.toJSONObject("entity", configEntity.getName()));
config.put("belongEntity", entity);
config.put("shareTo", ShareToManager.SHARE_ALL);
Record record = new EntityRecordCreator(configEntity, config, getUser()).create();
Application.getBean(AdvFilterService.class).create(record);
}
use of com.rebuild.core.metadata.EntityRecordCreator in project rebuild by getrebuild.
the class MetaschemaImporter method performFillin.
private void performFillin(String entity, JSONObject config) {
Entity configEntity = MetadataHelper.getEntity(EntityHelper.AutoFillinConfig);
config.put("metadata", JSONUtils.toJSONObject("entity", configEntity.getName()));
config.put("belongEntity", entity);
Record record = new EntityRecordCreator(configEntity, config, getUser()).create();
Application.getBean(AutoFillinConfigService.class).create(record);
}
use of com.rebuild.core.metadata.EntityRecordCreator in project rebuild by getrebuild.
the class MetaschemaImporter method performApproval.
private void performApproval(String entity, JSONObject config) {
Entity configEntity = MetadataHelper.getEntity(EntityHelper.RobotApprovalConfig);
config.put("metadata", JSONUtils.toJSONObject("entity", configEntity.getName()));
config.put("belongEntity", entity);
Record record = new EntityRecordCreator(configEntity, config, getUser()).create();
Application.getBean(RobotApprovalConfigService.class).create(record);
}
use of com.rebuild.core.metadata.EntityRecordCreator in project rebuild by getrebuild.
the class MetaschemaImporter method performTransform.
private void performTransform(String entity, JSONObject config) {
Entity configEntity = MetadataHelper.getEntity(EntityHelper.TransformConfig);
config.put("metadata", JSONUtils.toJSONObject("entity", configEntity.getName()));
config.put("belongEntity", entity);
Record record = new EntityRecordCreator(configEntity, config, getUser()).create();
Application.getBean(TransformConfigService.class).create(record);
}
Aggregations