protected String getSearchStatusMessage( Repository repository ) throws SearchException { BasicType statusType = new BasicType("sakaibrary", "properties", "metasearchStatus"); String message = null; try { org.osid.shared.Properties statusProperties = repository.getPropertiesByType(statusType); message = (String) statusProperties.getProperty("statusMessage"); } catch(RepositoryException e) { // let the message remain null but log this exception m_log.warn("getSearchStatusMessage RepositoryException getting properties " + e.getMessage()); } catch(SharedException e) { // let the message remain null but log this exception m_log.warn("getSearchStatusMessage SharedException getting property " + e.getMessage()); } return message; }
if( re.getMessage().equals( SESSION_TIMED_OUT ) || re.getMessage().equals( METASEARCH_ERROR ) || re.getMessage().equals( SharedException.NO_MORE_ITERATOR_ELEMENTS ) || re.getMessage().equals( OsidException.OPERATION_FAILED ) ) m_log.warn("doNextPage -- RepositoryException nextAsset(): " + re.getMessage()); throw new SearchException(re.getMessage()); else if( re.getMessage().equals( ASSET_NOT_FETCHED ) ) if( re.getMessage().equals( SESSION_TIMED_OUT ) || re.getMessage().equals( METASEARCH_ERROR ) ) m_log.warn("doNextPage -- RepositoryException hasNextAsset(): " + re.getMessage());
if( re.getMessage().equals( SESSION_TIMED_OUT ) || re.getMessage().equals( METASEARCH_ERROR ) || re.getMessage().equals( SharedException.NO_MORE_ITERATOR_ELEMENTS ) || re.getMessage().equals( OsidException.OPERATION_FAILED ) ) m_log.warn("doSearch -- RepositoryException nextAsset(): " + re.getMessage()); throw new SearchException( message ); else if( re.getMessage().equals( ASSET_NOT_FETCHED ) ) if( re.getMessage().equals( SESSION_TIMED_OUT ) || re.getMessage().equals( METASEARCH_ERROR ) ) m_log.warn("doSearch -- RepositoryException hasNextAsset(): " + re.getMessage()); throw new SearchException( message ); m_log.warn("doSearch -- RepositoryException: " + re.getMessage()); throw new SearchException( re.getMessage() );