Tabnine Logo
AddProblemFactChangeCommand
Code IndexAdd Tabnine to your IDE (free)

How to use
AddProblemFactChangeCommand
in
org.kie.server.api.commands.optaplanner

Best Java code snippets using org.kie.server.api.commands.optaplanner.AddProblemFactChangeCommand (Showing top 2 results out of 315)

origin: org.kie.server/kie-server-client

@Override
public void addProblemFactChange(String containerId,
                 String solverId,
                 ProblemFactChange problemFactChange) {
  checkMandatoryParameter("containerId",
              containerId);
  checkMandatoryParameter("solverId",
              solverId);
  checkMandatoryParameter("problemFactChange",
              problemFactChange);
  if (config.isRest()) {
    String uri = getURI(containerId,
              solverId) + "/" + RestURI.SOLVER_PROBLEM_FACT_CHANGES;
    makeHttpPostRequestAndCreateCustomResponse(uri,
                          problemFactChange,
                          ServiceResponse.class,
                          getHeaders(problemFactChange));
  } else {
    CommandScript script = new CommandScript(Collections.singletonList(new AddProblemFactChangeCommand(containerId,
                                                      solverId,
                                                      problemFactChange)));
    ServiceResponse<Void> response = (ServiceResponse<Void>) executeJmsCommand(script,
                                          AddProblemFactChangeCommand.class.getName(),
                                          KieServerConstants.CAPABILITY_BRP,
                                          containerId).getResponses().get(0);
    throwExceptionOnFailure(response);
  }
}
origin: org.kie.server/kie-server-services-optaplanner

} else if (command instanceof AddProblemFactChangeCommand) {
  AddProblemFactChangeCommand addProblemFactChangeCommand = (AddProblemFactChangeCommand) command;
  String containerId = context.getContainerId(addProblemFactChangeCommand.getContainerId(),
                        ContainerLocatorProvider.get().getLocator());
  response = solverService.addProblemFactChanges(containerId,
                          addProblemFactChangeCommand.getSolverId(),
                          addProblemFactChangeCommand.getProblemFactChange());
} else if (command instanceof AddProblemFactChangesCommand) {
  AddProblemFactChangesCommand addProblemFactChangesCommand = (AddProblemFactChangesCommand) command;
org.kie.server.api.commands.optaplannerAddProblemFactChangeCommand

Most used methods

  • <init>
  • getContainerId
  • getProblemFactChange
  • getSolverId

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JComboBox (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now