Community
Participate
Working Groups
The current repository factory methods for validation are not suitable for validating user input as they perform long running communication (in some cases) to perform real validation. A method is needed that only performs those checks that are safe to use in a UI.
Fixed in HEAD. RepositoryHelper#checkRepositoryLocationSyntax can now be used. It returns IStatus.ERROR with appropriate NLS message, or IStatus.OK
Updated the UI to use this method. Had to add the UI as a friend in the manifest. (And I noticed the milestone was marked 3.4M7 so am changing to 3.5M7) thanks...
The testing of scheme in RepositoryHelper#checkRepositoryLocation is incorrect because we are not using URL to actually load the file. For example if someone was to add a new protocol (e.g. "db:") using ECF pluggable transport layer, then we could not add a repository. The proper check should involve ECF, however I don't think there is an API to get the list of protocols it understand.
(In reply to comment #3) > The testing of scheme in RepositoryHelper#checkRepositoryLocation is incorrect > because we are not using URL to actually load the file. For example if someone > was to add a new protocol (e.g. "db:") using ECF pluggable transport layer, > then we could not add a repository. > The proper check should involve ECF, however I don't think there is an API to > get the list of protocols it understand. > See Bug 272557. I asked Scott how it should be done, and I used his recommendation. As I understand it, ECF makes sure that schemes gets recognized when creating a URL. We should check again with Scott to make sure (adding him as cc). Inside ECF, the URI (or String) passed as location will (afaik) be turned into a URL, so I do believe that the check is ok.
I was not aware about this. I naively thought ECF would not force ppl to register their protocol as a URL handler.
(In reply to comment #5) > I was not aware about this. I naively thought ECF would not force ppl to > register their protocol as a URL handler. > It doesn't force them to do anything :). Rather it registers protocols declared via extension as URL handlers automatically...so that they can create and then use the URLs as input to IFileID creation. Now that we've moved to CDC 1.1 environment, where URI is available (rather than URL), we can relax this...but that change did not get in under the API freeze wire.
Thanks Scott. Marking this fixed.
noticed this was marked 3.5 while culling the remaining 3.5 bugs. Changing to 3.5M7