Package org.apache.abdera.ext.media

Examples of org.apache.abdera.ext.media.MediaCopyright


    @Override
    public int doEndTag() throws JspException {
        final ServletRequest request = pageContext.getRequest();

        MediaCopyright copyright;

        if (request.getAttribute("content") != null
            && request.getAttribute("content") instanceof MediaContent) {
            copyright = ((MediaContent) request.getAttribute("content")).addExtension(MediaConstants.COPYRIGHT);
        } else if (request.getAttribute("group") != null
            && request.getAttribute("group") instanceof MediaGroup) {
            copyright = ((MediaGroup) request.getAttribute("group")).addExtension(MediaConstants.COPYRIGHT);
        } else if (request.getAttribute("entry") != null
            && request.getAttribute("entry") instanceof Entry) {
            copyright = ((Entry) request.getAttribute("entry")).addExtension(MediaConstants.COPYRIGHT);
        } else {
            copyright = ((Feed) request.getAttribute("feed")).addExtension(MediaConstants.COPYRIGHT);
        }

        // set the body content
        copyright.setText(getBodyContent().getString());
        // set the scheme
        if (url != null) copyright.setUrl(url);

        return super.doEndTag();
    }
View Full Code Here

TOP

Related Classes of org.apache.abdera.ext.media.MediaCopyright

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.