@ApplicationScoped public class ScenarioSimulationServiceImpl extends org.kie.workbench.common.services.backend.service.KieService<ScenarioSimulationModelContent> implements ScenarioSimulationService
Modifier and Type | Field and Description |
---|---|
protected DMNTypeService |
dmnTypeService |
protected ScenarioSimulationBuilder |
scenarioSimulationBuilder |
Constructor and Description |
---|
ScenarioSimulationServiceImpl() |
ScenarioSimulationServiceImpl(org.uberfire.rpc.SessionInfo sessionInfo) |
Modifier and Type | Method and Description |
---|---|
protected ScenarioSimulationModelContent |
constructContent(org.uberfire.backend.vfs.Path path,
org.guvnor.common.services.shared.metadata.model.Overview overview) |
org.uberfire.backend.vfs.Path |
copy(org.uberfire.backend.vfs.Path path,
String newName,
org.uberfire.backend.vfs.Path targetDirectory,
String comment) |
org.uberfire.backend.vfs.Path |
copy(org.uberfire.backend.vfs.Path path,
String newName,
String comment) |
org.uberfire.backend.vfs.Path |
create(org.uberfire.backend.vfs.Path context,
String fileName,
org.drools.scenariosimulation.api.model.ScenarioSimulationModel content,
String comment) |
org.uberfire.backend.vfs.Path |
create(org.uberfire.backend.vfs.Path context,
String fileName,
org.drools.scenariosimulation.api.model.ScenarioSimulationModel content,
String comment,
org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type,
String value) |
protected void |
createActivatorIfNotExist(org.uberfire.backend.vfs.Path context) |
void |
delete(org.uberfire.backend.vfs.Path path,
String comment) |
protected boolean |
editPomIfNecessary(org.guvnor.common.services.project.model.Dependencies dependencies,
org.guvnor.common.services.project.model.GAV gav) |
protected boolean |
ensureDependencies(org.kie.workbench.common.services.shared.project.KieModule module)
Verify if the project contains all the needed dependencies removing the old ones if available
|
protected org.uberfire.java.nio.file.Path |
getActivatorPath(org.guvnor.common.services.project.model.Package rootModulePackage) |
protected List<org.guvnor.common.services.project.model.GAV> |
getDependencies(String kieVersion) |
protected org.uberfire.java.nio.file.Path |
getJunitActivatorPackagePath(org.guvnor.common.services.project.model.Package rootModulePackage) |
protected List<org.guvnor.common.services.project.model.GAV> |
getOldDependencies() |
protected org.guvnor.common.services.project.model.Package |
getOrCreateJunitActivatorPackage(org.kie.workbench.common.services.shared.project.KieModule kieModule) |
void |
init() |
org.drools.scenariosimulation.api.model.ScenarioSimulationModel |
load(org.uberfire.backend.vfs.Path path) |
protected boolean |
removeFromPomIfNecessary(org.guvnor.common.services.project.model.Dependencies dependencies,
org.guvnor.common.services.project.model.GAV oldDependency) |
protected void |
removeOldActivatorIfExists(org.uberfire.java.nio.file.Path activatorPath,
org.kie.workbench.common.services.shared.project.KieModule kieModule)
This routine looks for existing activators to migrate
|
org.uberfire.backend.vfs.Path |
rename(org.uberfire.backend.vfs.Path path,
String newName,
String comment) |
SimulationRunResult |
runScenario(org.uberfire.backend.vfs.Path path,
org.drools.scenariosimulation.api.model.SimulationDescriptor simulationDescriptor,
List<org.drools.scenariosimulation.api.model.ScenarioWithIndex> scenarios) |
org.uberfire.backend.vfs.Path |
save(org.uberfire.backend.vfs.Path resource,
org.drools.scenariosimulation.api.model.ScenarioSimulationModel content,
org.guvnor.common.services.shared.metadata.model.Metadata metadata,
String comment) |
org.uberfire.backend.vfs.Path |
saveAndRename(org.uberfire.backend.vfs.Path path,
String newFileName,
org.guvnor.common.services.shared.metadata.model.Metadata metadata,
org.drools.scenariosimulation.api.model.ScenarioSimulationModel content,
String comment) |
protected org.drools.scenariosimulation.api.model.ScenarioSimulationModel |
unmarshalInternal(String content) |
fireMetadataSocialEvents, getSource, loadContent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
loadContent
@Inject protected ScenarioSimulationBuilder scenarioSimulationBuilder
@Inject protected DMNTypeService dmnTypeService
public ScenarioSimulationServiceImpl()
@Inject public ScenarioSimulationServiceImpl(org.uberfire.rpc.SessionInfo sessionInfo)
@PostConstruct public void init()
public SimulationRunResult runScenario(org.uberfire.backend.vfs.Path path, org.drools.scenariosimulation.api.model.SimulationDescriptor simulationDescriptor, List<org.drools.scenariosimulation.api.model.ScenarioWithIndex> scenarios)
runScenario
in interface ScenarioSimulationService
public org.uberfire.backend.vfs.Path create(org.uberfire.backend.vfs.Path context, String fileName, org.drools.scenariosimulation.api.model.ScenarioSimulationModel content, String comment)
create
in interface org.uberfire.ext.editor.commons.service.support.SupportsCreate<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
public org.uberfire.backend.vfs.Path create(org.uberfire.backend.vfs.Path context, String fileName, org.drools.scenariosimulation.api.model.ScenarioSimulationModel content, String comment, org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type, String value)
create
in interface ScenarioSimulationService
public org.drools.scenariosimulation.api.model.ScenarioSimulationModel load(org.uberfire.backend.vfs.Path path)
load
in interface org.uberfire.ext.editor.commons.service.support.SupportsRead<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
protected ScenarioSimulationModelContent constructContent(org.uberfire.backend.vfs.Path path, org.guvnor.common.services.shared.metadata.model.Overview overview)
constructContent
in class org.kie.workbench.common.services.backend.service.KieService<ScenarioSimulationModelContent>
public org.uberfire.backend.vfs.Path save(org.uberfire.backend.vfs.Path resource, org.drools.scenariosimulation.api.model.ScenarioSimulationModel content, org.guvnor.common.services.shared.metadata.model.Metadata metadata, String comment)
save
in interface org.uberfire.ext.editor.commons.service.support.SupportsUpdate<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>
public void delete(org.uberfire.backend.vfs.Path path, String comment)
delete
in interface org.uberfire.ext.editor.commons.service.support.SupportsDelete
public org.uberfire.backend.vfs.Path rename(org.uberfire.backend.vfs.Path path, String newName, String comment)
rename
in interface org.uberfire.ext.editor.commons.service.support.SupportsRename
public org.uberfire.backend.vfs.Path copy(org.uberfire.backend.vfs.Path path, String newName, String comment)
copy
in interface org.uberfire.ext.editor.commons.service.support.SupportsCopy
public org.uberfire.backend.vfs.Path copy(org.uberfire.backend.vfs.Path path, String newName, org.uberfire.backend.vfs.Path targetDirectory, String comment)
copy
in interface org.uberfire.ext.editor.commons.service.support.SupportsCopy
public org.uberfire.backend.vfs.Path saveAndRename(org.uberfire.backend.vfs.Path path, String newFileName, org.guvnor.common.services.shared.metadata.model.Metadata metadata, org.drools.scenariosimulation.api.model.ScenarioSimulationModel content, String comment)
saveAndRename
in interface org.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>
protected void createActivatorIfNotExist(org.uberfire.backend.vfs.Path context)
protected org.guvnor.common.services.project.model.Package getOrCreateJunitActivatorPackage(org.kie.workbench.common.services.shared.project.KieModule kieModule)
protected void removeOldActivatorIfExists(org.uberfire.java.nio.file.Path activatorPath, org.kie.workbench.common.services.shared.project.KieModule kieModule)
activatorPath
- kieModule
- protected boolean ensureDependencies(org.kie.workbench.common.services.shared.project.KieModule module)
module
- protected boolean removeFromPomIfNecessary(org.guvnor.common.services.project.model.Dependencies dependencies, org.guvnor.common.services.project.model.GAV oldDependency)
protected boolean editPomIfNecessary(org.guvnor.common.services.project.model.Dependencies dependencies, org.guvnor.common.services.project.model.GAV gav)
protected org.uberfire.java.nio.file.Path getActivatorPath(org.guvnor.common.services.project.model.Package rootModulePackage)
protected org.uberfire.java.nio.file.Path getJunitActivatorPackagePath(org.guvnor.common.services.project.model.Package rootModulePackage)
protected List<org.guvnor.common.services.project.model.GAV> getOldDependencies()
protected List<org.guvnor.common.services.project.model.GAV> getDependencies(String kieVersion)
protected org.drools.scenariosimulation.api.model.ScenarioSimulationModel unmarshalInternal(String content)
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.