public final class CAContentCore extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CAContentCore.ServiceType
Service type declarations.
|
static class |
CAContentCore.Visibility
The visibility.
|
| Modifier and Type | Field and Description |
|---|---|
static java.util.EnumSet<AnalysisBackend.Capability> |
DEFAULT_CAPABILITIES
default capabilities for photo tasks
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
deletePhotos(UserIdentity authenticatedUser,
java.util.List<java.lang.String> guids)
Delete the given photos.
|
static java.lang.String |
generateRedirectUrl(java.lang.String guid,
CAContentCore.ServiceType type) |
static RedirectResponse |
generateTargetUrl(UserIdentity authenticatedUser,
CAContentCore.ServiceType serviceType,
java.lang.String guid)
resolves dynamic /rest/r? redirection URL to static access URL
|
static MediaObjectList |
getMediaObjects(UserIdentity authenticatedUser,
DataGroups dataGroups,
Limits limits,
java.util.EnumSet<MediaUrlValidator.MediaType> mediaTypes,
java.util.EnumSet<CAContentCore.ServiceType> serviceTypes,
java.util.List<java.lang.String> mediaObjectIdFilters) |
static PhotoList |
getPhotos(UserIdentity authenticatedUser,
java.util.List<java.lang.String> guids,
DataGroups dataGroups,
Limits limits,
java.util.EnumSet<CAContentCore.ServiceType> serviceTypes,
long[] userIdFilters) |
static AbstractTaskDetails |
queryTaskDetails(java.lang.Integer backendId,
java.lang.Long taskId,
DataGroups dataGroups,
Limits limits)
This method is called by back-ends to retrieve a list of photos to be analyzed.
|
static boolean |
schedule(org.quartz.JobBuilder builder)
Uses the platform defined scheduler to schedule the given builder.
|
static void |
scheduleBackendFeedback(java.lang.Integer backendId,
PhotoList photos,
java.lang.Long taskId)
Create and schedule the task for all capable back-ends included in the task designated by the task Id.
|
static boolean |
scheduleTask(org.quartz.JobBuilder builder,
java.lang.Long taskId) |
static java.lang.Long |
scheduleTask(PhotoTaskDetails details)
Note: if the details already contain a taskId, the task will NOT be re-added to the database, but simply re-scheduled.
|
static void |
similarityFeedback(UserIdentity authenticatedUser,
PhotoFeedbackList feedbackList)
This will allow some amount of bad GUIDs to exist as long as there are enough to make a proper request:
at least one ref photo must exist, at least one similar or dissimilar photo must exist.
|
static void |
taskFinished(PhotoTaskResponse response) |
static void |
updatePhotos(UserIdentity authenticatedUser,
PhotoList photoList)
This does NOT sync the changes back to content storage (e.g.
|
static void |
validateTaskResponse(TaskResponse response) |
public static final java.util.EnumSet<AnalysisBackend.Capability> DEFAULT_CAPABILITIES
public static void taskFinished(PhotoTaskResponse response) throws java.lang.IllegalArgumentException
response - java.lang.IllegalArgumentExceptionpublic static void validateTaskResponse(TaskResponse response) throws java.lang.IllegalArgumentException
response - java.lang.IllegalArgumentException - on null response, bad task id, bad backend id and/or bad task typepublic static java.lang.String generateRedirectUrl(java.lang.String guid, CAContentCore.ServiceType type)
guid - type - public static RedirectResponse generateTargetUrl(UserIdentity authenticatedUser, CAContentCore.ServiceType serviceType, java.lang.String guid)
authenticatedUser - serviceType - guid - public static AbstractTaskDetails queryTaskDetails(java.lang.Integer backendId, java.lang.Long taskId, DataGroups dataGroups, Limits limits)
backendId - taskId - dataGroups - limits - public static java.lang.Long scheduleTask(PhotoTaskDetails details)
DEFAULT_CAPABILITIESdetails - public static boolean scheduleTask(org.quartz.JobBuilder builder, java.lang.Long taskId) throws java.lang.IllegalArgumentException
builder - taskId - java.lang.IllegalArgumentException - on bad valuesschedule(JobBuilder)public static boolean schedule(org.quartz.JobBuilder builder) throws java.lang.IllegalArgumentException
builder - java.lang.IllegalArgumentException - on bad parameterspublic static PhotoList getPhotos(UserIdentity authenticatedUser, java.util.List<java.lang.String> guids, DataGroups dataGroups, Limits limits, java.util.EnumSet<CAContentCore.ServiceType> serviceTypes, long[] userIdFilters)
authenticatedUser - guids - dataGroups - limits - serviceTypes - userIdFilters - public static void updatePhotos(UserIdentity authenticatedUser, PhotoList photoList) throws java.lang.IllegalArgumentException
authenticatedUser - photoList - java.lang.IllegalArgumentExceptionpublic static void similarityFeedback(UserIdentity authenticatedUser, PhotoFeedbackList feedbackList)
authenticatedUser - must be givenfeedbackList - public static MediaObjectList getMediaObjects(UserIdentity authenticatedUser, DataGroups dataGroups, Limits limits, java.util.EnumSet<MediaUrlValidator.MediaType> mediaTypes, java.util.EnumSet<CAContentCore.ServiceType> serviceTypes, java.util.List<java.lang.String> mediaObjectIdFilters)
authenticatedUser - dataGroups - limits - mediaTypes - optional media types for the retrieval, if null or empty, all types will be searched forserviceTypes - mediaObjectIdFilters - public static boolean deletePhotos(UserIdentity authenticatedUser, java.util.List<java.lang.String> guids) throws java.lang.IllegalArgumentException
authenticatedUser - guids - list of guids. Non-existent guids will be ignored.java.lang.IllegalArgumentException - on bad user idpublic static void scheduleBackendFeedback(java.lang.Integer backendId, PhotoList photos, java.lang.Long taskId)
backendId - the back-end that send the task finished call, this back-end is automatically omitted from the list of target back-endsphotos - photos returned in task finished calltaskId - the id of the finished analysis taskCopyright © 2015 Tampere University of Technology, Pori Department.