]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.cms/src/org/argeo/cms/CmsImageManager.java
3 import java
.io
.InputStream
;
5 import javax
.jcr
.Binary
;
7 import javax
.jcr
.RepositoryException
;
9 import org
.eclipse
.swt
.graphics
.Image
;
10 import org
.eclipse
.swt
.graphics
.Point
;
11 import org
.eclipse
.swt
.widgets
.Control
;
13 /** Read and write access to images. */
14 public interface CmsImageManager
{
15 /** Load image in control */
16 public Boolean
load(Node node
, Control control
, Point size
)
17 throws RepositoryException
;
19 /** @return (0,0) if not available */
20 public Point
getImageSize(Node node
) throws RepositoryException
;
23 * The related <img tag, with src, width and height set. @return null if not
26 public String
getImageTag(Node node
) throws RepositoryException
;
29 * The related <img tag, with url, width and height set. Caller must close
30 * the tag (or add additional attributes). @return null if not available
32 public StringBuilder
getImageTagBuilder(Node node
, Point size
)
33 throws RepositoryException
;
36 * Returns the remotely accessible URL of the image (registering it if
37 * needed) @return null if not available
39 public String
getImageUrl(Node node
) throws RepositoryException
;
41 public Binary
getImageBinary(Node node
) throws RepositoryException
;
43 public Image
getSwtImage(Node node
) throws RepositoryException
;
46 public String
uploadImage(Node parentNode
, String fileName
, InputStream in
)
47 throws RepositoryException
;