This repository has been archived by the owner on Feb 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 227
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 #375 from ggalmazor/issue_371_remove_missing_odk_t…
…ables_pref Issue 371 remove missing odk tables pref
- Loading branch information
Showing
17 changed files
with
636 additions
and
826 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
76 changes: 36 additions & 40 deletions
76
src/main/java/org/opendatakit/aggregate/client/preferences/PreferenceService.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,40 +1,36 @@ | ||
/* | ||
* Copyright (C) 2011 University of Washington | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package org.opendatakit.aggregate.client.preferences; | ||
|
||
import com.google.gwt.user.client.rpc.RemoteService; | ||
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; | ||
import com.google.gwt.user.server.rpc.XsrfProtect; | ||
import org.opendatakit.aggregate.client.exception.RequestFailureException; | ||
|
||
/** | ||
* These actions require the ROLE_USER privilege, which is the least capable | ||
* privilege (granted to all authorized users of the system). | ||
* | ||
* @author [email protected] | ||
*/ | ||
@RemoteServiceRelativePath("preferenceservice") | ||
public interface PreferenceService extends RemoteService { | ||
PreferenceSummary getPreferences() throws RequestFailureException; | ||
|
||
@XsrfProtect | ||
void setSkipMalformedSubmissions(Boolean skipMalformedSubmissions) throws RequestFailureException; | ||
|
||
@XsrfProtect | ||
void setFasterBackgroundActionsDisabled(Boolean disabled) throws RequestFailureException; | ||
|
||
} | ||
/* | ||
* Copyright (C) 2011 University of Washington | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package org.opendatakit.aggregate.client.preferences; | ||
|
||
import com.google.gwt.user.client.rpc.RemoteService; | ||
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; | ||
import com.google.gwt.user.server.rpc.XsrfProtect; | ||
import org.opendatakit.aggregate.client.exception.RequestFailureException; | ||
|
||
/** | ||
* These actions require the ROLE_USER privilege, which is the least capable | ||
* privilege (granted to all authorized users of the system). | ||
* | ||
* @author [email protected] | ||
*/ | ||
@RemoteServiceRelativePath("preferenceservice") | ||
public interface PreferenceService extends RemoteService { | ||
PreferenceSummary getPreferences() throws RequestFailureException; | ||
|
||
@XsrfProtect | ||
void setSkipMalformedSubmissions(Boolean skipMalformedSubmissions) throws RequestFailureException; | ||
} |
56 changes: 27 additions & 29 deletions
56
src/main/java/org/opendatakit/aggregate/client/preferences/PreferenceServiceAsync.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,29 +1,27 @@ | ||
/* | ||
* Copyright (C) 2011 University of Washington | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package org.opendatakit.aggregate.client.preferences; | ||
|
||
import com.google.gwt.user.client.rpc.AsyncCallback; | ||
|
||
public interface PreferenceServiceAsync { | ||
|
||
void getPreferences(AsyncCallback<PreferenceSummary> callback); | ||
|
||
void setFasterBackgroundActionsDisabled(Boolean disabled, AsyncCallback<Void> callback); | ||
|
||
void setSkipMalformedSubmissions(Boolean skipMalformedSubmissions, AsyncCallback<Void> callback); | ||
|
||
} | ||
/* | ||
* Copyright (C) 2011 University of Washington | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package org.opendatakit.aggregate.client.preferences; | ||
|
||
import com.google.gwt.user.client.rpc.AsyncCallback; | ||
|
||
public interface PreferenceServiceAsync { | ||
|
||
void getPreferences(AsyncCallback<PreferenceSummary> callback); | ||
|
||
void setSkipMalformedSubmissions(Boolean skipMalformedSubmissions, AsyncCallback<Void> callback); | ||
|
||
} |
143 changes: 68 additions & 75 deletions
143
src/main/java/org/opendatakit/aggregate/client/preferences/PreferenceSummary.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,75 +1,68 @@ | ||
/* | ||
* Copyright (C) 2011 University of Washington | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package org.opendatakit.aggregate.client.preferences; | ||
|
||
import java.io.Serializable; | ||
|
||
public class PreferenceSummary implements Serializable { | ||
|
||
private static final long serialVersionUID = -53448827282096798L; | ||
|
||
private String googleSimpleApiKey; | ||
|
||
private String googleApiClientId; | ||
|
||
private String enketoApiUrl; | ||
|
||
private String enketoApiToken; | ||
|
||
private Boolean fasterBackgroundActionsDisabled; | ||
|
||
private Boolean skipMalformedSubmissions; | ||
|
||
public PreferenceSummary() { | ||
|
||
} | ||
|
||
public PreferenceSummary(String googleSimpleApiKey, String googleApiClientId, | ||
String enketoApiUrl, String enketoApiToken, | ||
Boolean fasterBackgroundActionsDisabled, Boolean skipMalformedSubmissions) { | ||
this.googleSimpleApiKey = googleSimpleApiKey; | ||
this.googleApiClientId = googleApiClientId; | ||
this.enketoApiUrl = enketoApiUrl; | ||
this.enketoApiToken = enketoApiToken; | ||
this.fasterBackgroundActionsDisabled = fasterBackgroundActionsDisabled; | ||
this.skipMalformedSubmissions = skipMalformedSubmissions; | ||
} | ||
|
||
public String getGoogleSimpleApiKey() { | ||
return googleSimpleApiKey; | ||
} | ||
|
||
public String getGoogleApiClientId() { | ||
return googleApiClientId; | ||
} | ||
|
||
public String getEnketoApiUrl() { | ||
return enketoApiUrl; | ||
} | ||
|
||
public String getEnketoApiToken() { | ||
return enketoApiToken; | ||
} | ||
|
||
public Boolean getFasterBackgroundActionsDisabled() { | ||
return fasterBackgroundActionsDisabled; | ||
} | ||
|
||
public Boolean getSkipMalformedSubmissions() { | ||
return skipMalformedSubmissions; | ||
} | ||
} | ||
/* | ||
* Copyright (C) 2011 University of Washington | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package org.opendatakit.aggregate.client.preferences; | ||
|
||
import java.io.Serializable; | ||
|
||
public class PreferenceSummary implements Serializable { | ||
|
||
private static final long serialVersionUID = -53448827282096798L; | ||
|
||
private String googleSimpleApiKey; | ||
|
||
private String googleApiClientId; | ||
|
||
private String enketoApiUrl; | ||
|
||
private String enketoApiToken; | ||
|
||
private Boolean skipMalformedSubmissions; | ||
|
||
public PreferenceSummary() { | ||
|
||
} | ||
|
||
public PreferenceSummary(String googleSimpleApiKey, String googleApiClientId, | ||
String enketoApiUrl, String enketoApiToken, | ||
Boolean skipMalformedSubmissions) { | ||
this.googleSimpleApiKey = googleSimpleApiKey; | ||
this.googleApiClientId = googleApiClientId; | ||
this.enketoApiUrl = enketoApiUrl; | ||
this.enketoApiToken = enketoApiToken; | ||
this.skipMalformedSubmissions = skipMalformedSubmissions; | ||
} | ||
|
||
public String getGoogleSimpleApiKey() { | ||
return googleSimpleApiKey; | ||
} | ||
|
||
public String getGoogleApiClientId() { | ||
return googleApiClientId; | ||
} | ||
|
||
public String getEnketoApiUrl() { | ||
return enketoApiUrl; | ||
} | ||
|
||
public String getEnketoApiToken() { | ||
return enketoApiToken; | ||
} | ||
|
||
public Boolean getSkipMalformedSubmissions() { | ||
return skipMalformedSubmissions; | ||
} | ||
} |
Oops, something went wrong.