Skip to content

Commit

Permalink
refactor name isUsingLocaleForms to supportsLocaleBasedForms
Browse files Browse the repository at this point in the history
and other formatting improvements
  • Loading branch information
LZRS committed Jul 9, 2021
1 parent 2b05466 commit a787630
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ protected void onCreate(Bundle savedInstanceState) {
checkIfFormUpdate(jsonObject);
}

private FormUtils getFormUtils(){
if (!this.isUsingLocaleForms()){
private FormUtils getFormUtils() {
if (!this.supportsLocaleBasedForms()) {
return new NoLocaleFormUtils();
}
return new FormUtils();
}

protected boolean isUsingLocaleForms(){
protected boolean supportsLocaleBasedForms() {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

import org.json.JSONException;

public class FormConfigurationJsonWizardFormActivity extends FormConfigurationJsonFormActivity{
public class FormConfigurationJsonWizardFormActivity extends FormConfigurationJsonFormActivity {

private final JsonWizardFormDelegate delegate = new JsonWizardFormDelegate();

@Override
public void initializeFormFragment() {
public synchronized void initializeFormFragment() {
initializeFormFragmentCore();
}

Expand All @@ -23,15 +23,15 @@ public void onFormFinish() {
callSuperFinish();
}

protected void callSuperFinish(){
protected void callSuperFinish() {
super.onFormFinish();
}

protected void callSuperWriteValue(String stepName, String key, String value, String openMrsEntityParent, String openMrsEntity, String openMrsEntityId) throws JSONException {
super.writeValue(stepName, key, value, openMrsEntityParent, openMrsEntity, openMrsEntityId);
}

protected void initializeFormFragmentCore(){
protected void initializeFormFragmentCore() {
delegate.initializeFormFragmentCore(this.getSupportFragmentManager());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class NoLocaleFormConfigurationJsonWizardFormActivity extends FormConfigurationJsonWizardFormActivity {
@Override
protected boolean isUsingLocaleForms() {
protected boolean supportsLocaleBasedForms() {
return false;
}
}

0 comments on commit a787630

Please sign in to comment.