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

Examples of ch.entwine.weblounge.common.impl.content.page.PageTemplateImpl


    administrator = new SiteAdminImpl(administratorLogin);
    administrator.setName(administratorName);
    administrator.setEmail(administratorEmail);
    administrator.addPrivateCredentials(new PasswordImpl(administratorPassword, DigestType.plain));
    // Default template
    defaultTemplate = new PageTemplateImpl(defaultTemplateId, new URL(defaultTemplateUrl));
    defaultTemplate.setClientRevalidationTime(defaultTemplateRecheckTime);
    defaultTemplate.setCacheExpirationTime(defaultTemplateValidTime);
    defaultTemplate.setComposeable(true);
    defaultTemplate.setStage(defaultTemplateStage);
    defaultTemplate.setName(defaultTemplateName);
    // Mobile template
    mobileTemplate = new PageTemplateImpl(mobileTemplateId, new URL(mobileTemplateUrl));
    mobileTemplate.setComposeable(true);
    mobileTemplate.setName(mobileTemplateName);
  }
View Full Code Here


   */
  @Test
  public void testAddTemplate() throws Exception {
    site.addTemplate(defaultTemplate);
    assertEquals(2, site.getTemplates().length);
    site.addTemplate(new PageTemplateImpl("test", new URL(defaultTemplateUrl)));
    assertEquals(3, site.getTemplates().length);
  }
View Full Code Here

   *           if setting up the preliminaries fails
   */
  protected void setUpPreliminaries() throws Exception {
    super.setUpPreliminaries();

    pageTemplate = new PageTemplateImpl(template, new URL("file:///template.jsp"));

    // site
    site = EasyMock.createNiceMock(Site.class);
    EasyMock.expect(site.getTemplate(template)).andReturn(pageTemplate);
    EasyMock.expect(site.getHostname((Environment) EasyMock.anyObject())).andReturn(new SiteURLImpl(new URL(siteUrl)));
View Full Code Here

  /**
   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    composeable = new PageTemplateImpl(identifier, rendererURL);
    setUpComposeable();
  }
View Full Code Here

   * .
   */
  @Test
  public void testEqualsObject() {
    try {
      assertTrue(composeable.equals(new PageTemplateImpl(identifier, new URL("http://localhost"))));
      assertTrue(composeable.equals(new PageTemplateImpl(identifier, new URL("http://localhost:8080"))));
      assertFalse(composeable.equals(new PageTemplateImpl("xyz", new URL("http://localhost"))));
    } catch (MalformedURLException e) {
      fail();
    }
  }
View Full Code Here

TOP

Related Classes of ch.entwine.weblounge.common.impl.content.page.PageTemplateImpl

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.