Package org.jboss.seam.wiki.core.model

Examples of org.jboss.seam.wiki.core.model.WikiUploadImage


        }

        if (uploader.hasData()) {
            uploader.uploadNewInstance();
            if (WikiUploadImage.class.isAssignableFrom(uploader.getUpload().getClass())) {
                WikiUploadImage portrait = (WikiUploadImage)uploader.getUpload();
                getLog().debug("updating portrait file data/type");
                getInstance().getProfile().setImageContentType(portrait.getContentType());
                getInstance().getProfile().setImage(
                    WikiUtil.resizeImage(portrait.getData(), portrait.getContentType(), 80) // TODO: Make size configurable?
                );
                getInstance().getProfile().setSmallImage(
                    WikiUtil.resizeImage(portrait.getData(), portrait.getContentType(), 40) // TODO: Make size configurable?
                );

            } else {
                statusMessages.addFromResourceBundleOrDefault(
                    WARN,
View Full Code Here


            throw new RuntimeException(ex);
        }
    }

    public WikiUploadImage handleUpload(Uploader uploader) {
        WikiUploadImage image = super.handleUpload(uploader);
        marshallData(uploader, image);
        return image;
    }
View Full Code Here

        marshallData(uploader, image);
        return image;
    }

    public WikiUploadImage handleUpload(Uploader uploader, WikiUploadImage updateInstance) {
        WikiUploadImage image = super.handleUpload(uploader, updateInstance);
        marshallData(uploader, image);
        return image;
    }
View Full Code Here

            @Override
            public String renderThumbnailImageLink(WikiLink link) {

                // TODO: This is not typesafe and clean, need different rendering strategy for WikiUpload subclasses
                WikiUploadImage image = (WikiUploadImage)link.getFile();
                if (image.getThumbnail() == WikiUploadImage.Thumbnail.FULL.getFlag()) {
                    // Full size display, no thumbnail
                    //TODO: Make sure we really don't need this - but it messes up the comment form conversation:
                    //String imageUrl = WikiUtil.renderURL(image) + "&cid=" + Conversation.instance().getId();
                    String imageUrl = wikiURLRenderer.renderURL(image);
                    return "<img src='"+ imageUrl + "'" +
                            " width='"+ image.getSizeX()+"'" +
                            " height='"+ image.getSizeY() +"'/>";
                } else {
                    // Thumbnail with link display

                    //TODO: Make sure we really don't need this - but it messes up the comment form conversation:
                    // String thumbnailUrl = WikiUtil.renderURL(image) + "&amp;thumbnail=true&amp;cid=" + Conversation.instance().getId();
View Full Code Here

            @Override
            public String renderThumbnailImageLink(WikiLink link) {

                // TODO: This is not typesafe and clean, need different rendering strategy for WikiUpload subclasses
                WikiUploadImage image = (WikiUploadImage)link.getFile();
                if (image.getThumbnail() == WikiUploadImage.Thumbnail.FULL.getFlag()) {
                    // Full size display, no thumbnail
                    //TODO: Make sure we really don't need this - but it messes up the comment form conversation:
                    //String imageUrl = WikiUtil.renderURL(image) + "&amp;cid=" + Conversation.instance().getId();
                    String imageUrl = wikiURLRenderer.renderURL(image);
                    return "<img src='"+ imageUrl + "'" +
                            " width='"+ image.getSizeX()+"'" +
                            " height='"+ image.getSizeY() +"'/>";
                } else {
                    // Thumbnail with link display

                    //TODO: Make sure we really don't need this - but it messes up the comment form conversation:
                    // String thumbnailUrl = WikiUtil.renderURL(image) + "&amp;thumbnail=true&amp;cid=" + Conversation.instance().getId();
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.model.WikiUploadImage

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.