Coverage Report - org.openpermis.PolicyDecisionPoint
 
Classes in this File Line Coverage Branch Coverage Complexity
PolicyDecisionPoint
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright (c) 2009, Swiss Federal Department of Defence Civil Protection and Sport
 3  
  *                     (http://www.vbs.admin.ch)
 4  
  * Copyright (c) 2009, Ergon Informatik AG (http://www.ergon.ch)
 5  
  * All rights reserved.
 6  
  *
 7  
  * Licensed under the Open Permis License which accompanies this distribution,
 8  
  * and is available at http://www.openpermis.org/BSDlicenceKent.txt
 9  
  */
 10  
 package org.openpermis;
 11  
 
 12  
 import java.net.URI;
 13  
 import java.util.List;
 14  
 
 15  
 import org.openpermis.policy.AccessDecision;
 16  
 import org.openpermis.policy.TimeStamp;
 17  
 
 18  
 
 19  
 /**
 20  
  * Performs policy-based access decisions.
 21  
  * @since 0.1.0
 22  
  */
 23  
 public interface PolicyDecisionPoint {
 24  
 
 25  
         //---- Methods
 26  
         
 27  
         /**
 28  
          * Decides whether a subject may be given access to a target and what obligations
 29  
          * need to be fulfilled.
 30  
          * @param subject a {@link Subject} to identify the user requesting access and to provide
 31  
          * the roles assigned to her.
 32  
          * @param resource a {@link URI} to identify the resource that the subject wants to access.
 33  
          * @param actionName the name of the action that the subject wants to perform on the resource.
 34  
          * @param arguments an optional list of arguments for the action
 35  
          * that the subject wants to perform on the resource.
 36  
          * @return an {@link AccessDecision} containing the PDP's decision and the
 37  
          * obligations associated with the decision.
 38  
          * @throws PolicyDecisionException if the PDP fails to make an access decision.
 39  
          * @since 0.1.0
 40  
          */
 41  
         public AccessDecision getAccessDecision (
 42  
                 Subject subject,
 43  
                 URI resource,
 44  
                 String actionName,
 45  
                 List<?> arguments,
 46  
                 TimeStamp timeStamp
 47  
         )
 48  
                 throws PolicyDecisionException;
 49  
 
 50  
 }