Package ch.entwine.weblounge.common.content.page

Examples of ch.entwine.weblounge.common.content.page.PageletURI


  /**
   * Test method for {@link ch.entwine.weblounge.common.impl.content.page.PageletURIImpl#compareTo(ch.entwine.weblounge.common.content.page.PageletURI)}.
   */
  @Test
  public void testCompareTo() {
    PageletURI previous = new PageletURIImpl(uri, composer, position - 1);
    PageletURI next = new PageletURIImpl(uri, composer, position + 1);
    assertEquals(1, location.compareTo(previous));
    assertEquals(0, location.compareTo(location));
    assertEquals(-1, location.compareTo(next));
  }
View Full Code Here


          StringBuffer searchTerm = new StringBuffer();
          searchTerm.append(pagelet.getModule()).append("/").append(pagelet.getIdentifier());

          // Are we looking for the pagelet in a certain composer or position?
          PageletURI uri = pagelet.getURI();
          if (uri != null) {
            if (StringUtils.isNotBlank(uri.getComposer()) && uri.getPosition() >= 0) {
              field = MessageFormat.format(PAGELET_TYPE_COMPOSER_POSITION, uri.getComposer(), uri.getPosition());
              and(field, searchTerm.toString(), true);
            } else if (StringUtils.isNotBlank(uri.getComposer())) {
              field = MessageFormat.format(PAGELET_TYPE_COMPOSER, uri.getComposer());
              and(field, searchTerm.toString(), true);
            } else if (uri.getPosition() >= 0) {
              field = MessageFormat.format(PAGELET_TYPE_POSITION, uri.getPosition());
              and(field, searchTerm.toString(), true);
            } else {
              field = PAGELET_TYPE;
              and(field, searchTerm.toString(), true);
            }
View Full Code Here

TOP

Related Classes of ch.entwine.weblounge.common.content.page.PageletURI

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.