import org.wamblee.persistence.Persistent;
-
/**
- * Service to determine if access to a certain resource is allowed.
- *
+ * Service to determine if access to a certain resource is allowed.
+ *
* @author Erik Brakkee
*/
public interface AuthorizationService extends Persistent {
/**
* Checks whether an operation is allowed on a resource.
- *
- * @param aResource Resource.
- * @param aOperation Operation.
- *
+ *
+ * @param aResource
+ * Resource.
+ * @param aOperation
+ * Operation.
+ *
* @return Checks whether the operation is allowed on a resource.
*/
boolean isAllowed(Object aResource, Operation aOperation);
- /**
- * DOCUMENT ME!
- *
- * @param <T> DOCUMENT ME!
- * @param aResource DOCUMENT ME!
- * @param aOperation DOCUMENT ME!
- *
- * @return DOCUMENT ME!
- */
<T> T check(T aResource, Operation aOperation);
/**
* Gets the authorization rules.
- *
+ *
* @return Rules.
*/
AuthorizationRule[] getRules();
/**
* Appends a new authorization rule to the end.
- *
- * @param aRule Rule to append.
+ *
+ * @param aRule
+ * Rule to append.
*/
void appendRule(AuthorizationRule aRule);
/**
* Removes a rule.
- *
- * @param aIndex Index of the rule to remove.
+ *
+ * @param aIndex
+ * Index of the rule to remove.
*/
void removeRule(int aIndex);
/**
* Inserts a rule.
- *
- * @param aIndex Index of the position of the rule after insertion.
- * @param aRule Rule to insert.
+ *
+ * @param aIndex
+ * Index of the position of the rule after insertion.
+ * @param aRule
+ * Rule to insert.
*/
void insertRuleAfter(int aIndex, AuthorizationRule aRule);
}