You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2013/04/12 16:23:57 UTC

svn commit: r1467280 - /sling/trunk/bundles/api/src/main/java/org/apache/sling/api/security/ResourceAccessSecurity.java

Author: cziegeler
Date: Fri Apr 12 14:23:57 2013
New Revision: 1467280

URL: http://svn.apache.org/r1467280
Log:
Clean up interface

Modified:
    sling/trunk/bundles/api/src/main/java/org/apache/sling/api/security/ResourceAccessSecurity.java

Modified: sling/trunk/bundles/api/src/main/java/org/apache/sling/api/security/ResourceAccessSecurity.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/security/ResourceAccessSecurity.java?rev=1467280&r1=1467279&r2=1467280&view=diff
==============================================================================
--- sling/trunk/bundles/api/src/main/java/org/apache/sling/api/security/ResourceAccessSecurity.java (original)
+++ sling/trunk/bundles/api/src/main/java/org/apache/sling/api/security/ResourceAccessSecurity.java Fri Apr 12 14:23:57 2013
@@ -24,19 +24,18 @@ import org.apache.sling.api.resource.Res
 /**
  * The <code>ResourceAccessSecurity</code> defines a service API which might be
  * used in implementations of resource providers where the underlying
- * persistence layer does not implement access control. The goal is to make it 
+ * persistence layer does not implement access control. The goal is to make it
  * easy to implement a lightweight access control in such providers.
- * 
+ *
  * Expected to only be implemented once in the framework/application (much
  * like the OSGi LogService or ConfigurationAdmin Service) - ResourceProvider
  * implementations are encouraged to use this service for access control unless
  * the underlying storage already provides it.
- * 
+ *
  * JCR resource providers should *not* use this - in a JCR context, security is
  * fully delegated to the underlying repository, and mixing security models would
  * be a bad idea.
  */
-
 public interface ResourceAccessSecurity {
 
     /** If supplied Resource can be read, return it (or a wrapped
@@ -44,46 +43,46 @@ public interface ResourceAccessSecurity 
      *  instead of the one that was passed into the method.
      *  @return null if {@link Resource} cannot be read
      */
-    public Resource getReadableResource(Resource resource);
+    Resource getReadableResource(Resource resource);
 
-    /** @return true if a {@link Resource} can be created at the supplied 
+    /** @return true if a {@link Resource} can be created at the supplied
      *  absolute path. */
-    public boolean canCreate(String absPathName, ResourceResolver resourceResolver);
+    boolean canCreate(String absPathName, ResourceResolver resourceResolver);
 
-    /** @return true if supplied {@link Resource} can be updated */ 
-    public boolean canUpdate(Resource resource);
+    /** @return true if supplied {@link Resource} can be updated */
+    boolean canUpdate(Resource resource);
 
-    /** @return true if supplied {@link Resource} can be deleted */ 
-    public boolean canDelete(Resource resource);
+    /** @return true if supplied {@link Resource} can be deleted */
+    boolean canDelete(Resource resource);
 
-    /** @return true if supplied {@link Resource} can be executed as a script */ 
-    public boolean canExecute(Resource resource);
+    /** @return true if supplied {@link Resource} can be executed as a script */
+    boolean canExecute(Resource resource);
 
-    /** @return true if the "valueName" value of supplied {@link Resource} can be read */ 
-    public boolean canReadValue(Resource resource, String valueName);
+    /** @return true if the "valueName" value of supplied {@link Resource} can be read */
+    boolean canReadValue(Resource resource, String valueName);
 
-    /** @return true if the "valueName" value of supplied {@link Resource} can be set */ 
-    public boolean canSetValue(Resource resource, String valueName);
+    /** @return true if the "valueName" value of supplied {@link Resource} can be set */
+    boolean canSetValue(Resource resource, String valueName);
 
-    /** @return true if the "valueName" value of supplied {@link Resource} can be deleted */ 
-    public boolean canDeleteValue(Resource resource, String valueName);
+    /** @return true if the "valueName" value of supplied {@link Resource} can be deleted */
+    boolean canDeleteValue(Resource resource, String valueName);
 
     /**
      * Optionally transform a query based on the current
      * user's credentials. Can be used to narrow down queries to omit results
      * that the current user is not allowed to see anyway, to speed up
      * downstream access control.
-     * 
+     *
      * Query transformations are not critical with respect to access control as results
-     * are filtered downstream using the canRead.. methods. 
-     * 
+     * are filtered downstream using the canRead.. methods.
+     *
      * @param query the query
      * @param language the language in which the query is expressed
      * @param resourceResolver the resource resolver which resolves the query
      * @return the transformed query
-     * @throws AccessSecurityException 
+     * @throws AccessSecurityException
      */
-    public String transformQuery(String query, String language, ResourceResolver resourceResolver)
-            throws AccessSecurityException;
+    String transformQuery(String query, String language, ResourceResolver resourceResolver)
+    throws AccessSecurityException;
 
 }
\ No newline at end of file