-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #857 from google/i-would-smug-5000-photos
Allow for more than 5000 photos to be uploaded to an album on SmugMug by creating overflow albums
- Loading branch information
Showing
8 changed files
with
452 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
...g/src/main/java/org/datatransferproject/transfer/smugmug/photos/SmugMugPhotoTempData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package org.datatransferproject.transfer.smugmug.photos; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonTypeName; | ||
import com.google.common.base.MoreObjects; | ||
import com.google.common.annotations.VisibleForTesting; | ||
import java.io.Serializable; | ||
import org.datatransferproject.types.common.models.DataModel; | ||
|
||
@JsonTypeName("org.dataportability:SmugMugPhotoTempData") | ||
public class SmugMugPhotoTempData extends DataModel implements Serializable { | ||
private final String albumExportId; | ||
private final String albumName; | ||
private final String albumDescription; | ||
private final String albumUri; | ||
private int photoCount; | ||
private String overflowAlbumExportId; | ||
|
||
@JsonCreator | ||
public SmugMugPhotoTempData( | ||
@JsonProperty("albumExportId") String albumExportId, | ||
@JsonProperty("albumName") String albumName, | ||
@JsonProperty("albumDescription") String albumDescription, | ||
@JsonProperty("albumUri") String albumUri) { | ||
this(albumExportId, albumName, albumDescription, albumUri, 0, null); | ||
} | ||
|
||
@VisibleForTesting | ||
@JsonCreator | ||
public SmugMugPhotoTempData( | ||
@JsonProperty("albumExportId") String albumExportId, | ||
@JsonProperty("albumName") String albumName, | ||
@JsonProperty("albumDescription") String albumDescription, | ||
@JsonProperty("albumUri") String albumUri, | ||
int photoCount, | ||
String overflowAlbumExportId) { | ||
this.albumExportId = albumExportId; | ||
this.albumName = albumName; | ||
this.albumDescription = albumDescription; | ||
this.albumUri = albumUri; | ||
this.photoCount = photoCount; | ||
this.overflowAlbumExportId = overflowAlbumExportId; | ||
} | ||
|
||
public String getAlbumExportId() { | ||
return this.albumExportId; | ||
} | ||
|
||
public int incrementPhotoCount() { | ||
return this.photoCount++; | ||
} | ||
|
||
public int getPhotoCount() { | ||
return this.photoCount; | ||
} | ||
|
||
public void setOverflowAlbumExportId(String overflowAlbumExportId) { | ||
this.overflowAlbumExportId = overflowAlbumExportId; | ||
} | ||
|
||
public String getOverflowAlbumExportId() { | ||
return this.overflowAlbumExportId; | ||
} | ||
|
||
public String getAlbumDescription() { | ||
return albumDescription; | ||
} | ||
|
||
public String getAlbumName() { | ||
return albumName; | ||
} | ||
|
||
public String getAlbumUri() { | ||
return albumUri; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return MoreObjects.toStringHelper(this) | ||
.add("albumExportId", albumExportId) | ||
.add("photoCount", photoCount) | ||
.add("overflowAlbumExportId", overflowAlbumExportId) | ||
.add("albumName", albumName) | ||
.add("albumDescription", albumDescription) | ||
.add("albumUri", albumUri) | ||
.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.