Initialization of authorization service from the code is now working.
[photos] / src / main / java / org / wamblee / photos / security / PageAuthorizationRule.java
index b32f5dfe663711f24567e09fa0558e264b46a1e9..97cf8fcac1f1419722f45b69dc178f8ffecd8005 100644 (file)
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.wamblee.photos.security;
 
 import javax.persistence.DiscriminatorValue;
@@ -36,26 +35,21 @@ public class PageAuthorizationRule extends UrlAuthorizationRule {
 
     /**
      * Type-safe construction of page authorization rule.
-     * 
-     * @param aResult
-     *            Result.
-     * @param aUserCondition
-     *            User condition.
-     * @param aPageList
-     *            A list of page names.
+     *
+     * @param aResult        Result.
+     * @param aUserCondition User condition.
+     * @param aPageList      A list of page names.
      */
-    public PageAuthorizationRule(AuthorizationResult aResult,
-        UserCondition aUserCondition, Class<? extends BasePage>... aPageList) {
-        super(aResult, aUserCondition, new RegexpPathCondition(
-            getPageRegex(aPageList)), BasePage.class,
-            new IsaOperationCondition(AllOperation.class));
+    public PageAuthorizationRule(AuthorizationResult aResult, UserCondition aUserCondition,
+            Class<? extends BasePage>... aPageList) {
+        super(aResult, aUserCondition, new RegexpPathCondition(getPageRegex(aPageList)), BasePage.class,
+                new IsaOperationCondition(AllOperation.class));
     }
 
     /**
      * Converts a list of page names into a regular expression for the pages.
-     * 
-     * @param aPageList
-     *            List of pages.
+     *
+     * @param aPageList List of pages.
      * @return Regexp matching any of the given pagenames.
      */
     private static String getPageRegex(Class<? extends BasePage>[] aPageList) {
@@ -77,8 +71,12 @@ public class PageAuthorizationRule extends UrlAuthorizationRule {
         super();
     }
 
-    /* (non-Javadoc)
-     * @see org.wamblee.security.authorization.UrlAuthorizationRule#getResourcePath(java.lang.Object)
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.wamblee.security.authorization.UrlAuthorizationRule#getResourcePath
+     * (java.lang.Object)
      */
     @Override
     protected String getResourcePath(Object aResource) {