Change content download rest template config.
[federation.git] / gateway / src / main / java / org / acumos / federation / gateway / service / impl / ContentServiceImpl.java
index 9ac01a5..6aa461c 100644 (file)
@@ -136,7 +136,7 @@ public class ContentServiceImpl extends AbstractServiceImpl
                else {
                        String[] nameParts = splitName(theArtifact.getName());
                        UploadArtifactInfo info = putNexusContent(
-                               nexusConfig.getGroupId(), nameParts[0], theArtifact.getVersion(), nameParts[1], theResource);
+                               nexusPrefix(theSolutionId, theRevisionId), nameParts[0], theArtifact.getVersion(), nameParts[1], theResource);
                        // update artifact with local repo reference
                        theArtifact.setUri(info.getArtifactMvnPath());
                }
@@ -159,7 +159,7 @@ public class ContentServiceImpl extends AbstractServiceImpl
                                                                                                                                                                                                                                                                                                                                                throws ServiceException {
                String[] nameParts = splitName(theDocument.getName());
                UploadArtifactInfo info = putNexusContent(
-                               String.join(nexusConfig.getNameSeparator(), nexusConfig.getGroupId(), theSolutionId, theRevisionId), nameParts[0], AccessTypeCode.PB.name(), nameParts[1], theResource);
+                       nexusPrefix(theSolutionId, theRevisionId), nameParts[0], AccessTypeCode.PB.name(), nameParts[1], theResource);
                theDocument.setUri(info.getArtifactMvnPath());
        }
 
@@ -196,6 +196,10 @@ public class ContentServiceImpl extends AbstractServiceImpl
                }
        }
 
+       private String nexusPrefix(String theSolutionId, String theRevisionId) {
+               return String.join(nexusConfig.getNameSeparator(), nexusConfig.getGroupId(), theSolutionId, theRevisionId);
+       }
+
        /**
         * Split a file name into its core name and extension parts.
         * @param theName file name to split