diff --git a/ph-diver-repo/src/main/java/com/helger/diver/repo/toc/IRepoTopTocService.java b/ph-diver-repo/src/main/java/com/helger/diver/repo/toc/IRepoTopTocService.java
index 58efd64..5c64fef 100644
--- a/ph-diver-repo/src/main/java/com/helger/diver/repo/toc/IRepoTopTocService.java
+++ b/ph-diver-repo/src/main/java/com/helger/diver/repo/toc/IRepoTopTocService.java
@@ -46,10 +46,32 @@ public interface IRepoTopTocService
*/
void initForRepo (@Nonnull IRepoStorageWithToc aRepo);
+ /**
+ * Check if the provided group ID and artifact ID are contained or not.
+ *
+ * @param sGroupID
+ * Group ID to check. May be null
.
+ * @param sArtifactID
+ * Artifact ID to check. May be null
.
+ * @return true
if it is contained, false
if not
+ */
boolean containsGroupAndArtifact (@Nullable String sGroupID, @Nullable String sArtifactID);
+ /**
+ * Iterate all top-level group names.
+ *
+ * @param aGroupNameConsumer
+ * The consumer to be invoked for all top-level group names. Must not
+ * be null
.
+ * @see #getAllTopLevelGroupNames()
+ */
void iterateAllTopLevelGroupNames (@Nonnull Consumer aGroupNameConsumer);
+ /**
+ * @return A set of all contained top-level group names. Never
+ * null
but maybe empty.
+ * @see #iterateAllTopLevelGroupNames(Consumer)
+ */
@Nonnull
@ReturnsMutableCopy
default ICommonsSortedSet getAllTopLevelGroupNames ()
@@ -59,6 +81,21 @@ default ICommonsSortedSet getAllTopLevelGroupNames ()
return ret;
}
+ /**
+ * Iterate all sub groups of the provided group ID.
+ *
+ * @param sGroupID
+ * The top-level or absolute group ID to start at. May neither be
+ * null
nor empty.
+ * @param aGroupNameConsumer
+ * The consumer to be invoked for each match. May not be
+ * null
.
+ * @param bRecursive
+ * true
to iterate recursively, false
to
+ * iterate just one level.
+ * @see #getAllAbsoluteSubGroupNames(String)
+ * @see #getAllAbsoluteSubGroupNamesRecursive(String)
+ */
void iterateAllSubGroups (@Nonnull @Nonempty String sGroupID,
@Nonnull IRepoTopTocGroupNameConsumer aGroupNameConsumer,
boolean bRecursive);
@@ -81,6 +118,17 @@ default ICommonsOrderedSet getAllAbsoluteSubGroupNames (@Nonnull @Nonem
return ret;
}
+ /**
+ * Iterate all artifacts in the provided group ID.
+ *
+ * @param sGroupID
+ * The top-level or absolute group ID to iterate. May neither be
+ * null
nor empty.
+ * @param aArtifactNameConsumer
+ * The consumer to be invoked for each artifact. May not be
+ * null
.
+ * @see #getAllArtefacts(String)
+ */
void iterateAllArtifacts (@Nonnull @Nonempty String sGroupID, @Nonnull Consumer aArtifactNameConsumer);
@Nonnull
@@ -92,6 +140,19 @@ default ICommonsOrderedSet getAllArtefacts (@Nonnull @Nonempty final St
return ret;
}
+ /**
+ * Register a new combination of group ID and artifact ID into the top-level
+ * ToC. If the provided combination is already present, nothing happens and
+ * success is to be returned.
+ *
+ * @param sGroupID
+ * Absolute Group ID to register. May neither be null
nor
+ * empty.
+ * @param sArtifactID
+ * The artifact ID to register. May neither be null
nor
+ * empty.
+ * @return {@link ESuccess} and never null
.
+ */
@Nonnull
ESuccess registerGroupAndArtifact (@Nonnull @Nonempty String sGroupID, @Nonnull @Nonempty String sArtifactID);
}