2017-01-11 14:22:32 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var forEach = require('lodash/collection/forEach');
|
|
|
|
|
2017-01-19 15:12:25 +00:00
|
|
|
/**
|
|
|
|
* These are the properties that should be ignored when cloning elements.
|
|
|
|
*
|
|
|
|
* @type {Array}
|
|
|
|
*/
|
|
|
|
module.exports.IGNORED_PROPERTIES = [
|
|
|
|
'lanes',
|
|
|
|
'incoming',
|
|
|
|
'outgoing',
|
|
|
|
'artifacts',
|
|
|
|
'default',
|
|
|
|
'flowElements'
|
|
|
|
];
|
|
|
|
|
|
|
|
|
2017-01-11 14:22:32 +00:00
|
|
|
function getProperties(descriptor, keepDefault) {
|
|
|
|
var properties = [];
|
|
|
|
|
|
|
|
forEach(descriptor.properties, function(property) {
|
|
|
|
|
|
|
|
if (keepDefault && property.default) {
|
|
|
|
return;
|
|
|
|
}
|
2017-01-19 15:12:25 +00:00
|
|
|
|
2017-01-11 14:22:32 +00:00
|
|
|
properties.push(property.ns.name);
|
|
|
|
});
|
|
|
|
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports.getProperties = getProperties;
|