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

Examples of ch.entwine.weblounge.common.impl.content.image.ImageContentImpl


    ImageResourceReader imageReader = new ImageResourceReader();
    InputStream imageIs = this.getClass().getResourceAsStream("/image.xml");
    jpeg = imageReader.read(imageIs, site);
    IOUtils.closeQuietly(imageIs);

    jpegContent = new ImageContentImpl(jpegContentURL.getFile(), german, "image/jpeg", 1000, 666);
    pngContent = new ImageContentImpl(pngContentURL.getFile(), english, "text/pdf", 1000, 666);
  }
View Full Code Here


    // Try to add content items to non-existing resources
    String newfilename = "newimage.jpeg";
    String mimetype = "image/png";
    Language language = jpegContent.getLanguage();
    ImageContent updatedContent = new ImageContentImpl(newfilename, language, mimetype, 1000, 600);
    r = repository.putContent(imageURI, updatedContent, pngContentURL.openStream());
    ResourceContent c = r.getContent(language);
    assertEquals(pngFileSize, c.getSize());
    assertEquals(mimetype, c.getMimetype());
View Full Code Here

TOP

Related Classes of ch.entwine.weblounge.common.impl.content.image.ImageContentImpl

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.