public interface IUserPhotoService
uploadPhoto(String, InputStream, String, boolean, boolean)
,
copyPhoto(String, String, String, boolean, boolean)
movePhoto(String, String, String, boolean, boolean)
when withFilters parameter is true).setPhotoFilters(IPhotoFilter[])
method.Modifier and Type | Method and Description |
---|---|
void |
copyPhoto(String uniqueID,
String sourceType,
String targetType,
boolean withCheckers,
boolean withFilters)
Copy a photo from one type to another
|
void |
deletePhoto(String uniqueID,
String type)
Delete the photo associated to the given user
|
int |
getCachePeriod()
Return the Client Cache period (in hours) used in HTTP headers
0 hours means no client cache (http header no-cahce=true)
|
InputStream |
getDefaultPhoto(String type)
Return a standard photo that can be used as a replacement if the user has no photo.
|
InputStream |
getDisplayedPhoto(String uniqueID,
String type) |
InputStream |
getPhoto(String uniqueID,
String type) |
String |
getPhotoCacheKey(IUser user) |
String |
getPhotoCacheKey(String uniqueID) |
PhotoChecker[] |
getPhotoCheckers(String type)
Return the checkers that will be applied before uploading a picture
|
IPhotoFilter[] |
getPhotoFilters() |
IPhotoFilter[] |
getPhotoFilters(String type)
Return the filters applied to in the upload process
|
InputStream |
getPrefetchedPhoto(String uniqueID,
String type)
Get the previously prefetched photo
|
boolean |
hasPhoto(String uniqueID,
String type)
Return true is the user has already a photo associated
|
void |
movePhoto(String uniqueID,
String sourceType,
String targetType,
boolean withCheckers,
boolean withFilters)
Move a photo from one type to another
|
void |
prefetchUserPhotos(String[] uniqueIDs,
String type)
Prefetch the User Photos with a mass call to the UME
Use the server cache (RID) to store the photo
If server cache is disabled, the photos are removed from there when getPrefetchedPhoto is called
|
void |
setPhotoFilters(IPhotoFilter[] photoFilters)
Sets photo filters that will be applied from the service
|
void |
uploadPhoto(String uniqueID,
File file,
String type)
Upload a photo with the configured checkers and filters
|
void |
uploadPhoto(String uniqueID,
File file,
String type,
boolean withCheckers,
boolean withFilters)
Upload a photo
|
void |
uploadPhoto(String uniqueID,
InputStream file,
String type)
Upload a photo with the configured checkers and filters
|
void |
uploadPhoto(String uniqueID,
InputStream file,
String type,
boolean withCheckers,
boolean withFilters)
Upload a photo
|
static final String KEY
void deletePhoto(String uniqueID, String type) throws UserPhotoException
uniqueID
- uniquely identifying an usertype
- the type of photo to be deletedUserPhotoException
boolean hasPhoto(String uniqueID, String type) throws UserPhotoException
uniqueID
- uniquely identifying an usertype
- the type of photoUserPhotoException
void uploadPhoto(String uniqueID, InputStream file, String type) throws IOException, UserPhotoException
uniqueID
- file
- type
- IOException
UserPhotoException
void uploadPhoto(String uniqueID, InputStream file, String type, boolean withCheckers, boolean withFilters) throws IOException, UserPhotoException
uniqueID
- file
- type
- withCheckers
- withFilters
- IOException
UserPhotoException
void copyPhoto(String uniqueID, String sourceType, String targetType, boolean withCheckers, boolean withFilters) throws IOException, UserPhotoException
uniqueID
- sourceType
- targetType
- withCheckers
- withFilters
- IOException
UserPhotoException
void movePhoto(String uniqueID, String sourceType, String targetType, boolean withCheckers, boolean withFilters) throws IOException, UserPhotoException
uniqueID
- sourceType
- targetType
- withCheckers
- withFilters
- IOException
UserPhotoException
void uploadPhoto(String uniqueID, File file, String type) throws IOException, UserPhotoException
uniqueID
- file
- type
- IOException
UserPhotoException
void uploadPhoto(String uniqueID, File file, String type, boolean withCheckers, boolean withFilters) throws IOException, UserPhotoException
uniqueID
- file
- type
- withCheckers
- withFilters
- IOException
UserPhotoException
InputStream getPhoto(String uniqueID, String type) throws IOException, NoPhotoFoundException
IOException
NoPhotoFoundException
InputStream getDisplayedPhoto(String uniqueID, String type) throws IOException, NoPhotoFoundException
IOException
NoPhotoFoundException
InputStream getDefaultPhoto(String type) throws IOException, NoPhotoFoundException
type
- IOException
NoPhotoFoundException
PhotoChecker[] getPhotoCheckers(String type) throws UserPhotoException
UserPhotoException
IPhotoFilter[] getPhotoFilters(String type) throws UserPhotoException
UserPhotoException
int getCachePeriod()
void prefetchUserPhotos(String[] uniqueIDs, String type) throws IOException, NoPhotoFoundException
uniqueIDs
- The users' ids whose photos will be prefetchedIOException
NoPhotoFoundException
InputStream getPrefetchedPhoto(String uniqueID, String type) throws IOException, NoPhotoFoundException
uniqueID
- IOException
NoPhotoFoundException
String getPhotoCacheKey(String uniqueID) throws UMException
UMException
String getPhotoCacheKey(IUser user) throws UMException
UMException
IPhotoFilter[] getPhotoFilters()
void setPhotoFilters(IPhotoFilter[] photoFilters)
photoFilters
- Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice