Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
2 changes: 2 additions & 0 deletions step-automation-packages/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@
<module>step-automation-packages-manager</module>
<module>step-automation-packages-client</module>
<module>step-automation-packages-controller</module>
<module>step-automation-packages-ide</module>
</modules>

<properties>
</properties>

</project>

65 changes: 65 additions & 0 deletions step-automation-packages/step-automation-packages-ide/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ch.exense.step</groupId>
<artifactId>step-automation-packages</artifactId>
<version>0.0.0-SNAPSHOT</version>
</parent>

<artifactId>step-automation-packages-ide</artifactId>

<properties>
<groupId>ch.exense.step</groupId>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>ch.exense.step</groupId>
<artifactId>step-plans-base-artefacts</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ch.exense.step</groupId>
<artifactId>step-automation-packages-yaml</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.exense.step</groupId>
<artifactId>step-plans-core</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.exense.step</groupId>
<artifactId>step-functions-plugins-jmeter-def</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.exense.step</groupId>
<artifactId>step-functions-plugins-node-def</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.exense.step</groupId>
<artifactId>step-automation-packages-controller</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*******************************************************************************
* Copyright (C) 2026, exense GmbH
*
* This file is part of STEP
*
* STEP is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* STEP is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with STEP. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package step.core.collections;

import java.io.IOException;
import java.util.Properties;

import step.automation.packages.yaml.AutomationPackageYamlFragmentManager;
import step.core.collections.inmemory.InMemoryCollectionFactory;
import step.core.plans.Plan;

public class AutomationPackageCollectionFactory implements CollectionFactory {

private final InMemoryCollectionFactory baseFactory;
private final AutomationPackageYamlFragmentManager fragmentManager;

public AutomationPackageCollectionFactory(Properties properties, AutomationPackageYamlFragmentManager fragmentManager) {
this.fragmentManager = fragmentManager;
this.baseFactory = new InMemoryCollectionFactory(properties);
}

@Override
public <T> Collection<T> getCollection(String name, Class<T> entityClass) {

if (entityClass == Plan.class) {
return (Collection<T>) new AutomationPackagePlanCollection(fragmentManager);
}

return baseFactory.getCollection(name, entityClass);
}

@Override
public Collection<EntityVersion> getVersionedCollection(String name) {
Collection<EntityVersion> baseCollection = baseFactory.getCollection(name, EntityVersion.class);
return baseCollection;
}

@Override
public void close() throws IOException {
baseFactory.close();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*******************************************************************************
* Copyright (C) 2026, exense GmbH
*
* This file is part of STEP
*
* STEP is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* STEP is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with STEP. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package step.core.collections;

import step.automation.packages.yaml.AutomationPackageYamlFragmentManager;
import step.core.collections.inmemory.InMemoryCollection;
import step.core.plans.Plan;

public class AutomationPackagePlanCollection extends InMemoryCollection<Plan> implements Collection<Plan> {


private final AutomationPackageYamlFragmentManager fragmentManager;

public AutomationPackagePlanCollection(AutomationPackageYamlFragmentManager fragmentManager) {
super(true, "plans");
this.fragmentManager = fragmentManager;
fragmentManager.getPlans().forEach(super::save);
}

@Override
public Plan save(Plan p){
return super.save(fragmentManager.savePlan(p));
}

@Override
public void save(Iterable<Plan> iterable) {
for (Plan p : iterable) {
save(p);
}
}

@Override
public void remove(Filter filter) {
find(filter, null, null, null, Integer.MAX_VALUE).forEach(fragmentManager::removePlan);
super.remove(filter);
}
}
Loading