From 0574c5cf4315b25c9e8d4b6594575964aa248ff9 Mon Sep 17 00:00:00 2001 From: grog Date: Sun, 15 Oct 2023 09:57:14 -0700 Subject: [PATCH] fixed ivy --- .../java/org/myrobotlab/framework/Service.java | 18 +++++++++--------- .../myrobotlab/framework/repo/IvyWrapper.java | 10 +++------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/myrobotlab/framework/Service.java b/src/main/java/org/myrobotlab/framework/Service.java index c5f5cc22ac..5e6ef5ef10 100644 --- a/src/main/java/org/myrobotlab/framework/Service.java +++ b/src/main/java/org/myrobotlab/framework/Service.java @@ -725,8 +725,8 @@ public void addListener(MRLListener listener) { } @Override - public void addListener(String topicMethod, String callbackName) { - addListener(topicMethod, callbackName, CodecUtils.getCallbackTopicName(topicMethod)); + public void addListener(String localMethod, String remoteName) { + addListener(localMethod, remoteName, CodecUtils.getCallbackTopicName(localMethod)); } /** @@ -734,18 +734,18 @@ public void addListener(String topicMethod, String callbackName) { * "subscribe" from a different service FIXME !! - implement with HashMap or * HashSet .. WHY ArrayList ??? * - * @param topicMethod + * @param localMethod * - method when called, it's return will be sent to the - * callbackName/calbackMethod - * @param callbackName + * remoteName.remoteMethod + * @param remoteName * - name of the service to send return message to - * @param callbackMethod + * @param remoteMethod * - name of the method to send return data to */ @Override - public void addListener(String topicMethod, String callbackName, String callbackMethod) { - callbackName = CodecUtils.getFullName(callbackName); - MRLListener listener = new MRLListener(topicMethod, callbackName, callbackMethod); + public void addListener(String localMethod, String remoteName, String remoteMethod) { + remoteName = CodecUtils.getFullName(remoteName); + MRLListener listener = new MRLListener(localMethod, remoteName, remoteMethod); if (outbox.notifyList.containsKey(listener.topicMethod)) { // iterate through all looking for duplicate boolean found = false; diff --git a/src/main/java/org/myrobotlab/framework/repo/IvyWrapper.java b/src/main/java/org/myrobotlab/framework/repo/IvyWrapper.java index 3d4045aa01..5c8da6bdea 100644 --- a/src/main/java/org/myrobotlab/framework/repo/IvyWrapper.java +++ b/src/main/java/org/myrobotlab/framework/repo/IvyWrapper.java @@ -520,13 +520,9 @@ synchronized public void install(String location, String[] serviceTypes) throws // IvyPatternHelper.substitute("[originalname].[ext]", // artifact); - ArtifactDownloadReport[] artifacts = report.getAllArtifactsReports(); - for (int i = 0; i < artifacts.length; ++i) { - ArtifactDownloadReport ar = artifacts[i]; - Artifact artifact = ar.getArtifact(); - // String filename = - // IvyPatternHelper.substitute("[originalname].[ext]", - // artifact); + File file = ar.getLocalFile(); + String filename = file.getAbsoluteFile().getAbsolutePath(); + log.info("{}", filename); if ("zip".equalsIgnoreCase(artifact.getExt())) { info("unzipping %s", filename);