Skip to content

Commit

Permalink
update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankHossfeld committed May 1, 2018
1 parent 34f66a6 commit 95471ad
Show file tree
Hide file tree
Showing 21 changed files with 293 additions and 7 deletions.
6 changes: 3 additions & 3 deletions mvp4g2-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
<url>https://github.com/mvp4g/mvp4g2/issues</url>
</issueManagement>
<properties>
<autocommon.version>0.8</autocommon.version>
<autocommon.version>0.10</autocommon.version>

<autoservice.version>1.0-rc4</autoservice.version>
<javapoet.version>1.10.0</javapoet.version>
<truth.version>0.39</truth.version>
<javapoet.version>1.11.0</javapoet.version>
<truth.version>0.40</truth.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* Copyright (c) 2018 - Frank Hossfeld
*
* 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 com.github.mvp4g.junit.test.core;

import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.Properties;

import com.github.mvp4g.mvp4g2.core.history.annotation.History;
import com.github.mvp4g.mvp4g2.core.internal.history.HistoryMetaData;
import org.junit.Assert;

public class PropertyFactory {


private static HistoryMetaData getHistoryMetaData(String requestedHistoryConverter,
String uri) {
if (requestedHistoryConverter == null) {
return null;
}
final HistoryMetaData[] historyMetaData = {null};
ClassLoader loader = Thread.currentThread()
.getContextClassLoader();
Properties historyMetaDataProps = new Properties();
try (InputStream resourceStream = loader.getResourceAsStream(uri)) {
historyMetaDataProps.load(resourceStream);
} catch (IOException e) {
Assert.fail("Resource >>" + uri + "<< not found!");
}
String[] historyConverters = historyMetaDataProps.getProperty("historyConverters")
.split(",");
Arrays.stream(historyConverters)
.filter(s -> requestedHistoryConverter.equals(s))
.forEach(s -> {
History.HistoryConverterType type;
String historyConverterType = historyMetaDataProps.getProperty(s + ".historyConverterType");
switch (historyConverterType) {
case "DEFAULT":
type = History.HistoryConverterType.DEFAULT;
break;
case "SIMPLE":
type = History.HistoryConverterType.SIMPLE;
break;
default:
type = History.HistoryConverterType.NONE;
break;
}
historyMetaData[0] = new HistoryMetaData(historyMetaDataProps.getProperty(s + ".historyConverter"),
type) {
@Override
public String getHistoryConverterClassName() {
return super.getHistoryConverterClassName();
}
};
});
return historyMetaData.length == 0 ? null : historyMetaData[0];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright (c) 2018 - Frank Hossfeld
#
# 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.
#
#

com.github.mvp4g.junit.test.core.stub.DefaultHistoryProxyStubImpl.historyConverter=com.github.mvp4g.junit.test.core.stub.DefaultHistoryProxyStubImpl
com.github.mvp4g.junit.test.core.stub.DefaultHistoryProxyStubImpl.historyConverterType=SIMPLE
historyConverters=com.github.mvp4g.junit.test.core.stub.DefaultHistoryProxyStubImpl
7 changes: 7 additions & 0 deletions mvp4g2/etc/backUp/test/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
#Sun Apr 29 08:29:04 CEST 2018
loader=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.Mvp4g2SimpleApplicationLoader
eventBus=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.Mvp4g2SimpleApplicationEventBus
encodeToken=false
application=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.Mvp4g2SimpleApplicationApplication
historyOnStart=true
10 changes: 10 additions & 0 deletions mvp4g2/etc/backUp/test/resources/eventBus.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
#Sun Apr 29 08:29:04 CEST 2018
debugLogLevel=SIMPLE
eventBus=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.Mvp4g2SimpleApplicationEventBus
hasFiltersAnnotation=false
debugLogger=com.github.mvp4g.mvp4g2.core.internal.eventbus.DefaultMvp4g2Logger
hasDebugAnnotation=true
events=setNavigation_pPp_elemental2_dom_Element,setStatus_pPp_java_lang_String,gotoList_pPp_java_lang_String_pPp_java_lang_String,start,gotoDetail_pPp_long,setContent_pPp_elemental2_dom_Element,initHistory,gotoSearch_pPp_java_lang_String_pPp_java_lang_String
shell=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter
filters=
16 changes: 16 additions & 0 deletions mvp4g2/etc/backUp/test/resources/gotoDetail_pPp_long.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
#Sun Apr 29 08:29:04 CEST 2018
eventInternalName=gotoDetail_pPp_long
bindings=
handlers=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.DetailPresenter
startEvent=false
navigationEvent=true
notFoundHistory=false
deactivateHandlers=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.handler.SimpleApplicationHandler02
activateHandlers=
eventName=gotoDetail
historyEventName=C3PO
initHistory=false
historyConverter=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.history.DefaultHistoryConverter
passive=false
parameters=id_tTt_long
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
#Sun Apr 29 08:29:04 CEST 2018
eventInternalName=gotoList_pPp_java_lang_String_pPp_java_lang_String
bindings=
handlers=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.ListPresenter
startEvent=false
navigationEvent=true
notFoundHistory=false
deactivateHandlers=
activateHandlers=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.handler.SimpleApplicationHandler02
eventName=gotoList
historyEventName=C2N2
initHistory=false
historyConverter=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.history.DefaultHistoryConverter
passive=false
parameters=searchName_tTt_java.lang.String,searchOrt_tTt_java.lang.String
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
#Sun Apr 29 08:29:04 CEST 2018
eventInternalName=gotoSearch_pPp_java_lang_String_pPp_java_lang_String
bindings=
handlers=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchPresenter
startEvent=false
navigationEvent=true
notFoundHistory=false
deactivateHandlers=
activateHandlers=
eventName=gotoSearch
historyEventName=R2D2
initHistory=false
historyConverter=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.history.DefaultHistoryConverter
passive=false
parameters=searchName_tTt_java.lang.String,searchOrt_tTt_java.lang.String
7 changes: 7 additions & 0 deletions mvp4g2/etc/backUp/test/resources/handler.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
#Sun Apr 29 08:29:04 CEST 2018
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.handler.SimpleApplicationHandler02.handlerClassName=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.handler.SimpleApplicationHandler02
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.handler.SimpleApplicationHandler01.handledEvents=onSetNavigation_pPp_elemental2_dom_Element,onGotoDetail_pPp_long,onGotoList_pPp_java_lang_String_pPp_java_lang_String,onGotoSearch_pPp_java_lang_String_pPp_java_lang_String
handlers=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.handler.SimpleApplicationHandler02,de.gishmo.gwt.example.mvp4g2.simpleapplication.client.handler.SimpleApplicationHandler01
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.handler.SimpleApplicationHandler01.handlerClassName=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.handler.SimpleApplicationHandler01
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.handler.SimpleApplicationHandler02.handledEvents=
5 changes: 5 additions & 0 deletions mvp4g2/etc/backUp/test/resources/history.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
#Sun Apr 29 08:29:04 CEST 2018
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.history.DefaultHistoryConverter.historyConverter=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.history.DefaultHistoryConverter
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.history.DefaultHistoryConverter.historyConverterType=SIMPLE
historyConverters=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.history.DefaultHistoryConverter
16 changes: 16 additions & 0 deletions mvp4g2/etc/backUp/test/resources/initHistory.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
#Sun Apr 29 08:29:04 CEST 2018
eventInternalName=initHistory
bindings=
handlers=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchPresenter
startEvent=false
navigationEvent=false
notFoundHistory=true
deactivateHandlers=
activateHandlers=
eventName=initHistory
historyEventName=\#%\!|&*+\!\#\#%$
initHistory=true
historyConverter=com.github.mvp4g.mvp4g2.core.eventbus.annotation.Event.NoHistoryConverter
passive=false
parameters=
38 changes: 38 additions & 0 deletions mvp4g2/etc/backUp/test/resources/presenter.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
#Sun Apr 29 08:29:04 CEST 2018
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.ListPresenter.isMultiple=false
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.ListPresenter.viewInterface=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.IListView
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.ListPresenter.presenter=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.ListPresenter
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.ListPresenter.viewClass=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.ListView
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.NavigationPresenter.handledEvents=
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter.viewCreationMethod=FRAMEWORK
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.NavigationPresenter.isMultiple=false
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter.presenter=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter.handledEvents=
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter.viewClass=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellView
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.NavigationPresenter.viewInterface=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.INavigationView
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchPresenter.isShell=false
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchPresenter.presenter=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchPresenter
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.DetailPresenter.isShell=false
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchPresenter.viewClass=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchView
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchPresenter.isMultiple=false
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.DetailPresenter.presenter=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.DetailPresenter
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter.isMultiple=false
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.DetailPresenter.viewClass=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.DetailView
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter.viewInterface=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.IShellView
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.NavigationPresenter.presenter=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.NavigationPresenter
presenters=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.ListPresenter,de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.NavigationPresenter,de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchPresenter,de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter,de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.DetailPresenter
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.NavigationPresenter.viewClass=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.NavigationView
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.DetailPresenter.isMultiple=false
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.DetailPresenter.handledEvents=
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchPresenter.handledEvents=
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchPresenter.viewCreationMethod=PRESENTER
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.NavigationPresenter.isShell=false
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.ListPresenter.viewCreationMethod=PRESENTER
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.DetailPresenter.viewCreationMethod=PRESENTER
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.ListPresenter.handledEvents=
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.DetailPresenter.viewInterface=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.detail.IDetailView
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.NavigationPresenter.viewCreationMethod=FRAMEWORK
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter.isShell=true
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.SearchPresenter.viewInterface=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.search.ISearchView
de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.list.ListPresenter.isShell=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
#Sun Apr 29 08:29:04 CEST 2018
eventInternalName=setContent_pPp_elemental2_dom_Element
bindings=
handlers=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter
startEvent=false
navigationEvent=false
notFoundHistory=false
deactivateHandlers=
activateHandlers=
eventName=setContent
historyEventName=\#%\!|&*+\!\#\#%$
initHistory=false
historyConverter=com.github.mvp4g.mvp4g2.core.eventbus.annotation.Event.NoHistoryConverter
passive=false
parameters=element_tTt_elemental2.dom.Element
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
#Sun Apr 29 08:29:04 CEST 2018
eventInternalName=setNavigation_pPp_elemental2_dom_Element
bindings=
handlers=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter
startEvent=false
navigationEvent=false
notFoundHistory=false
deactivateHandlers=
activateHandlers=
eventName=setNavigation
historyEventName=\#%\!|&*+\!\#\#%$
initHistory=false
historyConverter=com.github.mvp4g.mvp4g2.core.eventbus.annotation.Event.NoHistoryConverter
passive=false
parameters=element_tTt_elemental2.dom.Element
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
#Sun Apr 29 08:29:04 CEST 2018
eventInternalName=setStatus_pPp_java_lang_String
bindings=
handlers=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.shell.ShellPresenter
startEvent=false
navigationEvent=false
notFoundHistory=false
deactivateHandlers=
activateHandlers=
eventName=setStatus
historyEventName=\#%\!|&*+\!\#\#%$
initHistory=false
historyConverter=com.github.mvp4g.mvp4g2.core.eventbus.annotation.Event.NoHistoryConverter
passive=false
parameters=status_tTt_java.lang.String
16 changes: 16 additions & 0 deletions mvp4g2/etc/backUp/test/resources/start.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
#Sun Apr 29 08:29:04 CEST 2018
eventInternalName=start
bindings=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.ui.navigation.NavigationPresenter
handlers=de.gishmo.gwt.example.mvp4g2.simpleapplication.client.handler.SimpleApplicationHandler02
startEvent=true
navigationEvent=false
notFoundHistory=false
deactivateHandlers=
activateHandlers=
eventName=start
historyEventName=\#%\!|&*+\!\#\#%$
initHistory=false
historyConverter=com.github.mvp4g.mvp4g2.core.eventbus.annotation.Event.NoHistoryConverter
passive=false
parameters=
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class PlaceService<E extends IsEventBus> {
private Map<String, EventMetaData<? extends IsEventBus>> eventMetaDataMap;
private Map<String, String> historyNameMap;
private boolean enabled = true;
/* history proxy */
/* history proxy - we use this proxy here, to avoid using Elemental 2 feature directly in this class! */
private IsHistoryProxy historyProxy;

public PlaceService(E eventBus,
Expand Down

This file was deleted.

0 comments on commit 95471ad

Please sign in to comment.