-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: naming, removed useless prefix
- Loading branch information
Miklos Csere
committed
Mar 21, 2016
1 parent
66bf413
commit cffe421
Showing
51 changed files
with
505 additions
and
442 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
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
34 changes: 34 additions & 0 deletions
34
cloud/src/main/java/com/mkbrv/orange/cloud/model/folder/FolderSerializer.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,34 @@ | ||
package com.mkbrv.orange.cloud.model.folder; | ||
|
||
import com.google.gson.JsonElement; | ||
import com.google.gson.JsonObject; | ||
import com.google.gson.JsonSerializationContext; | ||
import com.google.gson.JsonSerializer; | ||
import com.mkbrv.orange.cloud.model.OrangeFolder; | ||
import com.mkbrv.orange.cloud.util.JsonTranslator; | ||
|
||
import java.lang.reflect.Type; | ||
|
||
/** | ||
* Currently used only for create folder | ||
* Created by mkbrv on 16/03/16. | ||
*/ | ||
public class FolderSerializer implements JsonSerializer<OrangeFolder>, JsonTranslator { | ||
|
||
public static class Params { | ||
public static final String PARENT_FOLDER_ID = "parentFolderId"; | ||
public static final String NAME = "name"; | ||
|
||
} | ||
|
||
|
||
@Override | ||
public JsonElement serialize(final OrangeFolder orangeFolder, | ||
final Type type, | ||
final JsonSerializationContext jsonSerializationContext) { | ||
JsonObject jsonElement = new JsonObject(); | ||
this.addStringParamIfNotNull(jsonElement, Params.PARENT_FOLDER_ID, orangeFolder.getParentFolderId()); | ||
this.addStringParamIfNotNull(jsonElement, Params.NAME, orangeFolder.getParentFolderId()); | ||
return jsonElement; | ||
} | ||
} |
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.