Package com.agiletec.plugins.jacms.aps.system.services.content.model.extraAttribute

Examples of com.agiletec.plugins.jacms.aps.system.services.content.model.extraAttribute.LinkAttribute


      for (int i = 0; i < areas.size(); i++) {
        LinkedArea area = (LinkedArea) areas.get(i);
        AttributeTracer areaTracer = (AttributeTracer) tracer.clone();
        areaTracer.setMonoListElement(true);
        areaTracer.setListIndex(i);
        LinkAttribute linkAttribute = area.getLink();
        if (null != linkAttribute) {
          errors.addAll(linkAttribute.validate(areaTracer));
        }
        String coords = area.getCoords();
        boolean isShapeValued = (area.getShape() != null && area.getShape().trim().length() > 0 );
        boolean isCoordsValued = (coords!= null && coords.trim().length() > 0 && this.isValidNumber(coords));
        if (!isShapeValued || !isCoordsValued) {
View Full Code Here


    assertNotNull(contents);
    assertEquals(entries.size(), contents.size());
    Content content = contents.get(0);
    assertEquals("Burnout", content.getDescr());
    TextAttribute titleAttr = (TextAttribute) content.getAttribute("Title");
    LinkAttribute  linkAttr = (LinkAttribute) content.getAttribute("Link");
    HypertextAttribute corpoAttr = (HypertextAttribute) content.getAttribute("TextBody");
    assertEquals("Burnout", titleAttr.getText());
    assertEquals("http://www.alistapart.com/articles/burnout/", linkAttr.getSymbolicLink().getUrlDest());
    assertTrue(corpoAttr.getText().startsWith("Does every day feel like a bad day"));

    Content content1 = contents.get(2);
    assertEquals("Descrizione non disponibile", content1.getDescr());
    TextAttribute titleAttr1 = (TextAttribute) content1.getAttribute("Title");
    LinkAttribute  linkAttr1 = (LinkAttribute) content1.getAttribute("Link");
    HypertextAttribute corpoAttr1 = (HypertextAttribute) content1.getAttribute("TextBody");
    assertEquals("Titolo non disponibile", titleAttr1.getText());
    assertEquals("http://www.alistapart.com/articles/taking-the-guesswork-out-of-design/", linkAttr1.getSymbolicLink().getUrlDest());
    assertEquals("Corpo testo non disponibile", corpoAttr1.getText());
  }
View Full Code Here

    for (int i = 0; i < areas.size(); i++) {
      LinkedArea area = (LinkedArea) areas.get(i);
      AttributeTracer areaTracer = (AttributeTracer) tracer.clone();
      areaTracer.setMonoListElement(true);
      areaTracer.setListIndex(i);
      LinkAttribute link = area.getLink();
      LinkAttributeManager linkManager = (LinkAttributeManager) this.getManager(link);
      String coords = request.getParameter(imageMapAttribute.getName() + "_coords_" + areaTracer.getListIndex());
      linkManager.updateAttribute(link, areaTracer, request);
      area.setCoords(coords);
    }
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jacms.aps.system.services.content.model.extraAttribute.LinkAttribute

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.