+ This module was originally created to provide a way to handle + clicks on hyperlinks in the output window. Some more sophisticated + objects for describing intended operations can be added into this + module in the future. +
++ The URI-based actions are useful if the front-end and back-end of + the application is separated, e.g. in network environment. The + actions can be specified on back-end, but handled on front-end, + without any unnecessary communication. +
+ ++ API for invoking some intended operation, specified by + a URI. For example, for displaying a web page in browser, or for + opening a source file in editor. +
++ SPI for handlers that are able to invoke proper operation for + some URI. +
++ The code is checked by unit tests. +
++ Done. +
++ Intent.execute(Intent.forUri(new URI("scheme://path/"))); ++
+ @OpenUriHandler.Registration(displayName = "Show my item in MyEditor", position = 800, uriPattern = "myscheme://.*") + public class TestOpenUriHandler implements OpenUriHandler { + + public Object open(URI uri) { + if (someCondition) { + // perform the operation + return new Object(); + } else { + return null; + } + } + } ++
+ This module provides a contract between API clients that can express + some intention to invoke an operation (specified e.g. by a URI) and + SPI providers that can handle the URI. +
++ This is useful in client-server environments, where the intention + can be constructed on server-side, but handled on client-side. The + objects that describe the intention should be easy to construct, + transfer and interpret. +
++ No deprecation needed. +
++ Yes. +
++ No standards. +
++ No settings are read or written. +
++ 1.6 +
++ JRE +
++ No non-NB dependencies. +
++ Any platform. +
++ Standard module dependency is sufficient. +
++ Just module JAR. +
++ Yes. +
++ Only API and SPI packages are public. +
++ Installation location does not matter. +
++ No. +
++ No. +
++ No. +
++ No. +
++ No. +
++ No. +
++ No. +
++ No. +
++ The API is threadsafe. SPI implementations should ensure proper + synchronization. +
++ No clipboard access. +
++ No Drag & Drop support. +
++ No files are read or written by this module. +
++ No. +
++ The annotation processor is registered using ServiceProvider. +
++ No. +
++ No. +
++ No. +
++ No. +
++ Very little memory consumed. +
++ No. +
++ No. +
++ Code in the module is very simple. Performance is incluenced mosly + by SPI implementations, which should run quite quickly. +
++ No performance criteria are enforced. The plugged-in code is invoked + by a dedicated executor. +
++ No. +
++ No. +
++ No. +
++ No. +
++ No. +
++ No. +
++ No. +
++ No. +
++ No. +
++ * Result type of the operation will be a boolean value: true if the URI was + * handled, false if no provider was able to handle it. + *
+ * + * @param uri URI describing the operation. + * @return The new URI-based intended operation. + * + * @see OpenUriHandler + */ + public static Intent