This repository has been archived by the owner on Jan 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cache folder to InFileObjetPersisters. Customizable, tests and in…
- Loading branch information
1 parent
65d085c
commit d0c2991
Showing
88 changed files
with
980 additions
and
514 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
17 changes: 12 additions & 5 deletions
17
...va/com/octo/android/robospice/googlehttpclient/test/GoogleHttpClientSpiceTestService.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
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
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
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
20 changes: 15 additions & 5 deletions
20
.../octo/android/robospice/persistence/googlehttpclient/json/GsonObjectPersisterFactory.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,24 +1,34 @@ | ||
package com.octo.android.robospice.persistence.googlehttpclient.json; | ||
|
||
import java.io.File; | ||
import java.util.List; | ||
|
||
import android.app.Application; | ||
|
||
import com.google.api.client.json.gson.GsonFactory; | ||
import com.octo.android.robospice.persistence.exception.CacheCreationException; | ||
|
||
/** | ||
* Allows to serialize objects using the google http java client gson module. | ||
* @author sni | ||
*/ | ||
public class GsonObjectPersisterFactory extends JsonObjectPersisterFactory { | ||
|
||
public GsonObjectPersisterFactory(Application application, | ||
List<Class<?>> listHandledClasses) { | ||
super(application, new GsonFactory(), listHandledClasses); | ||
public GsonObjectPersisterFactory(Application application, File cacheFolder) throws CacheCreationException { | ||
super(application, new GsonFactory(), cacheFolder); | ||
} | ||
|
||
public GsonObjectPersisterFactory(Application application) { | ||
this(application, null); | ||
public GsonObjectPersisterFactory(Application application, List<Class<?>> listHandledClasses, File cacheFolder) | ||
throws CacheCreationException { | ||
super(application, new GsonFactory(), listHandledClasses, cacheFolder); | ||
} | ||
|
||
public GsonObjectPersisterFactory(Application application, List<Class<?>> listHandledClasses) | ||
throws CacheCreationException { | ||
super(application, new GsonFactory(), listHandledClasses); | ||
} | ||
|
||
public GsonObjectPersisterFactory(Application application) throws CacheCreationException { | ||
super(application, new GsonFactory()); | ||
} | ||
} |
Oops, something went wrong.