-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
106 changed files
with
1,086 additions
and
439 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,24 @@ import fr.geonature.commons.settings.IAppSettings | |
* @author [S. Grimault](mailto:[email protected]) | ||
*/ | ||
data class AppSettings( | ||
var geoNatureServerUrl: String? = null, | ||
var taxHubServerUrl: String? = null, | ||
var applicationId: Int = 0, | ||
var usersMenuId: Int = 0, | ||
var taxrefListId: Int = 0 | ||
var usersListId: Int = 0, | ||
var taxrefListId: Int = 0, | ||
var pageSize: Int = DEFAULT_PAGE_SIZE, | ||
var pageMaxRetry: Int = DEFAULT_PAGE_MAX_RETRY | ||
) : IAppSettings { | ||
|
||
private constructor(source: Parcel) : this(source.readInt()) | ||
private constructor(source: Parcel) : this( | ||
source.readString(), | ||
source.readString(), | ||
source.readInt(), | ||
source.readInt(), | ||
source.readInt(), | ||
source.readInt(), | ||
source.readInt() | ||
) | ||
|
||
override fun describeContents(): Int { | ||
return 0 | ||
|
@@ -26,19 +38,29 @@ data class AppSettings( | |
flags: Int | ||
) { | ||
dest?.also { | ||
it.writeString(geoNatureServerUrl) | ||
it.writeString(taxHubServerUrl) | ||
it.writeInt(applicationId) | ||
it.writeInt(usersMenuId) | ||
it.writeInt(usersListId) | ||
it.writeInt(taxrefListId) | ||
it.writeInt(pageSize) | ||
it.writeInt(pageMaxRetry) | ||
} | ||
} | ||
|
||
companion object CREATOR : Parcelable.Creator<AppSettings> { | ||
override fun createFromParcel(parcel: Parcel): AppSettings { | ||
return AppSettings(parcel) | ||
} | ||
companion object { | ||
const val DEFAULT_PAGE_SIZE = 1000 | ||
const val DEFAULT_PAGE_MAX_RETRY = 20 | ||
|
||
@JvmField | ||
val CREATOR: Parcelable.Creator<AppSettings> = object : Parcelable.Creator<AppSettings> { | ||
override fun createFromParcel(parcel: Parcel): AppSettings { | ||
return AppSettings(parcel) | ||
} | ||
|
||
override fun newArray(size: Int): Array<AppSettings?> { | ||
return arrayOfNulls(size) | ||
override fun newArray(size: Int): Array<AppSettings?> { | ||
return arrayOfNulls(size) | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.