Drools Planner distribution 6.0.0.Alpha9

org.drools.planner.examples.common.business
Class SolutionBusiness

java.lang.Object
  extended by org.drools.planner.examples.common.business.SolutionBusiness

public class SolutionBusiness
extends Object


Nested Class Summary
static class SolutionBusiness.SolverExampleFileFilter
           
 
Field Summary
protected  org.slf4j.Logger logger
           
 
Constructor Summary
SolutionBusiness()
           
 
Method Summary
 boolean acceptImportFile(File file)
           
 void doMove(Move move)
           
 void doProblemFactChange(ProblemFactChange problemFactChange)
           
 void exportSolution(File file)
           
 File getDataDir()
           
 String getDirName()
           
 File getExportDataDir()
           
 File getImportDataDir()
           
 String getImportFileSuffix()
           
 Score getScore()
           
 List<ScoreDetail> getScoreDetailList()
           
 Solution getSolution()
           
 File getSolvedDataDir()
           
 List<File> getSolvedFileList()
           
 File getUnsolvedDataDir()
           
 List<File> getUnsolvedFileList()
           
 boolean hasExporter()
           
 boolean hasImporter()
           
 void importSolution(File file)
           
 boolean isSolving()
           
 void openSolution(File file)
           
 void registerForBestSolutionChanges(SolverAndPersistenceFrame solverAndPersistenceFrame)
           
 void saveSolution(File file)
           
 void setExporter(AbstractSolutionExporter exporter)
           
 void setImporter(AbstractSolutionImporter importer)
           
 void setSolution(Solution solution)
           
 void setSolutionDao(SolutionDao solutionDao)
           
 void setSolver(Solver solver)
           
 Solution solve(Solution planningProblem)
          Can be called on any thread.
 void terminateSolvingEarly()
           
 void updateDataDirs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final transient org.slf4j.Logger logger
Constructor Detail

SolutionBusiness

public SolutionBusiness()
Method Detail

setSolutionDao

public void setSolutionDao(SolutionDao solutionDao)

setImporter

public void setImporter(AbstractSolutionImporter importer)

setExporter

public void setExporter(AbstractSolutionExporter exporter)

getDataDir

public File getDataDir()

getDirName

public String getDirName()

hasImporter

public boolean hasImporter()

hasExporter

public boolean hasExporter()

updateDataDirs

public void updateDataDirs()

getImportDataDir

public File getImportDataDir()

acceptImportFile

public boolean acceptImportFile(File file)

getImportFileSuffix

public String getImportFileSuffix()

getUnsolvedDataDir

public File getUnsolvedDataDir()

getSolvedDataDir

public File getSolvedDataDir()

getExportDataDir

public File getExportDataDir()

setSolver

public void setSolver(Solver solver)

getUnsolvedFileList

public List<File> getUnsolvedFileList()

getSolvedFileList

public List<File> getSolvedFileList()

getSolution

public Solution getSolution()

setSolution

public void setSolution(Solution solution)

getScore

public Score getScore()

isSolving

public boolean isSolving()

registerForBestSolutionChanges

public void registerForBestSolutionChanges(SolverAndPersistenceFrame solverAndPersistenceFrame)

getScoreDetailList

public List<ScoreDetail> getScoreDetailList()

importSolution

public void importSolution(File file)

openSolution

public void openSolution(File file)

saveSolution

public void saveSolution(File file)

exportSolution

public void exportSolution(File file)

doMove

public void doMove(Move move)

doProblemFactChange

public void doProblemFactChange(ProblemFactChange problemFactChange)

solve

public Solution solve(Solution planningProblem)
Can be called on any thread.

Note: This method does not change the guiScoreDirector because that can only be changed on the event thread.

Parameters:
planningProblem - never null
Returns:
never null

terminateSolvingEarly

public void terminateSolvingEarly()

Drools Planner distribution 6.0.0.Alpha9

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.