# HG changeset patch # User gernotbelger # Date 1516296832 -3600 # Node ID 8c64617a799104511faff4e1586f0d4070990de5 # Parent 8f6d6d26e96f0985b95cd99b1616b3a8eb7862c0 Some source code comments and fixme's diff -r 8f6d6d26e96f -r 8c64617a7991 artifacts/src/main/java/org/dive4elements/river/artifacts/model/DataFacet.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DataFacet.java Thu Jan 18 18:32:30 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DataFacet.java Thu Jan 18 18:33:52 2018 +0100 @@ -104,12 +104,14 @@ */ @Override public Facet deepCopy() { + // FIXME: why not use the full constructor instead? would also fix the next problem DataFacet copy = new DataFacet(); + // FIXME: usage of internal knowledge of parent class... + // Either the set method should be correctly overwritten, or implement a correct copy-constructor! copy.set(this); copy.type = type; copy.hash = hash; copy.stateId = stateId; return copy; } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : +} \ No newline at end of file diff -r 8f6d6d26e96f -r 8c64617a7991 artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java Thu Jan 18 18:32:30 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java Thu Jan 18 18:33:52 2018 +0100 @@ -109,6 +109,7 @@ /** * Access the data (wkms) of an artifact, coded in mingle. */ + // FIXME: meanwhile used by several places outside this context; refactor into separate helper class to access waterlevels public WKms getWKms(String mingle, CallContext context, double from, double to) { log.debug("WDifferencesState.getWKms " + mingle); String[] def = mingle.split(";"); diff -r 8f6d6d26e96f -r 8c64617a7991 artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java Thu Jan 18 18:32:30 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java Thu Jan 18 18:33:52 2018 +0100 @@ -89,6 +89,9 @@ @Override public String getAxisLabel(DiagramGenerator generator) { if (yAxisLabel != null && !yAxisLabel.isEmpty()) { + // FIXME/UNINTENDED: yAxisLabel is probably a resolved message (side-effect of StyledXYSeries#putMetadata), + // and cannot be resolved again. + // An explicit (German) default label is therefore given here, probably the English version will also show German (CHECK) return generator.msg(yAxisLabel, I18N_AXIS_LABEL_DEFAULT); } return generator.msg( diff -r 8f6d6d26e96f -r 8c64617a7991 artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java --- a/artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java Thu Jan 18 18:32:30 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java Thu Jan 18 18:33:52 2018 +0100 @@ -137,6 +137,7 @@ @Override + // FIXME: bad! method with undocumented side-effects; given metadata will be changed inline public void putMetaData(Map metaData, Artifact artifact, CallContext context) { @@ -146,6 +147,7 @@ String unit = ""; if (river != null) { rivername = river.getName(); + // FIXME: this will always return the wst unit, regardless if the series is a water level or not! unit = river.getWstUnit().getName(); } if (metaData.containsKey("X")) { diff -r 8f6d6d26e96f -r 8c64617a7991 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java Thu Jan 18 18:32:30 2018 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java Thu Jan 18 18:33:52 2018 +0100 @@ -199,6 +199,9 @@ this.parameterList = new ParameterList( flys, this, + // FIXME: literally every information about the artifact is transported from the server side + // but... the international name is resolved client-side.... Instead also transport the description of the artifact and use it! + // FIXME: the same holds for a very few other international strings (e.g. names of facets used in Tabs) messages.getString(artifact.getName()), artifact); } diff -r 8f6d6d26e96f -r 8c64617a7991 gwt-client/src/main/java/org/dive4elements/river/client/server/auth/UserClient.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/UserClient.java Thu Jan 18 18:32:30 2018 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/UserClient.java Thu Jan 18 18:33:52 2018 +0100 @@ -84,6 +84,8 @@ account.setAttribute("name", user.getAccount()); //TODO create roles + // FIXME: not creating the roles will write an broken xmldocument (only header) into the artifacts db + // which in turn will result in an exception (which is handled) artuser.appendChild(account); action.appendChild(type); action.appendChild(artuser); diff -r 8f6d6d26e96f -r 8c64617a7991 gwt-client/src/main/webapp/WEB-INF/web.xml --- a/gwt-client/src/main/webapp/WEB-INF/web.xml Thu Jan 18 18:32:30 2018 +0100 +++ b/gwt-client/src/main/webapp/WEB-INF/web.xml Thu Jan 18 18:33:52 2018 +0100 @@ -85,6 +85,8 @@ /flys/user + + server-info org.dive4elements.river.client.server.ServerInfoServiceImpl