com.day.cq.dam.api.Rendition Java Examples

The following examples show how to use com.day.cq.dam.api.Rendition. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GeometrixxMediaArticleBody.java    From aem-solr-search with Apache License 2.0 8 votes vote down vote up
@PostConstruct public void init() throws SlingModelsException {

        Asset asset = resource.adaptTo(Asset.class);
        if(null == asset){
            return;
        }
        Rendition rendition = (asset.getRendition("plain") != null) ?
            asset.getRendition("plain") :
            asset.getOriginal();

        StringWriter writer = new StringWriter();
        try {
            IOUtils.copy(rendition.getStream(), writer, "UTF8");
            this.body = writer.toString();
        } catch (IOException e) {
            LOG.error("Error reading rendition: {}", rendition.getPath(), e);
        }

    }
 
Example #2
Source File: AssetImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Rendition getRendition(String s) {
    return null;
}
 
Example #3
Source File: AssetImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Rendition getOriginal() {
    return new RenditionImpl(this, resource.getChild("jcr:content/renditions/original"));
}
 
Example #4
Source File: AssetImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Rendition getCurrentOriginal() {
    return getOriginal();
}
 
Example #5
Source File: AssetImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public List<Rendition> getRenditions() {
    return null;
}
 
Example #6
Source File: AssetImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Iterator<Rendition> listRenditions() {
    return null;
}
 
Example #7
Source File: AssetImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Rendition getRendition(RenditionPicker renditionPicker) {
    return null;
}
 
Example #8
Source File: AssetImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Rendition addRendition(String s, InputStream inputStream, String s2) {
    return null;
}
 
Example #9
Source File: AssetImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Rendition addRendition(String s, InputStream inputStream, Map<String, Object> stringObjectMap) {
    return null;
}