Package org.gluu.oxtrust.service
Class ImageRepository
- java.lang.Object
-
- org.gluu.oxtrust.service.ImageRepository
-
@Named("imageRepository") @ApplicationScoped public class ImageRepository extends java.lang.Object
Manage images in photo repository- Author:
- Yuriy Movchan Date: 11.03.2010
-
-
Constructor Summary
Constructors Constructor Description ImageRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addThumbnail(org.gluu.model.GluuImage image, int thumbWidth, int thumbHeight)
Creates image in repositorybyte[]
getBlankIcon()
byte[]
getBlankImage()
byte[]
getBlankPhoto()
void
init()
void
initFileTypesMap()
boolean
isIconImage(org.gluu.model.GluuImage image)
-
-
-
Method Detail
-
init
@PostConstruct public void init() throws java.lang.Exception
- Throws:
java.lang.Exception
-
initFileTypesMap
public void initFileTypesMap() throws java.lang.Exception
- Throws:
java.lang.Exception
-
addThumbnail
public boolean addThumbnail(org.gluu.model.GluuImage image, int thumbWidth, int thumbHeight) throws java.lang.Exception
Creates image in repository- Parameters:
image
- image file- Returns:
- true if image was added successfully, false otherwise
- Throws:
java.lang.Exception
-
getBlankImage
public byte[] getBlankImage()
-
getBlankPhoto
public byte[] getBlankPhoto()
-
getBlankIcon
public byte[] getBlankIcon()
-
isIconImage
public boolean isIconImage(org.gluu.model.GluuImage image)
-
-