You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2018/11/20 15:05:36 UTC
[sling-org-apache-sling-capabilities] branch master updated: fix
interface description
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-capabilities.git
The following commit(s) were added to refs/heads/master by this push:
new 56f02e5 fix interface description
56f02e5 is described below
commit 56f02e5a26f156471cd470033a3e0a7a0de5ff8a
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Tue Nov 20 16:05:32 2018 +0100
fix interface description
---
README.md | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index 0727fe8..4eee0a6 100644
--- a/README.md
+++ b/README.md
@@ -23,23 +23,26 @@ Services that implement the `CapabilitiesSource` interface provide capabilities.
Each service must have its own unique namespace, used to split the capabilities in
categories that can be provided separately (see below):
-
-
@ProviderType
public interface CapabilitiesSource {
- /** Return zero to N capabilities, each being represented by
- * a key/value pair.
- *
- * Services implementing this interface must be careful to
- * avoid crossing trust boundaries. They should only expose data that
- * is accessible to the ResourceResolver that's passed
- * as a parameter.
- *
- * @return a Map of capabilities
- * @param resolver used to establish the user's identity
- * @throws Exception if the capabilities could not be computed.
- */
- Map<String, Object> getCapabilities(ResourceResolver resolver) throws Exception;
+ /** @return the namespace to use to group our capabilities.
+ * That name must be unique in a given Sling instance.
+ */
+ String getNamespace();
+
+ /** Return zero to N capabilities, each being represented by
+ * a key/value pair.
+ *
+ * Services implementing this interface must be careful to
+ * avoid crossing trust boundaries. They should only expose data that
+ * is accessible to the ResourceResolver that's passed
+ * as a parameter.
+ *
+ * @return a Map of capabilities
+ * @param resolver used to establish the user's identity
+ * @throws Exception if the capabilities could not be computed.
+ */
+ Map<String, Object> getCapabilities(ResourceResolver resolver) throws Exception;
}
The sling/capabilities resource type