Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[repository] Provide a namespace for categorizing resources #602

Open
laeubi opened this issue Jul 6, 2023 · 4 comments
Open

[repository] Provide a namespace for categorizing resources #602

laeubi opened this issue Jul 6, 2023 · 4 comments

Comments

@laeubi
Copy link
Contributor

laeubi commented Jul 6, 2023

Currently the Repository Service Specification defines an osgi.content Namespace.

But a repository sometimes do not only contains a loose collection of resources but has some mean of categorizing/grouping items. This is especially common when installing from an UI where a user wants to navigate through possible candidate items, a popular example is when you install new software from a P2 software site:

grafik

I therefore like to propose a new namespace provided by the repository specification that allows to categorize items.

public class RepositoryCategoryNamespace {

    /**
     * Namespace name for repository category capabilities and requirements.
     */
    public static final String REPOSITORY_CATEGORY_NAMESPACE = "osgi.repository.category";

    /**
     * The capability attribute identifying a name for this category.
     */
    public static final String CAPABILITY_NAME_ATTRIBUTE = "name";

    /**
     * The capability attribute identifying the description of the category.
     */
    public static final String CAPABILITY_DESCRIPTION_ATTRIBUTE = "description";
}

A category can then be modeled by a resources that requires all its child items.

@timothyjward
Copy link
Contributor

As discussed on the call, I can see why this is a compelling thing to put in a repository.

A couple of comments:

  • Is a category really a namespace? Namespaces define requirements and capabilities, but a category doesn't seem like either of those things. Should it be a resource type?
  • Who will the users of this standard be? If this is intended to provide category information in the Eclipse installer would it be sufficient to use an Eclipse specific type?

I'm pretty convinced that the answer to the first question is no, but I don't really know about the second. If the set of users is wider than Eclipse then standardising may make sense, if not then the existing extensibility in the repository definition would allow this to work without specification changes

@timothyjward
Copy link
Contributor

timothyjward commented Aug 2, 2023

Is a category really a namespace? Namespaces define requirements and capabilities, but a category doesn't seem like either of those things. Should it be a resource type?

Yes - it is a resource with an identity capability and a type. Attributes name and description (already in use) provide the human readable text.

Who will the users of this standard be? If this is intended to provide category information in the Eclipse installer would it be sufficient to use an Eclipse specific type?

We agreed on the call to collect other use cases (outside Eclipse RCP) so that we can assess the answer to this

@maho7791
Copy link
Contributor

maho7791 commented Aug 2, 2023

I could see a this as kind of tagging a resource to a certain category.

This could then also used as filtering.

@laeubi
Copy link
Contributor Author

laeubi commented Aug 2, 2023

Reusing the identity seems good, it might still be good to describe the type in the Repository spec even though it is more a "User Display Thing", e.g. I can think about a webrenderer of a repository that shows you the content of a repository.xml in a human friendly way that also displays categories.

Also Knopflerfish has an UI for the user and also BNDTools show things to the user and might benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants