Changeset 7868


Ignore:
Timestamp:
03/02/11 10:14:34 (8 years ago)
Author:
mnagni
Message:

The timer was created before check if the required provider existed. Fixed.

Location:
RevitalizationWS/ws/DPWS/trunk/src/main/java/ndg/services/revitalization/ejb
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • RevitalizationWS/ws/DPWS/trunk/src/main/java/ndg/services/revitalization/ejb/ModelManager.java

    r7788 r7868  
    384384        } 
    385385 
    386         @SuppressWarnings("unchecked") 
    387386        public ProviderCommon getProviderCommon(int commonId) { 
     387                        return em.find(ProviderCommon.class, commonId); 
     388                        /* 
    388389                        Query query = em.createQuery(GET_PROVIDER_COMMON_BY_ID); 
    389390                        query.setParameter("id", commonId); 
     
    393394                        } 
    394395                        return values.get(0); 
     396                        */ 
    395397        } 
    396398 
     
    457459        } 
    458460         
    459         public TimerInfo getTimerInfo(int providerID){ 
     461        public TimerInfo getTimerInfo(int providerID) throws NdgExecutionException { 
     462                if (getProviderCommon(providerID) == null) { 
     463                        throw new NdgExecutionException("The provider providerId does not exist "); 
     464                } 
    460465                return timerService.getTimerInfo(providerID); 
    461466        } 
  • RevitalizationWS/ws/DPWS/trunk/src/main/java/ndg/services/revitalization/ejb/interfaces/HTITimerServiceLocal.java

    r7625 r7868  
    3434 
    3535import ndg.common.ejb.PeriodicService; 
    36 import ndg.services.revitalization.executor.HarvesterTimerInfo; 
    3736import ndg.services.revitalization.jpa.TimerInfo; 
    3837import ndg.services.revitalization.jpa.TimerInfoLog; 
  • RevitalizationWS/ws/DPWS/trunk/src/main/java/ndg/services/revitalization/ejb/interfaces/ModelManagerLocal.java

    r7660 r7868  
    4545import ndg.services.revitalization.jpa.ProviderCommon; 
    4646import ndg.services.revitalization.jpa.ProviderStatistic; 
    47 import ndg.services.revitalization.jpa.TimerInfo; 
    48 import ndg.services.revitalization.jpa.TimerInfoLog; 
    4947 
    5048/**   
  • RevitalizationWS/ws/DPWS/trunk/src/main/java/ndg/services/revitalization/ejb/interfaces/ModelManagerRemote.java

    r7660 r7868  
    175175         * @param providerID the provider id associated with the timer 
    176176         * @return the {@link TimerInfo} or <code>null</code> if errors occours 
     177         * @throws NdgExecutionException if the providerID does not exist  
    177178         * */ 
    178         public TimerInfo getTimerInfo(int providerID); 
     179        public TimerInfo getTimerInfo(int providerID)  throws NdgExecutionException; 
    179180         
    180181        public void deleteProvider(List<Integer> providerID) throws NdgExecutionException; 
Note: See TracChangeset for help on using the changeset viewer.