Skip to content

Commit 53cb66f

Browse files
committed
refactor: useHash -> usingHash
1 parent 7b1041e commit 53cb66f

File tree

75 files changed

+94
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+94
-94
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Nalu supports:
1515

1616
* HTML links and programmatically routing thanks to a router
1717

18-
* Browser's back-, forward- and reload-button (In case the hasHistory-attribute of the `Application`-annotation is set to **true**)
18+
* Browser's back-, forward- and reload-button (In case the isUsingHistory-attribute of the `Application`-annotation is set to **true**)
1919

2020
* An optional loader that will be executed at application start to load data from the server
2121

nalu-plugin-core-web/src/main/java/io/github/nalukit/nalu/plugin/core/web/client/implementation/CleanUrlWithParameterHandlingCoreWebPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void route(String newRoute,
7777
if (this.hasParameters()) {
7878
this.createParameterToken(parameterToken);
7979
}
80-
if (NaluConfig.INSTANCE.hasHistory()) {
80+
if (NaluConfig.INSTANCE.isUsingHistory()) {
8181
if (!stealthMode) {
8282
if (parameterToken.length() > 0) {
8383
newRouteToken = newRouteToken + parameterToken;

nalu-plugin-core-web/src/main/java/io/github/nalukit/nalu/plugin/core/web/client/implementation/DefaultCoreWebPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void route(String newRoute,
5959
newRouteToken = newRouteToken.substring(0, newRouteToken.length() - 1);
6060
}
6161
}
62-
if (NaluConfig.INSTANCE.hasHistory()) {
62+
if (NaluConfig.INSTANCE.isUsingHistory()) {
6363
if (!stealthMode) {
6464
if (replace) {
6565
DomGlobal.window.history.replaceState(newRouteToken,

nalu-plugin-domino-v2/src/main/java/io/github/nalukit/nalu/plugin/domino/v2/client/NaluPluginDominoV2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public Map<String, String> getQueryParameters() {
9898
@Override
9999
public void register(RouteChangeHandler handler) {
100100
if (NaluConfig.INSTANCE
101-
.hasHistory()) {
101+
.isUsingHistory()) {
102102
if (NaluConfig.INSTANCE
103103
.isUsingHash()) {
104104
NaluCorePluginFactory.INSTANCE.addOnHashChangeHandler(handler);

nalu-plugin-elemental2/src/main/java/io/github/nalukit/nalu/plugin/elemental2/client/NaluPluginElemental2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public Map<String, String> getQueryParameters() {
9898
@Override
9999
public void register(RouteChangeHandler handler) {
100100
if (NaluConfig.INSTANCE
101-
.hasHistory()) {
101+
.isUsingHistory()) {
102102
if (NaluConfig.INSTANCE
103103
.isUsingHash()) {
104104
NaluCorePluginFactory.INSTANCE.addOnHashChangeHandler(handler);

nalu-plugin-elemento/src/main/java/io/github/nalukit/nalu/plugin/elemento/client/NaluPluginElemento.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public Map<String, String> getQueryParameters() {
112112
@Override
113113
public void register(RouteChangeHandler handler) {
114114
if (NaluConfig.INSTANCE
115-
.hasHistory()) {
115+
.isUsingHistory()) {
116116
if (NaluConfig.INSTANCE
117117
.isUsingHash()) {
118118
NaluCorePluginFactory.INSTANCE.addOnHashChangeHandler(handler);

nalu-plugin-gwt/src/main/java/io/github/nalukit/nalu/plugin/gwt/client/NaluPluginGWT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public Map<String, String> getQueryParameters() {
104104
@Override
105105
public void register(RouteChangeHandler handler) {
106106
if (NaluConfig.INSTANCE
107-
.hasHistory()) {
107+
.isUsingHistory()) {
108108
if (NaluConfig.INSTANCE
109109
.isUsingHash()) {
110110
NaluCorePluginFactory.INSTANCE.addOnHashChangeHandler(handler);

nalu-processor/src/main/java/io/github/nalukit/nalu/processor/generator/ApplicationGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,12 @@ private void generateIsHandlingBaseHref(TypeSpec.Builder typeSpec,
345345

346346
private void generateHasHistoryMethod(TypeSpec.Builder typeSpec,
347347
MetaModel metaModel) {
348-
typeSpec.addMethod(MethodSpec.methodBuilder("hasHistory")
348+
typeSpec.addMethod(MethodSpec.methodBuilder("isUsingHistory")
349349
.addAnnotation(Override.class)
350350
.addModifiers(Modifier.PUBLIC)
351351
.returns(boolean.class)
352352
.addStatement("return $L",
353-
metaModel.hasHistory() ?
353+
metaModel.isUsingHistory() ?
354354
"true" :
355355
"false")
356356
.build());

nalu-processor/src/main/java/io/github/nalukit/nalu/processor/model/MetaModel.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class MetaModel {
7474
private ClassNameModel clientLogger;
7575
/* flag, that indicates, if a Nalu application */
7676
/* uses a history token or not. */
77-
private boolean history;
77+
private boolean isUsingHistory;
7878
/* Version of the application set by the */
7979
/* Version annotation */
8080
private String applicationVersion;
@@ -255,7 +255,7 @@ public boolean isUsingTrailingSlash() {
255255
return usingTrailingSlash;
256256
}
257257

258-
public void setTrailingSlash(boolean usingTrailingSlash) {
258+
public void setUsingTrailingSlash(boolean usingTrailingSlash) {
259259
this.usingTrailingSlash = usingTrailingSlash;
260260
}
261261

@@ -300,12 +300,12 @@ private String getShellFromRoute(String route) {
300300
return shellFromRoute;
301301
}
302302

303-
public boolean hasHistory() {
304-
return history;
303+
public boolean isUsingHistory() {
304+
return isUsingHistory;
305305
}
306306

307-
public void setHistory(boolean history) {
308-
this.history = history;
307+
public void setUsingHistory(boolean isUsingHistory) {
308+
this.isUsingHistory = isUsingHistory;
309309
}
310310

311311
public ClassNameModel getLogger() {

nalu-processor/src/main/java/io/github/nalukit/nalu/processor/scanner/ApplicationAnnotationScanner.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ public void scan()
8181
metaModel.setIllegalRouteTarget(applicationAnnotation.illegalRouteTarget());
8282
metaModel.setBaseHref(applicationAnnotation.usingBaseHref());
8383
metaModel.setUsingHash(applicationAnnotation.usingHash());
84-
metaModel.setTrailingSlash(applicationAnnotation.usingTrailingSlash());
84+
metaModel.setUsingTrailingSlash(applicationAnnotation.usingTrailingSlash());
8585
metaModel.setUsingColonForParametersInUrl(applicationAnnotation.usingColonForParametersInUrl());
8686
metaModel.setStayOnSide(applicationAnnotation.stayOnSite());
87-
metaModel.setHistory(applicationAnnotation.history());
87+
metaModel.setUsingHistory(applicationAnnotation.isUsingHistory());
8888
metaModel.setCustomAlertPresenter(new ClassNameModel(isNull(customAlertPresenterTypeElement) ? "" : customAlertPresenterTypeElement.toString()));
8989
metaModel.setCustomConfirmPresenter(new ClassNameModel(isNull(customConfirmPresenterTypeElement) ? "" : customConfirmPresenterTypeElement.toString()));
9090
metaModel.setExtendingIsModuleContext(this.processorUtils.extendsClassOrInterface(this.processingEnvironment.getTypeUtils(),

0 commit comments

Comments
 (0)