dominikriemer commented on code in PR #2645:
URL: https://github.com/apache/streampipes/pull/2645#discussion_r1542645717


##########
streampipes-model/src/main/java/org/apache/streampipes/model/extensions/ExtensionAsset.java:
##########
@@ -15,15 +15,11 @@
  * limitations under the License.
  *
  */
-package org.apache.streampipes.svcdiscovery.api.model;
 
-import org.apache.streampipes.model.extensions.svcdiscovery.SpServiceTag;
-import org.apache.streampipes.model.extensions.svcdiscovery.SpServiceTagPrefix;
+package org.apache.streampipes.model.extensions;
 
-public class DefaultSpServiceTags {
+public class ExtensionAsset {

Review Comment:
   done



##########
streampipes-service-extensions/src/main/java/org/apache/streampipes/service/extensions/StreamPipesExtensionsServiceBase.java:
##########
@@ -98,22 +126,50 @@ private void registerService(SpServiceRegistration 
serviceRegistration) {
     new CoreRequestSubmitter().submitRegistrationRequest(client, 
serviceRegistration);
   }
 
-  protected List<SpServiceTag> getServiceTags() {
-    List<SpServiceTag> tags = new ArrayList<>();
+  protected Set<SpServiceTag> getServiceTags(Set<ExtensionItemDescription> 
extensions) {
+    Set<SpServiceTag> tags = new HashSet<>();
     if (DeclarersSingleton.getInstance().getServiceDefinition() != null) {
       tags.add(SpServiceTag.create(SpServiceTagPrefix.SP_GROUP,
           
DeclarersSingleton.getInstance().getServiceDefinition().getServiceGroup()));
     }
-    tags.addAll(getExtensionsServiceTags());
+    tags.addAll(getExtensionsServiceTags(extensions));
     return tags;
   }
 
+  private Set<ExtensionItemDescription> getAllExtensions() {
+    return Stream.concat(
+            DeclarersSingleton.getInstance().getDeclarers().values().stream()
+                .map(declarer -> declarer.declareConfig().getDescription()),
+            DeclarersSingleton.getInstance().getAdapters().stream().map(a -> 
a.declareConfig().getAdapterDescription())
+        )
+        .peek(entity -> {
+          try {
+            if (entity.isIncludesLocales()) {
+              var labelGenerator = new LabelGenerator<>(entity);
+              entity.setName(labelGenerator.getElementTitle());
+              entity.setDescription(labelGenerator.getElementDescription());
+            }
+          } catch (IOException e) {
+

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to