Package org.openntf.news.monster.shared

Examples of org.openntf.news.monster.shared.StoryReaderException


      this.feed = input.build(reader);
      this.size = feed.getEntries().size();
      setLoaded(true);

    } catch (MalformedURLException e) {
      StoryReaderException sre=new StoryReaderException(Constants.EXCEPTION_INVALID_URL + ": "+ e.getMessage());
      sre.setStackTrace(e.getStackTrace());
      throw sre;
    } catch (IOException e) {
      StoryReaderException sre=new StoryReaderException(Constants.EXCEPTION_COMM_ERROR + ": "+ e.getMessage());
      sre.setStackTrace(e.getStackTrace());
      throw sre;
    } catch (IllegalArgumentException e) {
      StoryReaderException sre=new StoryReaderException(Constants.EXCEPTION_FEED_ERROR + ": "+ e.getMessage());
      sre.setStackTrace(e.getStackTrace());
      throw sre;
    } catch (FeedException e) {
      StoryReaderException sre=new StoryReaderException(Constants.EXCEPTION_FEED_ERROR + ": "+ e.getMessage());
      sre.setStackTrace(e.getStackTrace());
      throw sre;
    }     
  }
View Full Code Here


     
      if(isRedirectEnabled()) {
        try {
          setLink(Utilities.followRedirect(getLink()));
        } catch (IOException e) {
          throw new StoryReaderException(Constants.EXCEPTION_COMM_ERROR + ": "+getLink());
        }
      }

      storyDoc.replaceItemValue("NLink", getLink());

      someDate=session.createDateTime(getCreationDate());
      storyDoc.replaceItemValue("NCreationDate", someDate);
      someDate.recycle();

      someDate=session.createDateTime(getDate());
      storyDoc.replaceItemValue("NPublicationDate", someDate);
      someDate.recycle();
     
      storyDoc.replaceItemValue("NTitle", getTitle());
      storyDoc.replaceItemValue("NAbstract", getAbstractContent());
      storyDoc.replaceItemValue("NContent", getFullContent());

      // Not checked, but in case additional field has Date or Calendar value, this is going to throw NotesException...
      for (Map.Entry<String, Object> entry : additionalFields.entrySet()) {
            storyDoc.replaceItemValue(entry.getKey(), entry.getValue());
          }
     
      storyDoc.save();
      storyDoc.recycle();

      return true;
    } catch (NotesException e) {
      throw new StoryReaderException(Constants.EXCEPTION_SAVE_STORY + ": "+ e.getMessage());
    }

  }
View Full Code Here

TOP

Related Classes of org.openntf.news.monster.shared.StoryReaderException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.