sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-jcr-jackrabbit-accessmanager] 14/35: SLING-2309 AccessManager - Convert @scr Java Doc Tags to SCR Annotations
Date Tue, 07 Nov 2017 09:48:43 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.accessmanager-2.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-accessmanager.git

commit 0a56b45227a7d60a527b408b682e9171b246ca8c
Author: Eric Norman <enorman@apache.org>
AuthorDate: Wed Nov 30 03:30:19 2011 +0000

    SLING-2309 AccessManager - Convert @scr Java Doc Tags to SCR Annotations
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-accessmanager@1208235
13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  7 +++++
 .../accessmanager/post/DeleteAcesServlet.java      | 27 ++++++++++++------
 .../accessmanager/post/GetAclServlet.java          | 32 ++++++++++++++++------
 .../accessmanager/post/GetEffectiveAclServlet.java | 32 ++++++++++++++++------
 .../accessmanager/post/ModifyAceServlet.java       | 29 ++++++++++++++------
 5 files changed, 93 insertions(+), 34 deletions(-)

diff --git a/pom.xml b/pom.xml
index a9babcc..4b8eab9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -144,5 +144,12 @@
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>
+        
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+            <version>1.6.0</version>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
 </project>
diff --git a/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/DeleteAcesServlet.java
b/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/DeleteAcesServlet.java
index 42ff18e..c67f344 100644
--- a/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/DeleteAcesServlet.java
+++ b/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/DeleteAcesServlet.java
@@ -28,7 +28,12 @@ import javax.jcr.Session;
 import javax.jcr.security.AccessControlEntry;
 import javax.jcr.security.AccessControlList;
 import javax.jcr.security.AccessControlManager;
+import javax.servlet.Servlet;
 
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.ResourceNotFoundException;
 import org.apache.sling.api.servlets.HtmlResponse;
@@ -67,15 +72,21 @@ import org.apache.sling.servlets.post.SlingPostConstants;
  * <dt>500</dt>
  * <dd>Failure. HTML explains the failure.</dd>
  * </dl>
- *
- * @scr.component immediate="true" label="%deleteAces.post.operation.name"
- *                description="%deleteAces.post.operation.description"
- * @scr.service interface="javax.servlet.Servlet"
- * @scr.service interface="org.apache.sling.jcr.jackrabbit.accessmanager.DeleteAces"
- * @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
- * @scr.property name="sling.servlet.methods" value="POST"
- * @scr.property name="sling.servlet.selectors" value="deleteAce"
  */
+@Component (immediate=true, 
+		label="%deleteAces.post.operation.name", 
+		description="%deleteAces.post.operation.description")
+@Service (value={
+		Servlet.class,
+		DeleteAces.class})
+@Properties ({
+	@Property (name="sling.servlet.resourceTypes", 
+			value="sling/servlet/default"),
+	@Property (name="sling.servlet.methods", 
+			value="POST"),
+	@Property (name="sling.servlet.selectors", 
+			value="deleteAce")
+})
 public class DeleteAcesServlet extends AbstractAccessPostServlet implements DeleteAces {
 	private static final long serialVersionUID = 3784866802938282971L;
 
diff --git a/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetAclServlet.java
b/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetAclServlet.java
index 9bd3a73..ae857e4 100644
--- a/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetAclServlet.java
+++ b/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetAclServlet.java
@@ -22,7 +22,12 @@ import javax.jcr.security.AccessControlEntry;
 import javax.jcr.security.AccessControlList;
 import javax.jcr.security.AccessControlManager;
 import javax.jcr.security.AccessControlPolicy;
+import javax.servlet.Servlet;
 
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.commons.json.JSONException;
 import org.apache.sling.commons.json.JSONObject;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
@@ -92,16 +97,25 @@ import org.apache.sling.jcr.jackrabbit.accessmanager.GetAcl;
  * }
  * </pre>
  * </code>
- *
- * @scr.component immediate="true" label="%getAcl.get.operation.name"
- *                description="%getAcl.get.operation.description"
- * @scr.service interface="javax.servlet.Servlet"
- * @scr.service interface="org.apache.sling.jcr.jackrabbit.accessmanager.GetAcl"
- * @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
- * @scr.property name="sling.servlet.methods" value="GET"
- * @scr.property name="sling.servlet.selectors" value="acl"
- * @scr.property name="sling.servlet.extensions" value="json"
  */
