/** * Set the parameters values * <p> * Parameters must also be defined in the {@link org.bonitasoft.engine.bpm.process.ProcessDefinition} using * {@link org.bonitasoft.engine.bpm.process.impl.ProcessDefinitionBuilder} <p> {@link DesignProcessDefinition} can be * constructed using {@link org.bonitasoft.engine.bpm.process.impl.ProcessDefinitionBuilder} * * @see org.bonitasoft.engine.bpm.process.impl.ProcessDefinitionBuilder * @param parameters * the parameters value to use * @return * the same {@link BusinessArchiveBuilder} in order to chain calls */ public BusinessArchiveBuilder setParameters(final Map<String, String> parameters) { entity.setParameters(parameters); return this; }
/** * Set the parameters values * <p> * Parameters must also be defined in the {@link org.bonitasoft.engine.bpm.process.ProcessDefinition} using * {@link org.bonitasoft.engine.bpm.process.impl.ProcessDefinitionBuilder} <p> {@link DesignProcessDefinition} can be * constructed using {@link org.bonitasoft.engine.bpm.process.impl.ProcessDefinitionBuilder} * * @see org.bonitasoft.engine.bpm.process.impl.ProcessDefinitionBuilder * @param parameters * the parameters value to use * @return * the same {@link BusinessArchiveBuilder} in order to chain calls */ public BusinessArchiveBuilder setParameters(final Map<String, String> parameters) { entity.setParameters(parameters); return this; }
@Override public boolean readFromBarFolder(final BusinessArchive businessArchive, final File barFolder) throws IOException { final File file = new File(barFolder, PARAMETERS_FILE); if (!file.exists()) { return false; } final Properties properties = PropertiesManager.getProperties(file); final Map<String, String> parameters = new HashMap<>(properties.size()); for (final Entry<Object, Object> property : properties.entrySet()) { parameters.put((String) property.getKey(), (String) (NULL.equals(property.getValue()) ? null : property.getValue())); } businessArchive.setParameters(parameters); return true; }
@Override public boolean readFromBarFolder(final BusinessArchive businessArchive, final File barFolder) throws IOException { final File file = new File(barFolder, PARAMETERS_FILE); if (!file.exists()) { return false; } final Properties properties = PropertiesManager.getProperties(file); final Map<String, String> parameters = new HashMap<>(properties.size()); for (final Entry<Object, Object> property : properties.entrySet()) { parameters.put((String) property.getKey(), (String) (NULL.equals(property.getValue()) ? null : property.getValue())); } businessArchive.setParameters(parameters); return true; }