Skip to content

Commit

Permalink
Update MicrosoftTransmogrificationConfig.java (#824)
Browse files Browse the repository at this point in the history
* Update MicrosoftTransmogrificationConfig.java

remove . from invalid characters

* Update MicrosoftTransmogrificationConfig.java

make class variables static

* Update SmugMugTransmogrificationConfig.java

make class variables static

* Update TransmogrificationConfig.java

make class variables static

Co-authored-by: Chuy <[email protected]>
  • Loading branch information
pablomd314 and holachuy committed Jan 17, 2020
1 parent c685930 commit 7b9d5b9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public class MicrosoftTransmogrificationConfig extends TransmogrificationConfig
OneDrive has forbidden characters for file names:
https://support.office.com/en-us/article/invalid-file-names-and-file-types-in-onedrive-onedrive-for-business-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa#invalidcharacters
*/
private final String PHOTO_TITLE_FORBIDDEN_CHARACTERS = "~\"#%&*:<>?/\\{|}.";
private final String ALBUM_NAME_FORBIDDEN_CHARACTERS = "~\"#%&*:<>?/\\{|}.";
private static final String PHOTO_TITLE_FORBIDDEN_CHARACTERS = "~\"#%&*:<>?/\\{|}";
private static final String ALBUM_NAME_FORBIDDEN_CHARACTERS = "~\"#%&*:<>?/\\{|}";

/**
We need to override the methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
// This class defines transmogrification paramaters for SmugMug imports
public class SmugMugTransmogrificationConfig extends TransmogrificationConfig {
// Smugmug doesn't allow photos to exist outside of a folder
private final boolean ALBUM_ALLOW_ROOT_PHOTOS = false;
private static final boolean ALBUM_ALLOW_ROOT_PHOTOS = false;
// Album size specified here:
// https://github.com/google/data-transfer-project/pull/805/files
private final int ALBUM_MAX_SIZE = 5000;
private static final int ALBUM_MAX_SIZE = 5000;

/**
We need to override the methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
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;
private static final String PHOTO_TITLE_FORBIDDEN_CHARACTERS = "";
private static final char PHOTO_TITLE_REPLACEMENT_CHARACTER = '_';
private static final int PHOTO_TITLE_MAX_LENGTH = -1;

private static final String ALBUM_NAME_FORBIDDEN_CHARACTERS = "";
private static final char ALBUM_NAME_REPLACEMENT_CHARACTER = '_';
private static final int ALBUM_NAME_MAX_LENGTH = -1;
private static final boolean ALBUM_ALLOW_ROOT_PHOTOS = true;
private static final int ALBUM_MAX_SIZE = -1;

public String getPhotoTitleForbiddenCharacters() {
return PHOTO_TITLE_FORBIDDEN_CHARACTERS;
Expand Down

0 comments on commit 7b9d5b9

Please sign in to comment.