Package lotus.domino

Examples of lotus.domino.ViewEntry


  /** {@inheritDoc} */
  @Override
  public NotesViewEntry getFirstDocument() throws NotesConnectorExceptionImpl {
    try {
      ViewEntry first = getNotesObject().getFirstDocument();
      if (first == null) {
        return null;
      }
      return new NotesViewEntryImpl(first);
    } catch (NotesException e) {
View Full Code Here


      generateNodeEntryHier(tree, nav, jw);
    jw.endArrayItem();
  }

  public void generateNodeEntryHier(TreeModel tree, ViewNavigator nav, JsonWriter jw) throws NotesException, IOException {
    ViewEntry ve = nav.getCurrent();
    if(ve!=null) {
      int veLevel = ve.getIndentLevel();
      while(ve!=null && veLevel==ve.getIndentLevel()) {
        // We generate the current entry
        jw.startArrayItem();
        jw.startObject();
          jw.startProperty("id");
            String id = ve.getNoteID();
            jw.outStringLiteral(id);
          jw.endProperty();
          jw.startProperty("type");
            String type = (String)ve.getColumnValues().get(1);
            jw.outStringLiteral(type);
          jw.endProperty();
          jw.startProperty("name");
            String title = (String)ve.getColumnValues().get(2);
            jw.outStringLiteral(title);
          jw.endProperty();
 
          ve = nav.getNext();
          if(ve!=null && ve.getIndentLevel()>veLevel) {
            jw.startProperty("children");
              jw.startArray();
                generateNodeHier(tree, nav, jw);
              jw.endArray();
            jw.endProperty();
View Full Code Here

    try {
      viewPersonsAll = db.getView("PersonsAll");
      viewPersonsAll.setAutoUpdate(false);
      viewNavigator = viewPersonsAll.createViewNav();
      ViewEntry tmpEntry;
      ViewEntry entry = viewNavigator.getFirst();
      while (entry != null) {
        entry.setPreferJavaDates(true);
        List<Object> columnValues = entry.getColumnValues();

        Person person = new Person(
            (String)columnValues.get(5),
            (String)columnValues.get(0),
            (String)columnValues.get(1),
            (String)columnValues.get(2),
            (String)columnValues.get(3),
            (String)columnValues.get(4),
            entry.getUniversalID());
        _persons.put((String)columnValues.get(5), person);

        tmpEntry = viewNavigator.getNext();
        entry.recycle();
        entry = tmpEntry;
      }
    } catch (Exception e) {
      e.printStackTrace();
    } catch (Throwable t) {
View Full Code Here

      threadsByDate.setAutoUpdate(false);
      ViewNavigator vNav = threadsByDate.createViewNav();
      vNav.setEntryOptions(lotus.domino.ViewNavigator.VN_ENTRYOPT_NOCOLUMNVALUES);
      Random randomGenerator = new Random();
      int randomInt = randomGenerator.nextInt(20);
      ViewEntry firstEnt = vNav.getNth(randomInt);
      while (!firstEnt.isDocument()) {
        ViewEntry tmpEnt = vNav.getNext();
        firstEnt.recycle();
        firstEnt = tmpEnt;
      }
      randomInt = randomGenerator.nextInt(20);
      ViewEntry secondEnt = vNav.getNth(randomInt);
      while (!secondEnt.isDocument()) {
        ViewEntry tmpEnt = vNav.getNext();
        secondEnt.recycle();
        secondEnt = tmpEnt;
      }
      firstDoc = firstEnt.getDocument();
      secondDoc = secondEnt.getDocument();
View Full Code Here

      threadsByDate.setAutoUpdate(false);
      ViewNavigator vNav = threadsByDate.createViewNav();
      vNav.setEntryOptions(lotus.domino.ViewNavigator.VN_ENTRYOPT_NOCOLUMNVALUES);
      Random randomGenerator = new Random();
      int randomInt = randomGenerator.nextInt(20);
      ViewEntry firstEnt = vNav.getNth(randomInt);
      while (!firstEnt.isDocument()) {
        ViewEntry tmpEnt = vNav.getNext();
        firstEnt.recycle();
        firstEnt = tmpEnt;
      }
      randomInt = randomGenerator.nextInt(20);
      ViewEntry secondEnt = vNav.getNth(randomInt);
      while (!secondEnt.isDocument()) {
        ViewEntry tmpEnt = vNav.getNext();
        secondEnt.recycle();
        secondEnt = tmpEnt;
      }
      firstDoc = firstEnt.getDocument();
      secondDoc = secondEnt.getDocument();
View Full Code Here

  public void processView() {
    Database db = null;
    View view = null;
    ViewEntryCollection collection = null;
    ViewEntry currentEntry = null;
    ViewEntry nextEntry = null;
    StringBuilder sb = new StringBuilder();
    try {
      db = ExtLibUtil.getCurrentDatabase();
      view = db.getView("allStates");
      view.setAutoUpdate(false);
View Full Code Here

  public void getAllEntriesByKey() {
    Database db = null;
    View view = null;
    ViewEntryCollection ec = null;
    ViewEntry entry = null;
    ViewEntry nextEntry = null;
    StringBuilder sb = new StringBuilder();
    try {
      db = ExtLibUtil.getCurrentDatabase();
      view = db.getView("allContactsByState");
      view.setAutoUpdate(false);
View Full Code Here

  public void getAllEntriesByKeyNoMatch() {
    Database db = null;
    View view = null;
    ViewEntryCollection ec = null;
    ViewEntry entry = null;
    ViewEntry nextEntry = null;
    StringBuilder sb = new StringBuilder();
    try {
      db = ExtLibUtil.getCurrentDatabase();
      view = db.getView("allContactsByState");
      view.setAutoUpdate(false);
View Full Code Here

    try {
      view = db.getView("NewsModeratedCached");
      view.setAutoUpdate(false);
      navigator = view.createViewNav();
      ViewEntry tmpEntry;
      ViewEntry entry = navigator.getFirst();
      while (entry != null) {
        try {
          entry.setPreferJavaDates(true);
          List<Object> columnValues = entry.getColumnValues();

          Date d1 = MiscUtils.getColumnValueAsDate(columnValues.get(4));
          Date d2 = MiscUtils.getColumnValueAsDate(columnValues.get(0));
          Date d3 = MiscUtils.getColumnValueAsDate(columnValues.get(15));
          Date d4 = MiscUtils.getColumnValueAsDate(columnValues.get(22));

          Double clicksTotalDouble = MiscUtils.getColumnValueAsDouble(columnValues.get(13));
          Double clicksLastWeekDouble = MiscUtils.getColumnValueAsDouble(columnValues.get(14));

          String spotlightImageURL = (String)columnValues.get(18);
          if (spotlightImageURL != null) {
            if (!spotlightImageURL.equals("")) {
              spotlightImageURL = entry.getUniversalID()
              + "/$file/" + spotlightImageURL;
            } else {
              spotlightImageURL = null;
            }
          }
          NewsEntry newsEntry = new NewsEntry(
              (String)columnValues.get(8),
              (String)columnValues.get(1),
              (String)columnValues.get(2),
              (String)columnValues.get(3),
              (String)columnValues.get(5),
              (String)columnValues.get(6),
              (String)columnValues.get(7),
              d1,
              d2,
              (String)columnValues.get(9),
              (String)columnValues.get(10),
              (String)columnValues.get(11),
              (String)columnValues.get(12),
              clicksTotalDouble,
              clicksLastWeekDouble,
              d3,
              (String)columnValues.get(16),
              (String)columnValues.get(17),
              spotlightImageURL,
              (String)columnValues.get(19),
              (String)columnValues.get(20),
              (String)columnValues.get(21),
              d4
          );
          _newsEntries.add(newsEntry);
          if (newsEntry.isSpotlight())
            _spotlightNewsEntries.add(newsEntry);
          getTypedEntriesList(newsEntry.getTID()).add(newsEntry);
          if (newsEntry.isTopStory()) {
            if(newsEntry.getTopStoryCategory().equalsIgnoreCase("top")) {
              _topTopStories.add(newsEntry);
            } else {
              getCategorizedTopEntriesList(
                  newsEntry.getTopStoryCategory()).add(
                      newsEntry);
            }
          }
        } catch (Exception e) {
        }

        tmpEntry = navigator.getNext();
        entry.recycle();
        entry = tmpEntry;
      }
      _spotlightNewsEntries = sortSpotlightStories(_spotlightNewsEntries);
      _topTopStories = sortTopStories(_topTopStories);
      if (_categorizedTopNewsEntries != null) {
View Full Code Here

    try {
      viewTypesAll = db.getView("TypesAll");
      viewTypesAll.setAutoUpdate(false);
      viewNavigatorTypes = viewTypesAll.createViewNav();
      ViewEntry tmpEntry;
      ViewEntry entry = viewNavigatorTypes.getFirst();
      while (entry != null) {
        if (entry.isCategory() == false) {
          entry.setPreferJavaDates(true);
          List<Object> columnValues = entry.getColumnValues();

          List<String> moderators = new Vector<String>();
          Document doc = entry.getDocument();
          Item moderatorsItem = doc.getFirstItem("TModerators");
          if (moderatorsItem != null) moderators = (Vector<String>)moderatorsItem.getValues();
          Type type = new Type((String)columnValues.get(2),
              (String)columnValues.get(3),
              moderators,
              (String)columnValues.get(4),
              (String)columnValues.get(0),
              (String)columnValues.get(5));
          _types.add(type);
        }

        tmpEntry = viewNavigatorTypes.getNext();
        entry.recycle();
        entry = tmpEntry;
      }

      viewCategoriesAll = db.getView("CategoriesAll");
      viewCategoriesAll.setAutoUpdate(false);
      viewNavigatorCategories = viewCategoriesAll.createViewNav();
      entry = viewNavigatorCategories.getFirst();
      while (entry != null) {
        if (entry.isCategory() == false) {
          entry.setPreferJavaDates(true);
          List<Object> columnValues = entry.getColumnValues();

          Category category = new Category((String)columnValues.get(1),
              (String)columnValues.get(2),
              (String)columnValues.get(3));
          _categories.add(category);
        }

        tmpEntry = viewNavigatorCategories.getNext();
        entry.recycle();
        entry = tmpEntry;
      }

      viewConfigAll = db.getView("ConfigAll");
      viewConfigAll.setAutoUpdate(false);
      viewNavigatorConfig = viewConfigAll.createViewNav();
      entry = viewNavigatorConfig.getFirst();
      if (entry != null) {
        Document doc = entry.getDocument();
        if (doc != null) {
          setCaptchaPublicKey(doc.getItemValueString("COCaptchaPublicKey"));
          setCaptchaPrivateKey(doc.getItemValueString("COCaptchaPrivateKey"));
          _analyticsJS = doc.getItemValueString("COAnalytics");
          doc.recycle();
        }
        entry.recycle();
     
    }
    catch (Exception e) {
      e.printStackTrace();
      return;
View Full Code Here

TOP

Related Classes of lotus.domino.ViewEntry

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.