use of org.activiti.workflow.simple.alfresco.model.config.AlfrescoConfiguration in project Activiti by Activiti.
the class AlfrescoArtifactExporter method writeShareConfig.
/**
* Write the Share module XML in the given conversion to the given stream.
*/
public void writeShareConfig(OutputStream out, WorkflowDefinitionConversion conversion, boolean asExtension) throws IOException {
Extension extension = AlfrescoConversionUtil.getExtension(conversion);
try {
Object toMarshall = extension;
// in a "alfresco-configuration" element instead
if (!asExtension) {
toMarshall = new AlfrescoConfiguration();
((AlfrescoConfiguration) toMarshall).setConfigurations(extension.getModules().get(0).getConfigurations());
}
Marshaller marshaller = moduleJaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaller.marshal(toMarshall, out);
} catch (JAXBException jaxbe) {
throw new IOException(jaxbe);
}
}
Aggregations