Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions framework/fel/java/components/pom.xml

This file was deleted.

4 changes: 2 additions & 2 deletions framework/fel/java/plugins/tool-discoverer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<artifactId>fit-build-maven-plugin</artifactId>
<version>${fit.version}</version>
<configuration>
<category>system</category>
<level>5</level>
<category>user</category>
<level>2</level>
</configuration>
<executions>
<execution>
Expand Down
4 changes: 2 additions & 2 deletions framework/fel/java/plugins/tool-executor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<artifactId>fit-build-maven-plugin</artifactId>
<version>${fit.version}</version>
<configuration>
<category>system</category>
<level>6</level>
<category>user</category>
<level>2</level>
</configuration>
<executions>
<execution>
Expand Down
4 changes: 2 additions & 2 deletions framework/fel/java/plugins/tool-factory-repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
<artifactId>fit-build-maven-plugin</artifactId>
<version>${fit.version}</version>
<configuration>
<category>system</category>
<level>4</level>
<category>user</category>
<level>2</level>
</configuration>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import modelengine.fel.tool.ToolFactoryRepository;
import modelengine.fitframework.annotation.Component;
import modelengine.fitframework.log.Logger;
import modelengine.fitframework.util.StringUtils;

import java.util.Map;
import java.util.Optional;
Expand All @@ -33,7 +34,7 @@ public void register(ToolFactory factory) {
if (factory == null) {
return;
}
this.factoryCache.put(factory.type(), factory);
this.factoryCache.put(StringUtils.toUpperCase(factory.type()), factory);
log.info("Register factory[type={}] success.", factory.type());
}

Expand All @@ -42,12 +43,16 @@ public void unregister(ToolFactory factory) {
if (factory == null) {
return;
}
this.factoryCache.remove(factory.type());
this.factoryCache.remove(StringUtils.toUpperCase(factory.type()));
log.info("Unregister factory[type={}] success.", factory.type());
}

@Override
public Optional<ToolFactory> match(Set<String> runnables) {
return runnables.stream().filter(this.factoryCache::containsKey).map(this.factoryCache::get).findFirst();
return runnables.stream()
.map(StringUtils::toUpperCase)
.filter(this.factoryCache::containsKey)
.map(this.factoryCache::get)
.findFirst();
}
}
4 changes: 2 additions & 2 deletions framework/fel/java/plugins/tool-repository-simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<artifactId>fit-build-maven-plugin</artifactId>
<version>${fit.version}</version>
<configuration>
<category>system</category>
<level>4</level>
<category>user</category>
<level>1</level>
</configuration>
<executions>
<execution>
Expand Down
1 change: 0 additions & 1 deletion framework/fel/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
</scm>

<modules>
<module>components</module>
<module>fel-community</module>
<module>fel-core</module>
<module>fel-flow</module>
Expand Down
1 change: 1 addition & 0 deletions framework/fel/java/services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<packaging>pom</packaging>

<modules>
<module>tool-info</module>
<module>tool-service</module>
</modules>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<parent>
<groupId>org.fitframework.fel</groupId>
<artifactId>fel-component-parent</artifactId>
<artifactId>fel-parent</artifactId>
<version>3.5.0-SNAPSHOT</version>
</parent>

Expand All @@ -20,6 +20,19 @@

<build>
<plugins>
<plugin>
<groupId>org.fitframework</groupId>
<artifactId>fit-build-maven-plugin</artifactId>
<version>${fit.version}</version>
<executions>
<execution>
<id>build-service</id>
<goals>
<goal>build-service</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.fitframework</groupId>
<artifactId>fit-dependency-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

package modelengine.fel.tool;

import modelengine.fel.core.tool.ToolInfo;
import modelengine.fel.tool.info.entity.ToolEntity;
import modelengine.fitframework.inspection.Nonnull;
import modelengine.fitframework.util.StringUtils;
Expand Down Expand Up @@ -63,7 +64,7 @@ public Map<String, Object> extensions() {

@Override
public String uniqueName() {
return StringUtils.EMPTY;
return ToolInfo.identify(this.namespace(), this.name());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ public static Tool.Info convertToInfo(ToolData toolData) {
.isLatest(toolData.getLatest())
.returnConverter(ObjectUtils.cast(toolData.getSchema().get(ToolSchema.RETURN_CONVERTER)))
.defaultParameterValues(ToolData.defaultParamValues(toolData.getSchema()))
.parameters(toolData.getParameters())
.namespace(toolData.getNamespace())
.build();
}

Expand Down

This file was deleted.

This file was deleted.

Loading
Loading