Coverage Report - pt.digitalis.dif.controller.objects.ControllerExecutionStep
 
Classes in this File Line Coverage Branch Coverage Complexity
ControllerExecutionStep
0%
0/28
0%
0/14
12
ControllerExecutionStep$1
0%
0/1
N/A
12
 
 1  0
 /** 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  
 package pt.digitalis.dif.controller.objects;
 11  
 
 12  
 /**
 13  
  * Represents a dispatcher execution step
 14  
  * 
 15  
  * @author Pedro Viegas <a href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a>
 16  
  * @created Dec 21, 2007
 17  
  */
 18  0
 public enum ControllerExecutionStep {
 19  
 
 20  
     /** Validate request in native channel form */
 21  0
     CHAL_VALIDATE_REQUEST,
 22  
 
 23  
     /** Translate request from native channel request to DIF request */
 24  0
     CHAL_TRANSLATE_REQUEST,
 25  
 
 26  
     /** Identifies the client agent */
 27  0
     CHAL_CLIENT_AGENT_IDENTIFICATION,
 28  
 
 29  
     /** Create the execution context */
 30  0
     DISPATCHER_CREATE_CONTEXT,
 31  
 
 32  
     /** Validate the request */
 33  0
     DISPATCHER_VALIDATE_REQUEST,
 34  
 
 35  
     /** Authentication */
 36  0
     DISPATCHER_AUTHENTICATION,
 37  
 
 38  
     /** Authorization */
 39  0
     DISPATCHER_AUTHORIZATION,
 40  
 
 41  
     /** Stage Execution */
 42  0
     DISPATCHER_EXECUTE,
 43  
 
 44  
     /** Conclude */
 45  0
     DISPATCHER_CONCLUDE,
 46  
 
 47  
     /** Redirection */
 48  0
     DISPATCHER_REDIRECTION,
 49  
 
 50  
     /** Create response object */
 51  0
     DISPATCHER_CREATE_RESPONSE,
 52  
 
 53  
     /** Publish results to view */
 54  0
     CHAL_PUBLISH_RESULTS;
 55  
 
 56  
     /**
 57  
      * @return the current step description
 58  
      */
 59  
     public String getDescription() {
 60  0
         switch (this) {
 61  
         case CHAL_TRANSLATE_REQUEST:
 62  0
             return "Specific Channel request translation to DIF Internal Request";
 63  
             
 64  
         case CHAL_CLIENT_AGENT_IDENTIFICATION:
 65  0
             return "Identification of the client agent";
 66  
 
 67  
         case DISPATCHER_CREATE_CONTEXT:
 68  0
             return "Create the execution context";
 69  
 
 70  
         case DISPATCHER_VALIDATE_REQUEST:
 71  0
             return "Validate the request";
 72  
             
 73  
         case DISPATCHER_AUTHENTICATION:
 74  0
             return "Authentication";
 75  
 
 76  
         case DISPATCHER_AUTHORIZATION:
 77  0
             return "Authorization";
 78  
 
 79  
         case DISPATCHER_EXECUTE:
 80  0
             return "Stage Execution (includes Init, Execute and Finalize).";
 81  
 
 82  
         case DISPATCHER_CONCLUDE:
 83  0
             return "Conclude execution. Internal cleanup tasks";
 84  
 
 85  
         case DISPATCHER_REDIRECTION:
 86  0
             return "Redirection process";
 87  
             
 88  
         case DISPATCHER_CREATE_RESPONSE:
 89  0
             return "Create the DIF response object";
 90  
 
 91  
         case CHAL_PUBLISH_RESULTS:
 92  0
             return "Publish results to view";
 93  
 
 94  
         default:
 95  0
             return "";
 96  
         }
 97  
     }
 98  
 
 99  
     /**
 100  
      * @see java.lang.Enum#toString()
 101  
      */
 102  
     @Override
 103  
     public String toString() {
 104  0
         return super.toString() + ": " + this.getDescription();
 105  
     }
 106  
 }