PhotoModel.getAlbumId
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.datatransferproject.types.common.models.photos.PhotoModel.getAlbumId (Showing top 7 results out of 315)

origin: google/data-transfer-project

 @Override
 public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  PhotoModel that = (PhotoModel) o;
  return Objects.equal(getTitle(), that.getTitle()) &&
      Objects.equal(getFetchableUrl(), that.getFetchableUrl()) &&
      Objects.equal(getDescription(), that.getDescription()) &&
      Objects.equal(getMediaType(), that.getMediaType()) &&
      Objects.equal(getDataId(), that.getDataId()) &&
      Objects.equal(getAlbumId(), that.getAlbumId());
 }
}
origin: google/data-transfer-project

@VisibleForTesting
void importSinglePhoto(UUID jobId, PhotoModel inputPhoto, SmugMugInterface smugMugInterface)
  throws IOException {
 // Find album to upload photo to
 TempPhotosData tempPhotosData =
   jobStore.findData(jobId, createCacheKey(), TempPhotosData.class);
 checkState(
   tempPhotosData != null, "cached temp photos data for %s is null", inputPhoto.getAlbumId());
 String newAlbumUri = tempPhotosData.lookupNewAlbumId(inputPhoto.getAlbumId());
 checkState(
   !Strings.isNullOrEmpty(newAlbumUri),
   "Cached album URI for %s is null",
   inputPhoto.getAlbumId());
 InputStream inputStream;
 if (inputPhoto.isInTempStore()) {
  inputStream = jobStore.getStream(jobId, inputPhoto.getFetchableUrl());
 } else {
  inputStream = smugMugInterface.getImageAsStream(inputPhoto.getFetchableUrl());
 }
 SmugMugImageUploadResponse response =
   smugMugInterface.uploadImage(inputPhoto, newAlbumUri, inputStream);
}
origin: google/data-transfer-project

String importedAlbumId = photoData.getImportedId(photoModel.getAlbumId());
String uploadUrl =
  String.format(uploadPhotoUrlTemplate, importedAlbumId, photoModel.getTitle());
origin: google/data-transfer-project

if (Strings.isNullOrEmpty(inputPhoto.getAlbumId())) {
 albumId = tempPhotosData.lookupNewAlbumId(inputPhoto.getAlbumId());
origin: google/data-transfer-project

@Test
public void toCommonPhoto() {
 Photo photo =
   FlickrTestUtils.initializePhoto(PHOTO_TITLE, FETCHABLE_URL, PHOTO_DESCRIPTION, MEDIA_TYPE);
 PhotoModel photoModel = FlickrPhotosExporter.toCommonPhoto(photo, ALBUM_ID);
 assertThat(photoModel.getAlbumId()).isEqualTo(ALBUM_ID);
 assertThat(photoModel.getFetchableUrl()).isEqualTo(FETCHABLE_URL);
 assertThat(photoModel.getTitle()).isEqualTo(PHOTO_TITLE);
 assertThat(photoModel.getDescription()).isEqualTo(PHOTO_DESCRIPTION);
 assertThat(photoModel.getMediaType()).isEqualTo("image/jpeg");
}
origin: google/data-transfer-project

private void importSinglePhoto(UUID id, PhotoModel photo) throws FlickrException, IOException {
 String photoId = uploadPhoto(photo);
 String oldAlbumId = photo.getAlbumId();
origin: google/data-transfer-project

Assert.assertEquals("image1", photo1.getDataId());
Assert.assertEquals("image/png", photo1.getMediaType());
Assert.assertEquals(album.getId(), photo1.getAlbumId());
Assert.assertEquals("image2", photo2.getDataId());
Assert.assertEquals("image/jpeg", photo2.getMediaType());
Assert.assertEquals(album.getId(), photo2.getAlbumId());
org.datatransferproject.types.common.models.photosPhotoModelgetAlbumId

Popular methods of PhotoModel

  • <init>
  • getFetchableUrl
  • getTitle
  • getDescription
  • getMediaType
  • getDataId
  • isInTempStore

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • addToBackStack (FragmentTransaction)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Kernel (java.awt.image)
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)