ajour de l'api v1

This commit is contained in:
trochas
2024-10-10 10:35:43 +02:00
parent 7cd8e75c80
commit 01ff7abe04
7 changed files with 51 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

View File

@@ -0,0 +1,9 @@
package fr.istic.nplouzeau.cartaylor.api;
/**
* @author plouzeau
* <p>
* A public type to organize part types in categories
*/
public interface Category {
String getName();
}

View File

@@ -0,0 +1,6 @@
package fr.istic.nplouzeau.cartaylor.api;
import java.util.Set;
public interface CompatibilityChecker {
Set<PartType> getIncompatibilities(PartType reference);
Set<PartType> getRequirements(PartType reference);
}

View File

@@ -0,0 +1,12 @@
package fr.istic.nplouzeau.cartaylor.api;
import java.util.Set;
public interface CompatibilityManager extends CompatibilityChecker {
void addIncompatibilities(PartType reference,
Set<PartType> target);
void removeIncompatibility(PartType reference, PartType
target);
void addRequirements(PartType reference, Set<PartType>
target);
void removeRequirement(PartType reference, PartType
target);
}

View File

@@ -0,0 +1,11 @@
package fr.istic.nplouzeau.cartaylor.api;
import java.util.Set;
public interface Configuration {
boolean isValid();
boolean isComplete();
Set<PartType> getSelectedParts();
void selectPart(PartType chosenPart);
PartType getSelectionForCategory(Category category);
void unselectPartType(Category categoryToClear);
void clear();
}

View File

@@ -0,0 +1,8 @@
package fr.istic.nplouzeau.cartaylor.api;
import java.util.Set;
public interface Configurator {
Set<Category> getCategories();
Set<PartType> getVariants(Category category);
Configuration getConfiguration();
CompatibilityChecker getCompatibilityChecker();
}

View File

@@ -0,0 +1,5 @@
package fr.istic.nplouzeau.cartaylor.api;
public interface PartType {
String getName();
Category getCategory();
}