Package org.camunda.bpm.model.cmmn
Class Cmmn
java.lang.Object
org.camunda.bpm.model.cmmn.Cmmn
- Author:
- Roman Smirnov
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertToString(CmmnModelInstance modelInstance) Allows the conversion of aCmmnModelInstanceto anString.static CmmnModelInstanceAllows creating an new, emptyCmmnModelInstance.protected StringdoConvertToString(CmmnModelInstance modelInstance) protected CmmnModelInstanceprotected CmmnModelInstancedoReadModelFromFile(File file) protected CmmnModelInstanceprotected voiddoRegisterTypes(org.camunda.bpm.model.xml.ModelBuilder modelBuilder) protected voiddoValidateModel(CmmnModelInstance modelInstance) protected voiddoWriteModelToFile(File file, CmmnModelInstance modelInstance) protected voiddoWriteModelToOutputStream(OutputStream os, CmmnModelInstance modelInstance) org.camunda.bpm.model.xml.Modelorg.camunda.bpm.model.xml.ModelBuilderstatic CmmnModelInstancereadModelFromFile(File file) Allows reading aCmmnModelInstancefrom a File.static CmmnModelInstancereadModelFromStream(InputStream stream) Allows reading aCmmnModelInstancefrom anInputStreamvoidsetCmmnModel(org.camunda.bpm.model.xml.Model cmmnModel) static voidvalidateModel(CmmnModelInstance modelInstance) Validate model DOM documentstatic voidwriteModelToFile(File file, CmmnModelInstance modelInstance) Allows writing aCmmnModelInstanceto a File.static voidwriteModelToStream(OutputStream stream, CmmnModelInstance modelInstance) Allows writing aCmmnModelInstanceto anOutputStream.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Cmmn
protected Cmmn()Register known types of the Cmmn model
-
-
Method Details
-
readModelFromFile
Allows reading aCmmnModelInstancefrom a File.- Parameters:
file- theFileto read theCmmnModelInstancefrom- Returns:
- the model read
- Throws:
CmmnModelException- if the model cannot be read
-
readModelFromStream
Allows reading aCmmnModelInstancefrom anInputStream- Parameters:
stream- theInputStreamto read theCmmnModelInstancefrom- Returns:
- the model read
- Throws:
org.camunda.bpm.model.xml.ModelParseException- if the model cannot be read
-
writeModelToFile
Allows writing aCmmnModelInstanceto a File. It will be validated before writing.- Parameters:
file- theFileto write theCmmnModelInstancetomodelInstance- theCmmnModelInstanceto write- Throws:
CmmnModelException- if the model cannot be writtenorg.camunda.bpm.model.xml.ModelValidationException- if the model is not valid
-
writeModelToStream
Allows writing aCmmnModelInstanceto anOutputStream. It will be validated before writing.- Parameters:
stream- theOutputStreamto write theCmmnModelInstancetomodelInstance- theCmmnModelInstanceto write- Throws:
org.camunda.bpm.model.xml.ModelException- if the model cannot be writtenorg.camunda.bpm.model.xml.ModelValidationException- if the model is not valid
-
convertToString
Allows the conversion of aCmmnModelInstanceto anString. It will be validated before conversion.- Parameters:
modelInstance- the model instance to convert- Returns:
- the XML string representation of the model instance
-
validateModel
Validate model DOM document- Parameters:
modelInstance- theCmmnModelInstanceto validate- Throws:
org.camunda.bpm.model.xml.ModelValidationException- if the model is not valid
-
createEmptyModel
Allows creating an new, emptyCmmnModelInstance.- Returns:
- the empty model.
-
doReadModelFromFile
-
doReadModelFromInputStream
-
doWriteModelToFile
-
doWriteModelToOutputStream
-
doConvertToString
-
doValidateModel
-
doCreateEmptyModel
-
doRegisterTypes
protected void doRegisterTypes(org.camunda.bpm.model.xml.ModelBuilder modelBuilder) -
getCmmnModel
public org.camunda.bpm.model.xml.Model getCmmnModel()- Returns:
- the
Modelinstance to use
-
getCmmnModelBuilder
public org.camunda.bpm.model.xml.ModelBuilder getCmmnModelBuilder() -
setCmmnModel
public void setCmmnModel(org.camunda.bpm.model.xml.Model cmmnModel) - Parameters:
cmmnModel- the cmmnModel to set
-