-
Notifications
You must be signed in to change notification settings - Fork 479
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 #823 from google/ms-400
Transmogrification config fix
- Loading branch information
Showing
3 changed files
with
83 additions
and
54 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: 46 additions & 43 deletions
89
...n/src/main/java/org/datatransferproject/types/common/models/TransmogrificationConfig.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 |
---|---|---|
@@ -1,46 +1,49 @@ | ||
package org.datatransferproject.types.common.models; | ||
|
||
/** | ||
This class is meant to be extended with custom logic for each service. | ||
These defaults represent no-chnage transmogrifications. | ||
*/ | ||
public class TransmogrificationConfig { | ||
private final String PHOTO_TITLE_FORBIDDEN_CHARACTERS = ""; | ||
private final char PHOTO_TITLE_REPLACEMENT_CHARACTER = '_'; | ||
private final int PHOTO_TITLE_MAX_LENGTH = -1; | ||
|
||
private final String ALBUM_NAME_FORBIDDEN_CHARACTERS = ""; | ||
private final char ALBUM_NAME_REPLACEMENT_CHARACTER = '_'; | ||
private final int ALBUM_NAME_MAX_LENGTH = -1; | ||
private final boolean ALBUM_ALLOW_ROOT_PHOTOS = true; | ||
private final int ALBUM_MAX_SIZE = -1; | ||
|
||
public String getPhotoTitleForbiddenCharacters() { | ||
return PHOTO_TITLE_FORBIDDEN_CHARACTERS; | ||
} | ||
|
||
public char getPhotoTitleReplacementCharater() { | ||
return PHOTO_TITLE_REPLACEMENT_CHARACTER; | ||
} | ||
|
||
public int getPhotoTitleMaxLength() { | ||
return PHOTO_TITLE_MAX_LENGTH; | ||
} | ||
|
||
public String getAlbumNameForbiddenCharacters() { | ||
return ALBUM_NAME_FORBIDDEN_CHARACTERS; | ||
} | ||
|
||
public char getAlbumNameReplacementCharacter() { | ||
return ALBUM_NAME_REPLACEMENT_CHARACTER; | ||
} | ||
|
||
public int getAlbumNameMaxLength() { | ||
return ALBUM_NAME_MAX_LENGTH; | ||
} | ||
|
||
public boolean getAlbumAllowRootPhotos() { | ||
return ALBUM_ALLOW_ROOT_PHOTOS; | ||
} | ||
|
||
public int getAlbumMaxSize() { | ||
return ALBUM_MAX_SIZE; | ||
} | ||
|
||
} | ||
private final String PHOTO_TITLE_FORBIDDEN_CHARACTERS = ""; | ||
private final char PHOTO_TITLE_REPLACEMENT_CHARACTER = '_'; | ||
private final int PHOTO_TITLE_MAX_LENGTH = -1; | ||
|
||
private final String ALBUM_NAME_FORBIDDEN_CHARACTERS = ""; | ||
private final char ALBUM_NAME_REPLACEMENT_CHARACTER = '_'; | ||
private final int ALBUM_NAME_MAX_LENGTH = -1; | ||
private final boolean ALBUM_ALLOW_ROOT_PHOTOS = true; | ||
private final int ALBUM_MAX_SIZE = -1; | ||
|
||
public String getPhotoTitleForbiddenCharacters() { | ||
return PHOTO_TITLE_FORBIDDEN_CHARACTERS; | ||
} | ||
|
||
public char getPhotoTitleReplacementCharater() { | ||
return PHOTO_TITLE_REPLACEMENT_CHARACTER; | ||
} | ||
|
||
public int getPhotoTitleMaxLength() { | ||
return PHOTO_TITLE_MAX_LENGTH; | ||
} | ||
|
||
public String getAlbumNameForbiddenCharacters() { | ||
return ALBUM_NAME_FORBIDDEN_CHARACTERS; | ||
} | ||
|
||
public char getAlbumNameReplacementCharacter() { | ||
return ALBUM_NAME_REPLACEMENT_CHARACTER; | ||
} | ||
|
||
public int getAlbumNameMaxLength() { | ||
return ALBUM_NAME_MAX_LENGTH; | ||
} | ||
|
||
public boolean getAlbumAllowRootPhotos() { | ||
return ALBUM_ALLOW_ROOT_PHOTOS; | ||
} | ||
|
||
public int getAlbumMaxSize() { | ||
return ALBUM_MAX_SIZE; | ||
} | ||
} |