Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mpostelnicu committed Aug 8, 2016
2 parents 76437ce + 7ed38a7 commit ca9299c
Show file tree
Hide file tree
Showing 169 changed files with 2,141 additions and 2,153 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ cache:
- ui/node
env:
global:
- MAVEN_OPTS="-XX:MaxPermSize=2g -Xmx4g"
- JAVA_OPTS="-XX:MaxPermSize=2g -Xmx4g"
script: mvn test -B --quiet
- MAVEN_OPTS="-XX:MaxMetaspaceSize=256m -Xmx4g"
- JAVA_OPTS="-XX:MaxMetaspaceSize=256m -Xmx4g"
install: mvn install -T 64C -Dskip.frontend.build=true -DskipTests=true -Dmaven.javadoc.skip=true -B -V
script: mvn test -T 64C -Dskip.frontend.build=true -B --quiet
jdk:
- oraclejdk8
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@

## Presentation

OCVN is a project that allows importing the Vietnam public procurement data, available in the common MS Excel format, into a native [Open Contracting Data Standard (OCDS)](http://standard.open-contracting.org/) NoSQL storage, and then run visual data analytics (display a *live* dashboard with charts, maps and data tables as well as custom comparison charts). Since the data is natively stored in the OCDS format, it can be readily exported in this format without any transformation required, and with great throughput.
OCE is a project that allows importing the Vietnam public procurement data, available in the common MS Excel format, into a native [Open Contracting Data Standard (OCDS)](http://standard.open-contracting.org/) NoSQL storage, and then run visual data analytics (display a *live* dashboard with charts, maps and data tables as well as custom comparison charts). Since the data is natively stored in the OCDS format, it can be readily exported in this format without any transformation required, and with great throughput.

Find out more about the OCVN goals [here](http://www.developmentgateway.org/2015/11/12/open-contracting-vietnam/).
## Visual Identity
SVG and raster version of the logo and favicon can be found in the [`docs/images`](./docs/images/) directory.

### Logo:
![DT Toolkit logo](./docs/images/raster/toolkit-logo-0256.png)

### Favicon:
![DT Toolkit favicon](./docs/images/raster/toolkit-favicon-0032.png)

# Modules

The project uses open source technologies exclusively, with the following list of key components:

Expand Down
11 changes: 11 additions & 0 deletions checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">

<suppressions>

<suppress checks="HideUtilityClassConstructor|FinalClass"
files="PersistenceApplication\.java|MongoPersistenceApplication\.java|UIWebApplication\.java|WebApplication\.java|ReportingApplication\.java" />

</suppressions>
6 changes: 2 additions & 4 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
<module name="TypeName"/>
<module name="AvoidStarImport"/>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="RedundantImport"/>
<module name="LineLength">
<property name="max" value="120"/>
</module>
Expand Down Expand Up @@ -108,8 +107,7 @@
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="Translation"/>
<module name="FileLength"/>
<module name="Translation"/>
<module name="FileTabCharacter">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
Expand Down
29 changes: 29 additions & 0 deletions docs/identity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

# Identity
The DG Toolkit logo is based on this image form Wikimedia Commons:
> Wikimedia Commons is an online repository of free-use images, sound, and other media files. It is a project of the Wikimedia Foundation.
> https://commons.wikimedia.org/wiki/File:Leaf_Simple_Green_L.svg
## Logo
![DT Toolkit logo](./images/raster/toolkit-logo-0256.png)


## Favicon
![DT Toolkit favicon](./images/raster/toolkit-favicon-0032.png)


## Favicon files
Favicon specific were generated using http://realfavicongenerator.net/

Insert the following code in the <head> section of your pages:
```
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#4996f1">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
```
And serve the content of the `images/favicons` directory from the root of your website.
Binary file added docs/images/favicons/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicons/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/images/favicons/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#ffffff</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added docs/images/favicons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicons/favicon.ico
Binary file not shown.
17 changes: 17 additions & 0 deletions docs/images/favicons/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "DG Toolkit",
"icons": [
{
"src": "\/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image\/png"
},
{
"src": "\/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image\/png"
}
],
"theme_color": "#ffffff",
"display": "standalone"
}
Binary file added docs/images/favicons/mstile-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicons/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicons/mstile-310x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicons/mstile-310x310.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicons/mstile-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions docs/images/favicons/safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raster/toolkit-favicon-0016.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raster/toolkit-favicon-0032.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raster/toolkit-favicon-0048.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raster/toolkit-favicon-0064.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raster/toolkit-logo-0048.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raster/toolkit-logo-0064.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raster/toolkit-logo-0128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raster/toolkit-logo-0256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raster/toolkit-logo-0512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raster/toolkit-logo-1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raster/toolkit-logo-2048.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/images/toolkit-favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/images/toolkit-logo-leaf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/images/toolkit-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private WebConstants() {
public static final String PARAM_REVISION_ID = "revisionId";
public static final String PARAM_ENTITY_CLASS = "class";

public final static String LANGUAGE_PARAM = "lang";
public static final String LANGUAGE_PARAM = "lang";

public static final class StringValidators {
public static final StringValidator MAXIMUM_LENGTH_VALIDATOR_ONE_LINE_TEXT = StringValidator
Expand All @@ -46,6 +46,6 @@ public static final class StringValidators {
// add more languages here. It is pointless to make this dynamic because the
// wicket i18n is in .properties files so we need
// to change the src code anyway.
public static final List<Locale> availableLocales = Collections.unmodifiableList(Arrays.asList(new Locale("en")));
public static final List<Locale> AVAILABLE_LOCALES = Collections.unmodifiableList(Arrays.asList(new Locale("en")));

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,6 @@ public void setTemplateMessage(final SimpleMailMessage templateMessage) {
this.templateMessage = templateMessage;
}

/**
* Send a validation email to the user
* @param person
* @param urlEnable URL with a key, to validate the user email
*/
public void sendEmailToEnable(final Person person, final String urlEnable) {

SimpleMailMessage msg = new SimpleMailMessage();
msg.setTo(person.getEmail());
msg.setFrom("[email protected]");
msg.setSubject("Activate your account");
msg.setText("Dear " + person.getFirstName() + " " + person.getLastName() + ",\n\n"
+ "To re-enable your account, please use the following link:\n\n"
+ urlEnable + person.getSecret() + "\n\n"
+ "The system will then prompt you to log in with your current password."
+ " If you don't know your current password, please use the 'Forgot your password?' button."
+ " Note that the email address you enter must match the address connected to your account.\n\n"
+ "Thank you,\n"
+ "DG Team");
try {
javaMailSenderImpl.send(msg);
} catch (MailException e) {
e.printStackTrace();
}

}

/**
* Send a reset password email. This is UNSAFE because passwords are sent in clear text.
* Nevertheless some customers will ask for these emails to be sent, so ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public void getReportsStat() {
// get the reports cache "reportsCache", declared in ehcache.xml
Cache cache = cm.getCache("reportsCache");

List<String> cacheKeys = cache.getKeys();
@SuppressWarnings("unchecked")
List<String> cacheKeys = cache.getKeys();
long size = 0;
for (String k : cacheKeys) {
logger.info("key: " + k);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
import de.agilecoders.wicket.core.markup.html.bootstrap.button.ButtonGroup;
import de.agilecoders.wicket.core.util.Attributes;
import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstrapcheckbox.BootstrapCheckBoxPicker;
import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstrapcheckbox.BootstrapCheckBoxPickerConfig;
import de.agilecoders.wicket.extensions.markup.html.bootstrap.
form.checkbox.bootstrapcheckbox.BootstrapCheckBoxPickerConfig;
import de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesomeIconType;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public FileInputBootstrapFormComponentWrapper<T> maxFiles(final int maxFiles) {
return this;
}

@SuppressWarnings("unchecked")
@Override
protected void onInitialize() {
super.onInitialize();
Expand Down Expand Up @@ -216,6 +217,7 @@ public String getContentType() {
IndicatingAjaxLink<Void> delete = new IndicatingAjaxLink<Void>("delete") {
private static final long serialVersionUID = 1L;

@SuppressWarnings("unchecked")
@Override
public void onClick(final AjaxRequestTarget target) {
filesModel.remove(item.getModelObject());
Expand Down Expand Up @@ -322,6 +324,7 @@ protected void populateItem(final ListItem<FileMetadata> item) {
IndicatingAjaxLink<Void> delete = new IndicatingAjaxLink<Void>("delete") {
private static final long serialVersionUID = 1L;

@SuppressWarnings("unchecked")
@Override
public void onClick(final AjaxRequestTarget target) {
filesModel.remove(item.getModelObject());
Expand Down Expand Up @@ -383,6 +386,7 @@ private void addBootstrapFileInputComponent() {
bootstrapFileInput = new BootstrapFileInput("bootstrapFileInput", internalUploadModel, fileInputConfig) {
private static final long serialVersionUID = 1L;

@SuppressWarnings("unchecked")
@Override
protected void onSubmit(final AjaxRequestTarget target) {
super.onSubmit(target);
Expand Down Expand Up @@ -453,6 +457,7 @@ public void onEvent(final IEvent<?> event) {
ComponentUtil.enableDisableEvent(this, event);
}

@SuppressWarnings("unchecked")
@Override
public void convertInput() {
final Collection<FileMetadata> modelObject = filesModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
*/
public class JpaFilterState<T> implements Serializable {

public Specification<T> getSpecification() {
private static final long serialVersionUID = 2241550275925712593L;

public Specification<T> getSpecification() {
return (root, query, cb) -> cb.and();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
*/
public class ResettingFilterForm<T> extends FilterForm<T> {

private DataTable<?, ?> dataTable;
private static final long serialVersionUID = 7877429240496220944L;
private DataTable<?, ?> dataTable;

public ResettingFilterForm(String id, IFilterStateLocator<T> locator, DataTable<?, ?> dataTable) {
public ResettingFilterForm(final String id, final IFilterStateLocator<T> locator, final DataTable<?, ?> dataTable) {
super(id, locator);
this.dataTable = dataTable;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
*/
public class TestFormFilterState extends JpaFilterState<TestForm> {

private String textField;
private static final long serialVersionUID = 8005371716983257722L;
private String textField;

@Override
public Specification<TestForm> getSpecification() {
Expand All @@ -31,7 +32,7 @@ public String getTextField() {
return textField;
}

public void setTextField(String textField) {
public void setTextField(final String textField) {
this.textField = textField;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
*/
public class TextFilteredBootstrapPropertyColumn<T, F, S> extends TextFilteredPropertyColumn<T, F, S> {

public TextFilteredBootstrapPropertyColumn(IModel<String> displayModel, S sortProperty, String propertyExpression) {
private static final long serialVersionUID = 7360465890668796668L;

public TextFilteredBootstrapPropertyColumn(final IModel<String> displayModel,
final S sortProperty, final String propertyExpression) {
super(displayModel, sortProperty, propertyExpression);
}

public TextFilteredBootstrapPropertyColumn(IModel<String> displayModel, String propertyExpression) {
public TextFilteredBootstrapPropertyColumn(final IModel<String> displayModel, final String propertyExpression) {
super(displayModel, propertyExpression);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@
*/
public class TextFilteredIntegerBootstrapPropertyColumn<T, F, S> extends TextFilteredPropertyColumn<T, F, S> {

public TextFilteredIntegerBootstrapPropertyColumn(IModel<String> displayModel, S sortProperty, String propertyExpression) {
super(displayModel, sortProperty, propertyExpression);
}
private static final long serialVersionUID = 3974619896912467712L;

public TextFilteredIntegerBootstrapPropertyColumn(IModel<String> displayModel, String propertyExpression) {
super(displayModel, propertyExpression);
}
public TextFilteredIntegerBootstrapPropertyColumn(final IModel<String> displayModel, final S sortProperty,
final String propertyExpression) {
super(displayModel, sortProperty, propertyExpression);
}

public TextFilteredIntegerBootstrapPropertyColumn(final IModel<String> displayModel,
final String propertyExpression) {
super(displayModel, propertyExpression);
}

@Override
public Component getFilter(final String componentId, final FilterForm<?> form) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,13 @@
<header wicket:id="mainHeader" class="mainHeader"></header>

<div wicket:id="mainContainer" class="mainContainer">
<!-- TODO: Remove! -->
<div class="row">
<div class="col-xs-12 col-md-8 col-md-offset-2 text-center">
<h1 class="pageTitle" wicket:id="pageTitle"></h1>
</div>
</div>
<h1 class="pageTitle text-center" wicket:id="pageTitle">[PAGE-TITLE]</h1>

<!-- TODO: Add "row" class here!?! -->
<div>
<wicket:child/>
</div>
<wicket:child/>

<!-- TODO: Remove! -->
<div class="row">
<div class="col-xs-12 col-md-8 col-md-offset-2">
<span wicket:id="feedback" class="feedbackPanel"></span>
<div wicket:id="feedback" class="feedbackPanel"></div>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit ca9299c

Please sign in to comment.