X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.api%2Fsrc%2Forg%2Fargeo%2Fslc%2FCategoryNameVersion.java;fp=org.argeo.slc.api%2Fsrc%2Forg%2Fargeo%2Fslc%2FCategoryNameVersion.java;h=0000000000000000000000000000000000000000;hb=09c9e5093fe1353aaac344ac8a8caf2e1dcc0778;hp=b335996dd5b7626a20c645350333598f9cb5f11d;hpb=8ff996a3380166be2ae9cf0ef0fa22c58e11746a;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.api/src/org/argeo/slc/CategoryNameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/CategoryNameVersion.java deleted file mode 100644 index b335996dd..000000000 --- a/org.argeo.slc.api/src/org/argeo/slc/CategoryNameVersion.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.argeo.slc; - -/** - * Adds a dimension to {@link NameVersion} by adding an arbitrary category (e.g. - * Maven groupId, yum repository ID, etc.) - */ -public interface CategoryNameVersion extends NameVersion { - /** The category of the component. */ - String getCategory(); - - static CategoryNameVersion parseCategoryNameVersion(String str) { - if (str == null || "".equals(str.trim())) - throw new IllegalArgumentException("At least one character required."); - String[] arr = str.trim().split(":"); - if (arr.length > 3) - throw new IllegalArgumentException(str + " does not respect the [category]:[name]:[version] pattern"); - DefaultCategoryNameVersion res = new DefaultCategoryNameVersion(); - res.setCategory(arr[0]); - if (arr.length > 1) - res.setName(arr[1]); - if (arr.length > 2) - res.setVersion(arr[2]); - return res; - } -}