Coverage Report - pt.digitalis.dif.controller.security.objects.IUserAuthorization
 
Classes in this File Line Coverage Branch Coverage Complexity
IUserAuthorization
N/A
N/A
1
 
 1  
 /** 2007, Digitalis Informatica. All rights reserved.
 2  
  * 
 3  
  * Distribuicao e Gestao de Informatica, Lda.
 4  
  * Estrada de Paco de Arcos num.9 - Piso -1
 5  
  * 2780-666 Paco de Arcos
 6  
  * Telefone: (351) 21 4408990
 7  
  * Fax: (351) 21 4408999
 8  
  * http://www.digitalis.pt 
 9  
  */
 10  
 
 11  
 package pt.digitalis.dif.controller.security.objects;
 12  
 
 13  
 import pt.digitalis.dif.dem.Entity;
 14  
 import pt.digitalis.dif.dem.interfaces.IStage;
 15  
 
 16  
 /**
 17  
  * Defines the behavior a user must provide regarding authorization.
 18  
  * 
 19  
  * @author Pedro Viegas <a href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a><br/>
 20  
  * @author Rodrigo Gonçalves <a href="mailto:rgoncalves@digitalis.pt">rgoncalves@digitalis.pt</a><br/>
 21  
  * @created 2007/12/04
 22  
  */
 23  
 public interface IUserAuthorization {
 24  
 
 25  
     /**
 26  
      * Checks if the user can access a given resource.
 27  
      * 
 28  
      * @param resourceType
 29  
      *            the resource (entity) type.
 30  
      * @param resourceId
 31  
      *            the id of the resource to check access
 32  
      * @return T if the user can access the resource, F otherwise
 33  
      */
 34  
     public boolean canAccess(Entity resourceType, String resourceId);
 35  
 
 36  
     /**
 37  
      * Checks if the user can access a given stage. Will parse the DEM for inherited grants
 38  
      * 
 39  
      * @param stage
 40  
      *            the stage to check
 41  
      * @return T if the user can access the stage, F otherwise
 42  
      */
 43  
     public boolean canAccess(IStage stage);
 44  
 }