Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.29.0 #505

Merged
merged 160 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
07bc7e1
Add missing constants for options
arteymix Feb 2, 2021
d3685c2
Fix Intellij code style for XML
arteymix Feb 5, 2021
5c5e28b
Load CLI tools as beans
arteymix Feb 9, 2021
28588c5
Disable autostart of JMS container listener [WIP]
arteymix Feb 9, 2021
4ab0a80
Use an interface for CLI tools
arteymix Jun 21, 2021
6ae31ac
Use an AspectJ directive for scanning components for gemma-web
arteymix Jun 21, 2021
9b91e86
WIP
arteymix Jun 21, 2021
c90a6a7
Update version for next development
arteymix Aug 3, 2022
a9d5e96
Avoid calling a transactional removeForExperiment() to prevent roll-back
arteymix Aug 3, 2022
b858f6f
Move StaleStateException handling on the RESTful API
arteymix Aug 4, 2022
d61fb5b
Update issue number for StaleStateException in DatasetArg
arteymix Aug 4, 2022
028762a
Fix SampleCoexpressionAnalysisService.compute() by using a more strin…
arteymix Aug 4, 2022
691e5ca
Remove Eclipse's .classpath file from VCS
arteymix Aug 6, 2022
afff774
Ensure that ScrollableResults are always closed (fix #409)
arteymix Aug 15, 2022
6fd4483
begin deprecation of some features
ppavlidis Aug 29, 2022
740f871
Use maven-failsafe-plugin to handle integration tests
arteymix Feb 19, 2022
243e5b4
Merge pull request #305 from PavlidisLab/feature-use-failsafe-for-int…
arteymix Sep 1, 2022
fc30368
fix for #383
ppavlidis Sep 2, 2022
a327f7e
Update README.md
ppavlidis Sep 2, 2022
d4e3096
Update README.md
ppavlidis Sep 2, 2022
152917e
Cleanup GoldenPath
arteymix Sep 1, 2022
ef7b005
Add gemma-cli module and move CLI tools in it
arteymix Aug 10, 2022
4bfeb04
Annotate more tests with GeoTest, PubMedTest and SlowTest
arteymix Sep 6, 2022
9c384d8
Fix analysis result set endpoint test
arteymix Sep 6, 2022
573fbd5
Remove unused cliContext-component-scan.xml
arteymix Sep 11, 2022
f4cd824
Nicer rendering for BeanInitializationTimeMonitor warning
arteymix Sep 11, 2022
70f539f
Use JUnit assume for unpredictably failing tests (see #419)
arteymix Sep 11, 2022
f07baf0
Merge branch 'release-1.28.0' into development
arteymix Oct 7, 2022
32a7f7b
Update for next development version
arteymix Oct 7, 2022
67fa98d
Merge branch 'feature-cli-tools-as-beans' into development (fix #323)
arteymix Oct 8, 2022
6e15ab7
Add a basic test for ArrayDesignMergeCli using DI
arteymix Oct 8, 2022
f43a3eb
Include apps from ubic.gemma.core.loader
arteymix Oct 9, 2022
7ed0a41
Don't use hbm2ddl by default, but enable it in production and on the CI
arteymix Oct 9, 2022
d4eadb3
Annotate all packages under ubic.gemma.persistence with non-null APIs
arteymix Oct 10, 2022
4b2c222
Remove HibernateDaoSupport and HibernateTemplate usages
arteymix Apr 20, 2022
4e5ff81
Merge branch 'feature-remove-hibernate-dao-support' into development
arteymix Oct 10, 2022
852c217
Ignore tests that require GoldenPath database when it's unavailable
arteymix Oct 10, 2022
ba5e941
Merge Gene2GoAssociationImpl and Gene2GoAssociation into a single con…
arteymix Oct 10, 2022
35e6359
Add -v and --version arguments to GemmaCLI
arteymix Oct 12, 2022
93606dd
Remove -u and -p CLI arguments for passing username and password (fix…
arteymix Oct 12, 2022
4c81a83
Make Gemma CLI work with Java 9+
arteymix Oct 12, 2022
9c1f52d
Fix incorrect setParameter() usage in AuditEventDaoImpl.
arteymix Oct 12, 2022
6b7603d
Update to hotfix version
arteymix Oct 13, 2022
39c5753
Merge branch 'hotfix-1.28.1' into development
arteymix Oct 13, 2022
239640a
Update version for next development
arteymix Aug 3, 2022
ad5c8b8
Ignore soft-locked cache entry only in tests
arteymix Oct 13, 2022
9950160
Fix Maven Surefire report encoding
arteymix Oct 13, 2022
cecec9a
Merge branch 'hotfix-1.28.2' into development
arteymix Oct 19, 2022
adac9c8
Update version for development
arteymix Oct 19, 2022
2b9ac0e
Fix hashing bug for ExpressionExperimentValueObject with ACLs
arteymix Oct 26, 2022
da717e6
Update to hotfix version
arteymix Oct 26, 2022
20d0d26
Merge branch 'hotfix-1.28.3' into development
arteymix Oct 26, 2022
3f0d56f
Update version for next development
arteymix Oct 26, 2022
df5efbc
Redirect output of maven-failsafe-plugin to file and remove unneeded …
arteymix Oct 27, 2022
c56a59d
Add mappings to hibernate.cfg.xml to get IDE insights
arteymix Oct 26, 2022
c8528d4
Fix incorrect reference to QuantitationType in loadByDescription
arteymix Oct 26, 2022
e90f19e
Store dialect for schema-export in hibernate.properties
arteymix Oct 26, 2022
1a2d0a4
Fix vulnerable dom4j imported from Hibernate
arteymix Oct 26, 2022
8b29806
Fix constructor type for AbstractCuratableValueObject
arteymix Oct 27, 2022
e23a6bd
Add missing fields in ArrayDesignValueObject copy constructor
arteymix Oct 27, 2022
987847b
Replace all usages of deprecated ArrayDesignValueObject.getExpression…
arteymix Oct 27, 2022
7092d28
Update pavlab-starter-parent to 1.1.9
arteymix Oct 31, 2022
ae03596
Don't report bean initialization time redundantly when the context is…
arteymix Nov 1, 2022
6aaf499
Reuse mappings from hibernate.cfg.xml in Spring configuration
arteymix Nov 1, 2022
c56d5e8
Make findOneByProperty check for uniqueness
arteymix Nov 1, 2022
3a9d8cc
Rename test suites and add integration/unit tests suites
arteymix Nov 2, 2022
7d91322
Remove defunct test for batch load
arteymix Nov 5, 2022
2f145cd
Wrap Hibernate lock reattach hack with a deprecated reattach()
arteymix Nov 7, 2022
82bb0ee
Remplace usages of EasyMock with Mockito and remove that dependency
arteymix Nov 7, 2022
764aab6
Update Jackson and Swagger dependencies
arteymix Nov 7, 2022
f25d123
Update gsec to 0.0.9
arteymix Nov 7, 2022
c25d25c
Update to hotfix version
arteymix Nov 7, 2022
17a68a4
Merge branch 'hotfix-1.28.4' into development
arteymix Nov 7, 2022
18766be
Fix all usages of AbstractDao
arteymix Nov 8, 2022
b56e798
Add basic tracing to AbstractDao
arteymix Nov 8, 2022
8f17418
Remove extreaneous debug logging in AbstractDao subclasses
arteymix Nov 8, 2022
374f6f6
Add missing mock reset in SearchServiceTest
arteymix Nov 9, 2022
65e1705
Ignore test suites in maven-surefire-plugin configuration
arteymix Nov 9, 2022
2571ce5
Undeprecate BaseDao.update(), that was unintentional
arteymix Nov 9, 2022
aa5cd08
Split CurationDetailsService in interface/implementation
arteymix Nov 9, 2022
2fb2d4f
Fix incorrect type checks for AuditEventtype in CurationDetailsService
arteymix Nov 9, 2022
a42145c
Make CurationDetailsService.update() transactional
arteymix Nov 9, 2022
c3416ad
Make batchSize final in AbstractDao
arteymix Nov 9, 2022
32bed9d
Add a trace log when an empty collection is passed to AbstractDao.load()
arteymix Nov 9, 2022
c05faf3
Fix NPE in SplitExperimentTest when split() fails
arteymix Nov 12, 2022
aba3805
Use persist() instead of save()
arteymix Nov 11, 2022
de9fa4d
Cleanups for Persister
arteymix Nov 9, 2022
e0abb37
Fix detached curation details when persisting EE splits
arteymix Nov 12, 2022
a76f0b9
Only perform batch operations with AUTO or ALWAYS flush modes
arteymix Nov 13, 2022
a3f9811
Restore check for batchSize >= 1
arteymix Nov 13, 2022
e1f48b2
Ensure that the element class matches what is being mapped by Hibernate
arteymix Nov 14, 2022
663d5a0
Update dependency-check-maven plugin to 7.3.0
arteymix Nov 15, 2022
54cde50
Update codestyle for XML
arteymix Nov 1, 2022
904c54d
Use gsec 0.0.10-SNAPSHOT
arteymix Nov 18, 2022
3051776
Last cleanup for AbstractDao batch size constructor argument
arteymix Nov 17, 2022
0cec018
Don't use fetch select with lazy proxy
arteymix Nov 2, 2022
4a8b682
Cleanup pointcuts
arteymix Nov 18, 2022
3c517da
Update aspectjweaver to 1.9.9.1
arteymix Nov 2, 2022
6829604
Improve retry policy
arteymix Nov 3, 2022
2d02776
Add save() to BaseDao and BaseService
arteymix Nov 18, 2022
e63ec3d
cli: Check if System.console() is available and if prior auth exists
arteymix Nov 14, 2022
f1a5703
Remove unnecessary reload when deleting EE
arteymix Nov 18, 2022
5b8c79d
Update to hotfix version
arteymix Nov 25, 2022
12e94ab
Merge branch 'hotfix-1.28.5' into development
arteymix Nov 25, 2022
e19929d
Remove usage of gsec's JsonUtil and cleanup login and signup controllers
arteymix Nov 23, 2022
850c683
Update version for development
arteymix Nov 25, 2022
2901162
Make ExternalDatabase auditable and versioned
arteymix Oct 31, 2022
ee3c0fc
Add missing fields in ExternalDatabase Hibernate model
arteymix Oct 31, 2022
f39c5fc
Update init-entities.sql to include an audit trail to ED fixtures
arteymix Nov 1, 2022
ed1c1fa
rest: Add root endpoint to expose select few external databases
arteymix Nov 1, 2022
a0889f8
Make ArrayDesignValueObject versionable
arteymix Nov 1, 2022
87ac023
Use before advise for automating audit trail CRUD events
arteymix Nov 2, 2022
e133db2
Add a CLI to update external database version infos
arteymix Nov 12, 2022
7131cd0
Update external database entry for the gene2cs table update
arteymix Nov 20, 2022
d0b6287
Add more tests for Pointcuts
arteymix Nov 21, 2022
7e3e66d
Use spaces by default for indenting XML
arteymix Nov 21, 2022
116fd61
Fixups
arteymix Nov 21, 2022
057f89b
Update maven-dependency-plugin
arteymix Nov 23, 2022
cd9f4f0
Add a children databases to ExternalDatabase
arteymix Nov 25, 2022
064aa8b
Only use ReleaseDetailsUpdateEvent for both last updated and release …
arteymix Nov 25, 2022
9a39cb4
Add a configuration property for featured external databases
arteymix Nov 25, 2022
ad401c9
Cascade through the whole object structure when auditing
arteymix Nov 27, 2022
6dc3673
Remove @Ignore on GeneSetValueObjectHelperTest (fix #459)
arteymix Nov 28, 2022
41ca883
Add mention to GitHub issue for making audit trail non-null
arteymix Nov 28, 2022
62e0422
Fix duplicated ID and PVALUE aliases in DifferentialExpressionResultD…
arteymix Nov 28, 2022
81772e2
Remove implicit compass-fork dependency in Gemma CLI
arteymix Nov 28, 2022
f9c969f
Update to Hibernate 4
arteymix Oct 10, 2022
e1307f1
Restore 'validate' by default
arteymix Oct 12, 2022
ff800bf
Update link to docs for Hibernate properties
arteymix Nov 28, 2022
84b1303
Update pavlab-starter-parent to 1.2.4
arteymix Nov 28, 2022
659c914
Add missing @Nullable annotations for Sort
arteymix Nov 28, 2022
3bd708c
Make maxResults in SearchSettings a simple integer and honor it
arteymix Nov 29, 2022
07b9d8d
Avoid calling public methods from within in SearchServiceImpl
arteymix Nov 29, 2022
e15d584
Indicate that maxResults apply per-type
arteymix Nov 29, 2022
85f711b
Add support for auditing save() from BaseDao
arteymix Nov 29, 2022
27f8e03
Replace deprecated usage of createAlias() with Criteria.LEFT_JOIN
arteymix Nov 29, 2022
43e1e6c
Various fixes for ubic.gemma.persistence relating to null handling
arteymix Nov 29, 2022
9630181
Fix wording in About page and add links for related databases
arteymix Nov 29, 2022
f5e05e4
rest: Bump version to 2.6.0 for upcoming 1.29 release
arteymix Nov 29, 2022
10b3295
Fix date rounding issue in GeneMultifunctionalityPopulationServiceTest
arteymix Nov 29, 2022
031f0b2
Use Spring Cache wherever possible (fix #429)
arteymix Nov 30, 2022
b3a9c35
Reuse the same cache manager for Hibernate and for general purpose
arteymix Nov 30, 2022
7ab8175
Update compass-fork to 1.2.0
arteymix Nov 30, 2022
89a6650
Update gsec to 0.0.10
arteymix Nov 30, 2022
8fd2d0d
Fix Hibernate javadocs URL
arteymix Nov 30, 2022
161ccd1
Update versions for release
arteymix Nov 30, 2022
c4873a0
Remove caching audit events, types, trails, etc.
arteymix Nov 30, 2022
09f34da
Fix incorrectly passed null taxon ID in ExpressionExperimentController
arteymix Dec 2, 2022
8be5d33
Make Ehcache optional in CacheMonitor implementation
arteymix Dec 2, 2022
edc9d99
Remove unused Space status section in system monitoring
arteymix Dec 2, 2022
0b21f9e
Consistently use int for offset/limit
arteymix Dec 2, 2022
6b1466d
Fix missing caches in SearchService integration tests
arteymix Dec 2, 2022
e66d0ab
Fix location of gsec SQL resources
arteymix Dec 2, 2022
e0a75ee
Add missing precision to DATETIME columns
arteymix Dec 3, 2022
d2b9dc8
Use spaces by default for XML indenting
arteymix Dec 5, 2022
06970d0
Fix remaining reference to org.hibernate.classic
arteymix Dec 3, 2022
b93b7ec
Fix all Javadoc errors/warnings and re-enable doc linting
arteymix Dec 4, 2022
2d6c73b
Fix an invalid field in @EqualdAndHashCode and a missing callSuper
arteymix Dec 5, 2022
2b63a5b
Fix two invalid @deprecated annotations
arteymix Dec 5, 2022
52bb5e2
Add missing javadoc in package-info.java
arteymix Dec 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Gemma code repository

If you are looking for the public instance of Gemma, you can either access it through the
[Gemma Website](https://gemma.msl.ubc.ca/), or check out our [RESTful API](https://gemma.msl.ubc.ca/resources/restapidocs/).
This repository is for the Gemma software system.

If you are looking to access the genomics data in Gemma, please see the
[Gemma Website](https://gemma.msl.ubc.ca/), the Bioconductor package [Gemma.R](https://doi.org/doi:10.18129/B9.bioc.gemma.R), or our [RESTful API](https://gemma.msl.ubc.ca/resources/restapidocs/).

Please see the end-user documentation at our [GitHub Pages](https://pavlidislab.github.io/Gemma/) for more information
on how to use Gemma and related tools, and to credits and contact information.
Expand Down
81 changes: 81 additions & 0 deletions gemma-cli/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>gemma</artifactId>
<groupId>gemma</groupId>
<version>1.29.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gemma-cli</artifactId>
<name>Gemma CLI</name>
<description>Module containing the Gemma CLI.</description>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>2.1.0</version>
<configuration>
<repositoryName>lib</repositoryName>
<repositoryLayout>flat</repositoryLayout>
<copyConfigurationDirectory>true</copyConfigurationDirectory>
<platforms>
<platform>unix</platform>
</platforms>
<programs>
<program>
<id>gemma-cli</id>
<mainClass>ubic.gemma.core.apps.GemmaCLI</mainClass>
</program>
</programs>
<!-- this allows Log4j 2 to lookup for Log4j 1.2 configuration -->
<extraJvmArguments>-Dlog4j1.compatibility=true -Djava.awt.headless=true</extraJvmArguments>
<!-- Gemma CLI extensions can be dropped in that folder -->
<endorsedDir>contrib</endorsedDir>
</configuration>
<executions>
<execution>
<id>make-appassembly</id>
<phase>package</phase>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<descriptors>
<descriptor>src/assembly/appassembler.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>gemma</groupId>
<artifactId>gemma-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gemma</groupId>
<artifactId>gemma-core</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
</dependencies>
</project>
5 changes: 5 additions & 0 deletions gemma-cli/src/main/java/ubic/gemma/contrib/apps/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Gemma Contrib Apps

This package can be used by other Java packages to include CLIs.

Standard applications reside in `ubic.pavlab.gemma.core.apps`.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ protected boolean requireLogin() {
* See 'configure' for how the other options are handled. (non-Javadoc)
*
* @see AbstractCLI#processOptions(CommandLine)
* @param commandLine
*/
@Override
protected void processOptions( CommandLine commandLine ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ protected void doWork() throws Exception {
}

/**
* @param taxon
* @return
*/
private String[] chooseBLASTdbs( Taxon taxon ) {
String[] databases = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,6 @@ public String getShortDesc() {
/**
* Test whether two sequences are effectively equal (ignore the ID)
*
* @param one
* @param that
* @return
*/
private boolean equals( BioSequence one, BioSequence that ) {

Expand All @@ -241,7 +238,6 @@ private boolean equals( BioSequence one, BioSequence that ) {
}

/**
* @param bioSequences
*/
private void processSequences( Collection<BioSequence> bioSequences ) {
// ///////////////////////////////
Expand Down Expand Up @@ -324,8 +320,6 @@ private void processSequences( Collection<BioSequence> bioSequences ) {
}

/**
* @param keeper
* @param toRemove
*/
private void switchAndDeleteExtra( BioSequence keeper, BioSequence toRemove ) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,7 @@ private void proactivelyBlacklistExperiments( ExternalDatabase geo ) throws Exce
}

/**
* @param geo
* @param gbs
* @param blacklistedEntityDao
* @param candidates
* @return number of actually blacklisted experiments in this batch.
* @throws InterruptedException
*/
private int fetchAndBlacklist( ExternalDatabase geo, GeoBrowser gbs, BlacklistedEntityService blacklistedEntityDao, Collection<String> candidates )
throws InterruptedException {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
package ubic.gemma.core.apps;

import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import ubic.gemma.core.util.AbstractCLI;
import ubic.gemma.core.util.AbstractSpringAwareCLI;
import ubic.gemma.model.common.description.ExternalDatabase;
import ubic.gemma.persistence.service.common.description.ExternalDatabaseService;

import java.net.URL;
import java.util.Date;

import static java.util.Objects.requireNonNull;

@Component
public class ExternalDatabaseUpdaterCli extends AbstractSpringAwareCLI {

private static final String NAME_OPTION = "n",
DESCRIPTION_OPTION = "d",
RELEASE_OPTION = "release",
RELEASE_NOTE_OPTION = "releaseNote",
RELEASE_VERSION_OPTION = "releaseVersion",
RELEASE_URL_OPTION = "releaseUrl",
LAST_UPDATED_OPTION = "lastUpdated";

@Autowired
private ExternalDatabaseService externalDatabaseService;

private String name;
private String description;
private boolean release;
private String releaseNote;
private String releaseVersion;
private URL releaseUrl;
private Date lastUpdated;

@Override
public String getCommandName() {
return "updateExternalDatabase";
}

@Override
public GemmaCLI.CommandGroup getCommandGroup() {
return GemmaCLI.CommandGroup.SYSTEM;
}

@Override
protected boolean requireLogin() {
return true;
}

@Override
protected void buildOptions( Options options ) {
options.addOption( Option.builder( NAME_OPTION )
.longOpt( "name" )
.hasArg()
.optionalArg( false )
.desc( "External database name" ).build() );
options.addOption( DESCRIPTION_OPTION, "description", true, "New description" );
options.addOption( RELEASE_OPTION, "release", false, "Update the release (only affects last modified moment))" );
options.addOption( RELEASE_VERSION_OPTION, "release-version", true, "Release version" );
options.addOption( Option.builder( RELEASE_URL_OPTION )
.longOpt( "release-url" )
.hasArg()
.desc( "Release URL (optional)" )
.type( URL.class ).build() );
options.addOption( RELEASE_NOTE_OPTION, "release-note", true, "Note to include in the audit event related to the new release" );
options.addOption( Option.builder( LAST_UPDATED_OPTION )
.longOpt( "last-updated" )
.hasArg()
.desc( "Moment the release was performed if known, otherwise the current time will be used." )
.type( Date.class ).build() );
}

@Override
protected void processOptions( CommandLine commandLine ) throws Exception {
name = commandLine.getOptionValue( NAME_OPTION );
description = commandLine.getOptionValue( DESCRIPTION_OPTION );
release = commandLine.hasOption( RELEASE_OPTION );
releaseNote = commandLine.getOptionValue( RELEASE_NOTE_OPTION );
releaseVersion = commandLine.getOptionValue( RELEASE_VERSION_OPTION );
releaseUrl = ( URL ) commandLine.getParsedOptionValue( RELEASE_URL_OPTION );
lastUpdated = ( Date ) commandLine.getParsedOptionValue( LAST_UPDATED_OPTION );
if ( lastUpdated == null ) {
lastUpdated = new Date();
}
}

@Override
protected void doWork() throws Exception {
ExternalDatabase ed = requireNonNull( externalDatabaseService.findByNameWithAuditTrail( name ),
String.format( "No database with name %s.", name ) );
if ( description != null ) {
ed.setDescription( description );
}
if ( release || releaseVersion != null ) {
if ( releaseVersion != null ) {
AbstractCLI.log.info( String.format( "Updating %s release version to %s.", name, releaseVersion ) );
externalDatabaseService.updateReleaseDetails( ed, releaseVersion, releaseUrl, releaseNote, lastUpdated );
} else {
AbstractCLI.log.info( String.format( "Updating %s last updated moment to %s.", name, lastUpdated ) );
externalDatabaseService.updateReleaseLastUpdated( ed, releaseNote, lastUpdated );
}
} else {
AbstractCLI.log.info( String.format( "Updating %s. Use the --release flag to update last updated or release infos.", name ) );
externalDatabaseService.update( ed ); /* only update description, etc. */
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public String getShortDesc() {

/**
* This method is called at the end of processCommandLine
* @param commandLine
*/
@Override
protected void processOptions( CommandLine commandLine ) {
Expand Down
Loading