Package org.camunda.bpm.model.cmmn
Class Cmmn
java.lang.Object
org.camunda.bpm.model.cmmn.Cmmn
- Author:
- Roman Smirnov
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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(ModelBuilder modelBuilder) protected voiddoValidateModel(CmmnModelInstance modelInstance) protected voiddoWriteModelToFile(File file, CmmnModelInstance modelInstance) protected voiddoWriteModelToOutputStream(OutputStream os, CmmnModelInstance modelInstance) static CmmnModelInstancereadModelFromFile(File file) Allows reading aCmmnModelInstancefrom a File.static CmmnModelInstancereadModelFromStream(InputStream stream) Allows reading aCmmnModelInstancefrom anInputStreamvoidsetCmmnModel(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- 
Cmmnprotected Cmmn()Register known types of the Cmmn model
 
- 
- 
Method Details- 
readModelFromFileAllows reading aCmmnModelInstancefrom a File.- Parameters:
- file- the- Fileto read the- CmmnModelInstancefrom
- Returns:
- the model read
- Throws:
- CmmnModelException- if the model cannot be read
 
- 
readModelFromStreamAllows reading aCmmnModelInstancefrom anInputStream- Parameters:
- stream- the- InputStreamto read the- CmmnModelInstancefrom
- Returns:
- the model read
- Throws:
- ModelParseException- if the model cannot be read
 
- 
writeModelToFileAllows writing aCmmnModelInstanceto a File. It will be validated before writing.- Parameters:
- file- the- Fileto write the- CmmnModelInstanceto
- modelInstance- the- CmmnModelInstanceto write
- Throws:
- CmmnModelException- if the model cannot be written
- ModelValidationException- if the model is not valid
 
- 
writeModelToStreamAllows writing aCmmnModelInstanceto anOutputStream. It will be validated before writing.- Parameters:
- stream- the- OutputStreamto write the- CmmnModelInstanceto
- modelInstance- the- CmmnModelInstanceto write
- Throws:
- ModelException- if the model cannot be written
- ModelValidationException- if the model is not valid
 
- 
convertToStringAllows 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
 
- 
validateModelValidate model DOM document- Parameters:
- modelInstance- the- CmmnModelInstanceto validate
- Throws:
- ModelValidationException- if the model is not valid
 
- 
createEmptyModelAllows creating an new, emptyCmmnModelInstance.- Returns:
- the empty model.
 
- 
doReadModelFromFile
- 
doReadModelFromInputStream
- 
doWriteModelToFile
- 
doWriteModelToOutputStream
- 
doConvertToString
- 
doValidateModel
- 
doCreateEmptyModel
- 
doRegisterTypes
- 
getCmmnModel- Returns:
- the Modelinstance to use
 
- 
getCmmnModelBuilder
- 
setCmmnModel- Parameters:
- cmmnModel- the cmmnModel to set
 
 
-