Changeset 7261


Ignore:
Timestamp:
03/08/10 08:12:10 (9 years ago)
Author:
mnagni
Message:

Small changes on the logging messages and the "throwing" strategy
Medin Discovery Service version 1.2.2

Location:
TI01-discovery-API/trunk/MEDINDiscoveryService
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery-API/trunk/MEDINDiscoveryService/pom.xml

    r7144 r7261  
    44        <groupId>ndg.services.discovery</groupId> 
    55        <artifactId>MedinDiscoveryService</artifactId> 
    6         <version>1.2.1</version> 
     6        <version>1.2.2</version> 
    77        <packaging>aar</packaging> 
    88 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/services/discovery/DiscoveryServiceMEDINSkeleton.java

    r7144 r7261  
    451451                } 
    452452                NdgMessage msg = new NdgMessage("client.ip", new Object[] { ipAddress }); 
    453                 logHelper.logMessage(msg, Level.INFO); 
     453                logHelper.logMessage(msg, Level.DEBUG); 
    454454        } 
    455455 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/services/discovery/model/CommonMethods.java

    r7126 r7261  
    116116                } 
    117117                 
    118                 logHelper.logMessage("SQL query generated: " + selectSQL, Level.INFO); 
     118                logHelper.logMessage("SQL query generated: " + selectSQL, Level.DEBUG); 
    119119                return selectSQL.toString(); 
    120120        } 
    121121         
    122122        String assembleSearch(SearchCriteria criteria, RetrieveCriteriaType retrieveType)  
    123                         throws NdgException{ 
     123                        throws AssembleQueryException{ 
    124124 
    125125                // NB, we use the postgres text search function to do term searches 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/services/discovery/model/PresentAgent.java

    r7126 r7261  
    1515import ndg.common.NdgLogger; 
    1616import ndg.common.NdgMessage; 
     17import ndg.common.exception.AssembleQueryException; 
    1718import ndg.common.exception.NdgException; 
    1819import ndg.common.exception.NdgSQLException; 
     
    200201         *  
    201202         * @return SearchSummary object containing result of search 
    202          * @throws NdgException  
     203         * @throws NdgSQLException  
     204         * @throws AssembleQueryException  
     205         * @throws ResourceNotAvailable   
    203206         */ 
    204         public List<OriginalDocument> doPresent(Connection conn, List<String> documentsId, RetrieveCriteriaType type) 
    205                         throws NdgException { 
     207        public List<OriginalDocument> doPresent(Connection conn, List<String> documentsId, RetrieveCriteriaType type) throws NdgSQLException, AssembleQueryException, ResourceNotAvailable { 
    206208                if (documentsId == null || documentsId.size() == 0) 
    207209                        return new ArrayList<OriginalDocument>(); 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/services/discovery/model/SearchAgent.java

    r7126 r7261  
    7777         * @throws ResourceNotAvailable 
    7878         *             if cannot access to the database 
     79         * @throws NdgSQLException  
     80         * @throws AssembleQueryException  
    7981         */ 
    80         public List<OriginalDocument> doSearch() throws NdgException, ResourceNotAvailable { 
     82        public List<OriginalDocument> doSearch() throws ResourceNotAvailable, AssembleQueryException, NdgSQLException { 
    8183                SearchCriteria criteria = searchType.getSearchCriteria(); 
    8284                Connection conn = DiscoveryBasic.getInstance().getDiscoveryConnection(); 
     
    9092                        // NdgMessage msg = new NdgMessage("sql.resultset.parsing.error", 
    9193                        // new Object[] { sqlQuery }); 
    92                 } catch (NdgException e) { 
    93                         logHelper.logMessage(e, Level.ERROR); 
    94                         throw new NdgException(e.getBundlMessage()); 
    9594                } finally { 
    9695                        commitOrRollback(conn, commit); 
     
    108107 
    109108        /** 
    110          * @throws NdgException 
     109         * @throws NdgSQLException  
     110         * @throws ResourceNotAvailable  
    111111         * @throws SQLException 
    112112         *             if an error during the database access 
    113113         **/ 
    114         private List<OriginalDocument> searchDocuments(Connection conn, SearchCriteria criteria) throws NdgException { 
     114        private List<OriginalDocument> searchDocuments(Connection conn, SearchCriteria criteria) throws AssembleQueryException, NdgSQLException, ResourceNotAvailable { 
    115115                List<OriginalDocument> res = new ArrayList<OriginalDocument>(); 
    116116                List<String> toFilter = executeSearch(conn, assembleSearch(criteria, searchType.getRetrieveCriteria())); 
Note: See TracChangeset for help on using the changeset viewer.