Commit 5fce0377 authored by azara's avatar azara
Browse files

update Rss flux

-clean code
-update header
parent cf84bf36
/**
* Copyright (C) 2011-2013 BonitaSoft S.A.
* Copyright (C) 2011-2015 BonitaSoft S.A.
* BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -136,41 +136,52 @@ public class UpdateRSSContribution implements IPreStartupContribution {
*/
@Override
public void execute() {
final Version version = new Version(ProductVersion.CURRENT_VERSION);
final String majorVersion = version.getMajor() + "." + version.getMinor();
final String minorVersion = Integer.toString(version.getMicro());
new UpdateRSSThread(
"7-0-community",
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=163&bos_redirect_product=bos&bos_redirect_major_version=" + majorVersion
+ "&bos_redirect_minor_version=" + minorVersion,
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=163&bos_redirect_product=bos&bos_redirect_major_version=" + getMajorVersion()
+ "&bos_redirect_minor_version=" + getMinorVersion(),
getClass()).start();
new UpdateRSSThread(
"7-0-blogs",
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=152&bos_redirect_product=bos&bos_redirect_major_version=" + majorVersion
+ "&bos_redirect_minor_version=" + minorVersion,
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=152&bos_redirect_product=bos&bos_redirect_major_version=" + getMajorVersion()
+ "&bos_redirect_minor_version=" + getMinorVersion(),
getClass()).start();
new UpdateRSSThread(
"7-0-documentation",
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=158&bos_redirect_product=bos&bos_redirect_major_version=" + majorVersion
+ "&bos_redirect_minor_version=" + minorVersion,
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=158&bos_redirect_product=bos&bos_redirect_major_version=" + getMajorVersion()
+ "&bos_redirect_minor_version=" + getMinorVersion(),
getClass()).start();
new UpdateRSSThread(
"7-0-examples-community",
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=159&bos_redirect_product=bos&bos_redirect_major_version=" + majorVersion
+ "&bos_redirect_minor_version=" + minorVersion,
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=159&bos_redirect_product=bos&bos_redirect_major_version=" + getMajorVersion()
+ "&bos_redirect_minor_version=" + getMinorVersion(),
getClass()).start();
new UpdateRSSThread(
"7-0-training",
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=153&bos_redirect_product=bos&bos_redirect_major_version=" + majorVersion
+ "&bos_redirect_minor_version=" + minorVersion,
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=153&bos_redirect_product=bos&bos_redirect_major_version=" + getMajorVersion()
+ "&bos_redirect_minor_version=" + getMinorVersion(),
getClass()).start();
new UpdateRSSThread(
"7-0-videos-community",
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=154&bos_redirect_product=bos&bos_redirect_major_version=" + majorVersion
+ "&bos_redirect_minor_version=" + minorVersion,
"http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=154&bos_redirect_product=bos&bos_redirect_major_version=" + getMajorVersion()
+ "&bos_redirect_minor_version=" + getMinorVersion(),
getClass()).start();
}
protected Version getProductVersion() {
return new Version(ProductVersion.CURRENT_VERSION);
}
protected String getMajorVersion() {
final Version version = getProductVersion();
return version.getMajor() + "." + version.getMinor();
}
protected String getMinorVersion() {
final Version version = getProductVersion();
return Integer.toString(version.getMicro());
}
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.application.contribution.IPreStartupContribution#canExecute()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment