*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
moduleDescriptor.getTitle());
moduleNode.setProperty(Property.JCR_DESCRIPTION,
moduleDescriptor.getDescription());
moduleDescriptor.getTitle());
moduleNode.setProperty(Property.JCR_DESCRIPTION,
moduleDescriptor.getDescription());
String relativePath, ExecutionFlowDescriptor efd)
throws RepositoryException {
Node flowNode = null;
String relativePath, ExecutionFlowDescriptor efd)
throws RepositoryException {
Node flowNode = null;
// create intermediary paths
Node currNode = moduleNode;
while (names.hasNext()) {
// create intermediary paths
Node currNode = moduleNode;
while (names.hasNext()) {
flowNode.setProperty(Property.JCR_TITLE, endName);
if (efd.getDescription() != null
&& !efd.getDescription().trim().equals("")) {
flowNode.setProperty(Property.JCR_TITLE, endName);
if (efd.getDescription() != null
&& !efd.getDescription().trim().equals("")) {
- if (!(esName == null || esName.equals(ExecutionSpec.INTERNAL_NAME))) {
+ if (esName == null || esName.equals(ExecutionSpec.INTERNAL_NAME)
+ || esName.contains("#")/* automatically generated bean name */) {
+ // internal spec node
+ mapExecutionSpec(flowNode, executionSpec);
+ } else {
// reference spec node
Node executionSpecsNode = moduleNode.hasNode(SLC_EXECUTION_SPECS) ? moduleNode
.getNode(SLC_EXECUTION_SPECS) : moduleNode
// reference spec node
Node executionSpecsNode = moduleNode.hasNode(SLC_EXECUTION_SPECS) ? moduleNode
.getNode(SLC_EXECUTION_SPECS) : moduleNode
executionSpec.getDescription());
mapExecutionSpec(executionSpecNode, executionSpec);
flowNode.setProperty(SLC_SPEC, executionSpecNode);
executionSpec.getDescription());
mapExecutionSpec(executionSpecNode, executionSpec);
flowNode.setProperty(SLC_SPEC, executionSpecNode);
for (String attr : efd.getValues().keySet()) {
ExecutionSpecAttribute esa = executionSpec.getAttributes()
.get(attr);
if (esa instanceof PrimitiveSpecAttribute) {
PrimitiveSpecAttribute psa = (PrimitiveSpecAttribute) esa;
for (String attr : efd.getValues().keySet()) {
ExecutionSpecAttribute esa = executionSpec.getAttributes()
.get(attr);
if (esa instanceof PrimitiveSpecAttribute) {
PrimitiveSpecAttribute psa = (PrimitiveSpecAttribute) esa;
valueNode.setProperty(SLC_TYPE, psa.getType());
SlcJcrUtils.setPrimitiveAsProperty(valueNode, SLC_VALUE,
(PrimitiveValue) efd.getValues().get(attr));
valueNode.setProperty(SLC_TYPE, psa.getType());
SlcJcrUtils.setPrimitiveAsProperty(valueNode, SLC_VALUE,
(PrimitiveValue) efd.getValues().get(attr));