Re: [projects-dev] Libraries API
Svata Dedic <[email protected]> Sun, 25 May 2003 18:21:23 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Organization | CollabNet Hosting |
| Message-ID | <[email protected]> |
Petr Kuzel wrote: > >>* What are the use cases for "library" defined locally within a project ? > > To be able to share it with project. It simplifies project > configuration in team environment. > Yes, but I still do not follow the use cases: project definition is shared anyway, so what are the scenarios to group project resources, or build targets (or other things ?) into libraries for sharing ? > >>* Does the API return FileSet of resource definitions within the library >>or set of referenced files (e.g. set of .jar files) ? In the later case, >> why is there a restriction that all resources must be file-based ? > > These URLs are rendered by volumes to instances returned by > volume Lookup. I hope that URL allows to represent virtually > anything. > Almost -- IMO it is good to use FileSet as the least common denominator interface to query library contents, but not restrict the contents to be file-based. > >>* Library.create() -- where does that create the Library ? In some >>project, in "Personal" area or somewhere else ? Why the library is not >>given a human-readable name from the start ? > > Nowhere, library itself does not know where it is stored. > I have not received requirement for programmatic library > definitions (except those final at module layer). Therefore > only implementation that provides UI is able to add > it to storage. The create() method serves for framework > purposes, it's not client method (until library storage > methods exposed). It needs to be better documented. > OK, thanks. >>* I do not see a use case for setContent() method, which stores a random >>fileset into the Library. If the client and the "Volume provider" agree >>on some data type, they may agree on some protocol to alter/add to that >>data, too. Note that setContent is not sufficient for e.g. Classpath, >>where ordering counts. > > Such method does not exist at API level. > Mea culpa. I browsed through api, spi and the implementation and it seems to mix in my brain together, sorry for the confusion. When we are at setContent() :) -- could you please describe how the collaboration between the framework and individual providers is supposed to work in Library customizer ? > >>* I wonder how would the API user describe, using e.g. a FileSet, the >>build output from a specific build configuration from a specific >>project. The API seems not expressive enough. > > Is it use case for library? You can add remote build target > project resource directly. > See above -- why shouldn't the user be able to add this resource type to a library, supposing other (less arcane) project resources can be added ? > >>* Functionality required for uniform presentation could be easily >>achieved by some enumerator interface on VolumeProviders. > > I cannot not get it. > I initially thought that the narrow FileSet-based content interface is there in order for the framework to present library contents. When we have Looks, it is also possible for the provider to implement some generic enumerator interface + register Looks to achieve the same goal. > >>Naming: >> >>Volume sounds much more like a measure than a content, could it be >>changed to "Content" and "VolumeProvider" to "ContentProvider", or even >>to "Resource" and "ResourceProvider", since libraries are all about >>resources ? > > Content and Resource names are highly overloaded. Unique > name like Volume should simplify communication. > Well, they did not seem to :) > > >>Hardcoded to UI spec: > > Oops - yes, a relict that is probably off-topic now, when I briefly looked at the framework <-> provider boundary, it seemed to be rather restrictive - it depends on how the collaboration is supposed to work. -Svata