+@Component (immediate=true,
+		label="%getAcl.get.operation.name",
+		description="%getAcl.get.operation.description"
+)
+@Service (value={
+		Servlet.class,
+		GetAcl.class
+})
+@Properties ({
+	@Property (name="sling.servlet.resourceTypes", 
+			value="sling/servlet/default"),
+	@Property (name="sling.servlet.methods", 
+			value="GET"),
+	@Property (name="sling.servlet.selectors", 
+			value="acl"),
+	@Property (name="sling.servlet.extensions", 
+			value="json"),
+})
 public class GetAclServlet extends AbstractGetAclServlet implements GetAcl {
 	private static final long serialVersionUID = 3391376559396223185L;
 
diff --git a/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetEffectiveAclServlet.java
b/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetEffectiveAclServlet.java
index 96309e4..5de2ab0 100644
--- a/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetEffectiveAclServlet.java
+++ b/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetEffectiveAclServlet.java
@@ -22,7 +22,12 @@ import javax.jcr.security.AccessControlEntry;
 import javax.jcr.security.AccessControlList;
 import javax.jcr.security.AccessControlManager;
 import javax.jcr.security.AccessControlPolicy;
+import javax.servlet.Servlet;
 
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.commons.json.JSONException;
 import org.apache.sling.commons.json.JSONObject;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
@@ -92,16 +97,25 @@ import org.apache.sling.jcr.jackrabbit.accessmanager.GetEffectiveAcl;
  * }
  * </pre>
  * </code>
- *
- * @scr.component immediate="true" label="%getEffectiveAcl.get.operation.name"
- *                description="%getEffectiveAcl.get.operation.description"
- * @scr.service interface="javax.servlet.Servlet"
- * @scr.service interface="org.apache.sling.jcr.jackrabbit.accessmanager.GetEffectiveAcl"
- * @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
- * @scr.property name="sling.servlet.methods" value="GET"
- * @scr.property name="sling.servlet.selectors" value="eacl"
- * @scr.property name="sling.servlet.extensions" value="json"
  */
+@Component (immediate=true,
+		label="%getEffectiveAcl.get.operation.name",
+		description="%getEffectiveAcl.get.operation.description"
+)
+@Service (value={
+		Servlet.class,
+		GetEffectiveAcl.class
+})
+@Properties ({
+	@Property (name="sling.servlet.resourceTypes", 
+			value="sling/servlet/default"),
+	@Property (name="sling.servlet.methods", 
+			value="GET"),
+	@Property (name="sling.servlet.selectors", 
+			value="eacl"),
+	@Property (name="sling.servlet.extensions", 
+			value="json"),
+})
 @SuppressWarnings("serial")
 public class GetEffectiveAclServlet extends AbstractGetAclServlet implements GetEffectiveAcl
{
 
diff --git a/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/ModifyAceServlet.java
b/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/ModifyAceServlet.java
index add420f..c387b8c 100644
--- a/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/ModifyAceServlet.java
+++ b/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/ModifyAceServlet.java
@@ -28,7 +28,12 @@ import java.util.Map.Entry;
 import javax.jcr.Item;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
+import javax.servlet.Servlet;
 
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
 import org.apache.jackrabbit.api.security.principal.PrincipalManager;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.ResourceNotFoundException;
@@ -77,15 +82,23 @@ import org.apache.sling.servlets.post.Modification;
  * the UserManager. This can be a group or a user, but if its a group, denied permissions
  * will not be added to the group. The group will only contain granted privileges.
  * </p>
- *
- * @scr.component immediate="true" label="%modifyAce.post.operation.name"
- *                description="%modifyAce.post.operation.description"
- * @scr.service interface="javax.servlet.Servlet"
- * @scr.service interface="org.apache.sling.jcr.jackrabbit.accessmanager.ModifyAce"
- * @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
- * @scr.property name="sling.servlet.methods" value="POST"
- * @scr.property name="sling.servlet.selectors" value="modifyAce"
  */
+@Component (immediate=true,
+		label="%modifyAce.post.operation.name",
+		description="%modifyAce.post.operation.description"
+)
+@Service (value={
+		Servlet.class,
+		ModifyAce.class
+})
+@Properties ({
+	@Property (name="sling.servlet.resourceTypes", 
+			value="sling/servlet/default"),
+	@Property (name="sling.servlet.methods", 
+			value="POST"),
+	@Property (name="sling.servlet.selectors", 
+			value="modifyAce")
+})
 public class ModifyAceServlet extends AbstractAccessPostServlet implements ModifyAce {
 	private static final long serialVersionUID = -9182485466670280437L;
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message