MAX_DOCUMENT_COUNT, SOLR_COMMIT_WITHIN, SOLR_FIELD_ID
Constructor and Description |
---|
PhotoDAO() |
Modifier and Type | Method and Description |
---|---|
void |
associate(PhotoList photos)
create photo-media object associations from the given photo list
|
void |
deassociate(java.lang.String guid,
java.lang.String mediaObjectId)
Note: this will NOT remove the media object, and it will only remove the association between the given GUID and media object id.
|
java.util.List<AccessDetails> |
getAccessDetails(UserIdentity authenticatedUser,
java.util.Collection<java.lang.String> guids) |
AccessDetails |
getAccessDetails(UserIdentity authenticatedUser,
java.lang.String guid) |
PhotoList |
getPhotos(DataGroups dataGroups,
java.util.Collection<java.lang.String> guids,
Limits limits,
java.util.EnumSet<CAContentCore.ServiceType> serviceTypes,
long[] userIdFilter) |
boolean |
insert(MediaObjectList objects)
Inserts the objects and sets all media types to
MediaUrlValidator.MediaType.PHOTO for all objects with MediaUrlValidator.MediaType.UNKNOWN or null media type- |
boolean |
insert(Photo photo) |
boolean |
insert(PhotoList photos) |
void |
remove(java.util.Collection<java.lang.String> guids)
Note: content added through ContentStorage MUST be removed through ContentStorage, removing the metadata directly using this method may cause undefined behavior.
|
PhotoList |
search(UserIdentity authenticatedUser,
DataGroups dataGroups,
java.util.Collection<java.lang.String> guids,
Limits limits,
MediaObjectList objects,
java.util.EnumSet<CAContentCore.ServiceType> serviceTypes,
long[] userIdFilter) |
boolean |
setOwners(PhotoList photos)
Sets the owner details (userId) to the given photos, requires that GUID has been set to the photo object
|
boolean |
update(MediaObjectList objects)
Update the objects and sets all media types to
MediaUrlValidator.MediaType.PHOTO for all objects with MediaUrlValidator.MediaType.UNKNOWN or null media type- |
boolean |
updatePhotos(UserIdentity authenticatedUser,
PhotoList photos)
Update the photos only the given photos have newer timestamps than the ones in the database
Note: media objects, if present on the photos, will be updated/inserted, old objects will never be removed
(i.e.
|
boolean |
updatePhotosIfNewer(UserIdentity authenticatedUser,
PhotoList photos)
Update the photos only the given photos have newer timestamps than the ones in the database
Note: media objects, if present on the photos, will be updated/inserted, old objects will never be removed
(i.e.
|
getSolrTemplate, setApplicationContext
public PhotoDAO()
public boolean insert(MediaObjectList objects)
MediaUrlValidator.MediaType.PHOTO
for all objects with MediaUrlValidator.MediaType.UNKNOWN
or null media type-objects
- MediaObjectDAO.insert(MediaObjectList)
public boolean update(MediaObjectList objects)
MediaUrlValidator.MediaType.PHOTO
for all objects with MediaUrlValidator.MediaType.UNKNOWN
or null media type-objects
- MediaObjectDAO.update(MediaObjectList)
public void remove(java.util.Collection<java.lang.String> guids)
guids
- ContentStorageCore
public PhotoList getPhotos(DataGroups dataGroups, java.util.Collection<java.lang.String> guids, Limits limits, java.util.EnumSet<CAContentCore.ServiceType> serviceTypes, long[] userIdFilter)
dataGroups
- optional filterguids
- optional filterlimits
- optional filterserviceTypes
- optional filteruserIdFilter
- optional filterpublic PhotoList search(UserIdentity authenticatedUser, DataGroups dataGroups, java.util.Collection<java.lang.String> guids, Limits limits, MediaObjectList objects, java.util.EnumSet<CAContentCore.ServiceType> serviceTypes, long[] userIdFilter) throws java.lang.IllegalArgumentException
authenticatedUser
- optional filterdataGroups
- optional filterguids
- optional filterlimits
- optional filterobjects
- optional filterserviceTypes
- optional filteruserIdFilter
- optional filterjava.lang.IllegalArgumentException
- on bad search termspublic boolean setOwners(PhotoList photos)
photos
- public boolean updatePhotosIfNewer(UserIdentity authenticatedUser, PhotoList photos)
MediaObjectDAO
.authenticatedUser
- photos
- public boolean updatePhotos(UserIdentity authenticatedUser, PhotoList photos)
MediaObjectDAO
.authenticatedUser
- photos
- public java.util.List<AccessDetails> getAccessDetails(UserIdentity authenticatedUser, java.util.Collection<java.lang.String> guids)
authenticatedUser
- guids
- public AccessDetails getAccessDetails(UserIdentity authenticatedUser, java.lang.String guid)
authenticatedUser
- guid
- public void deassociate(java.lang.String guid, java.lang.String mediaObjectId)
MediaObjectDAO
if you want to remove the media objects.guid
- if null, the given media object will be de-associated from all GUIDsmediaObjectId
- if null, all media objects for the given GUID will be de-associatedCopyright © 2015 Tampere University of Technology, Pori Department.