Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<parent>
<groupId>org.carlspring.strongbox</groupId>
<artifactId>strongbox-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>strongbox-masterbuild</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Strongbox: Masterbuild</name>
Expand Down
11 changes: 3 additions & 8 deletions strongbox-aql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>org.carlspring.strongbox</groupId>
<artifactId>strongbox-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>strongbox-aql</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Strongbox: AQL</name>
Expand Down Expand Up @@ -84,6 +84,7 @@
<artifactId>groovy-all</artifactId>
<version>${version.groovy}</version>
<scope>runtime</scope>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -138,12 +139,6 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${version.groovy}</version>
</dependency>

<dependency>
<groupId>org.jtwig</groupId>
<artifactId>jtwig-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Paginator visitPageExp(PageExpContext ctx)
{
return paginator;
}
paginator.setSkip(Integer.valueOf(ctx.NUMBER().getText()));
paginator.setSkip(Long.valueOf(ctx.NUMBER().getText()));

return paginator;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import org.antlr.v4.runtime.Parser;
import org.carlspring.strongbox.aql.grammar.AQLParser.QueryContext;
import org.carlspring.strongbox.data.criteria.QueryParser;
import org.carlspring.strongbox.domain.ArtifactEntry;
import org.carlspring.strongbox.domain.ArtifactEntity;

/**
* @author sbespalov
*
*/
public class AqlQueryParser extends QueryParser<QueryContext, ArtifactEntry, AqlStatementVisitor>
public class AqlQueryParser extends QueryParser<QueryContext, ArtifactEntity, AqlStatementVisitor>
{

public AqlQueryParser(String query)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
import org.carlspring.strongbox.data.criteria.Paginator;
import org.carlspring.strongbox.data.criteria.Predicate;
import org.carlspring.strongbox.data.criteria.Selector;
import org.carlspring.strongbox.domain.ArtifactEntry;
import org.carlspring.strongbox.domain.ArtifactEntity;

/**
* @author sbespalov
*
*/
public class AqlStatementVisitor extends AQLBaseVisitor<Selector<ArtifactEntry>>
public class AqlStatementVisitor extends AQLBaseVisitor<Selector<ArtifactEntity>>
{

private Selector<ArtifactEntry> selector = new Selector<>(ArtifactEntry.class);
private Selector<ArtifactEntity> selector = new Selector<>(ArtifactEntity.class);

public AqlStatementVisitor()
{
}

@Override
public Selector<ArtifactEntry> visitQuery(QueryContext ctx)
public Selector<ArtifactEntity> visitQuery(QueryContext ctx)
{
Predicate artifactPredicate = Predicate.of(ExpOperator.IS_NOT_NULL.of("artifactCoordinates"));
AqlQueryVisitor queryVisitor = new AqlQueryVisitor(artifactPredicate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import java.io.IOException;

import org.carlspring.strongbox.data.criteria.Selector;
import org.carlspring.strongbox.domain.ArtifactEntry;
import org.carlspring.strongbox.domain.ArtifactEntity;
import org.carlspring.strongbox.storage.search.SearchResults;

public interface AqlSearchService
{

public SearchResults search(Selector<ArtifactEntry> selector)
public SearchResults search(Selector<ArtifactEntity> selector)
throws IOException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
import javax.persistence.PersistenceContext;
import javax.transaction.Transactional;

import org.carlspring.strongbox.data.criteria.DetachQueryTemplate;
import org.carlspring.strongbox.data.criteria.OQueryTemplate;
import org.carlspring.strongbox.data.criteria.QueryTemplate;
import org.carlspring.strongbox.data.criteria.Selector;
import org.carlspring.strongbox.dependency.snippet.CodeSnippet;
import org.carlspring.strongbox.dependency.snippet.SnippetGenerator;
import org.carlspring.strongbox.domain.ArtifactEntry;
import org.carlspring.strongbox.domain.ArtifactEntity;
import org.carlspring.strongbox.providers.io.RepositoryFiles;
import org.carlspring.strongbox.providers.io.RepositoryPath;
import org.carlspring.strongbox.providers.io.RepositoryPathResolver;
Expand All @@ -30,7 +29,7 @@
public class AqlSearchServiceImpl implements AqlSearchService
{

@PersistenceContext
//@PersistenceContext
private EntityManager entityManager;

@Inject
Expand All @@ -39,14 +38,13 @@ public class AqlSearchServiceImpl implements AqlSearchService
@Inject
private SnippetGenerator snippetGenerator;

public SearchResults search(Selector<ArtifactEntry> selector)
public SearchResults search(Selector<ArtifactEntity> selector)
throws IOException
{
SearchResults result = new SearchResults();

QueryTemplate<List<ArtifactEntry>, ArtifactEntry> queryTemplate = new DetachQueryTemplate<>(
new OQueryTemplate<>(entityManager));
for (ArtifactEntry artifactEntry : queryTemplate.select(selector))
QueryTemplate<List<ArtifactEntity>, ArtifactEntity> queryTemplate = new OQueryTemplate<>(entityManager);
for (ArtifactEntity artifactEntry : queryTemplate.select(selector))
{
SearchResult r = new SearchResult();
result.getResults().add(r);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.carlspring.strongbox.data.criteria.Predicate;
import org.carlspring.strongbox.data.criteria.QueryParserException;
import org.carlspring.strongbox.data.criteria.Selector;
import org.carlspring.strongbox.domain.ArtifactEntry;
import org.carlspring.strongbox.domain.ArtifactEntity;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -19,6 +19,7 @@
import org.slf4j.LoggerFactory;
import static org.assertj.core.api.Assertions.assertThat;

@Disabled
public class AqlParserTest
{

Expand All @@ -35,7 +36,7 @@ public void testLayoutSpecificKeywords()

logger.debug("Query [{}] parse tree:\n[{}]", query, aqlParser);

Selector<ArtifactEntry> selector = aqlParser.parseQuery();
Selector<ArtifactEntity> selector = aqlParser.parseQuery();
Predicate predicate = selector.getPredicate();

assertThat(predicate).isNotNull();
Expand Down Expand Up @@ -151,14 +152,14 @@ public void testValidQueryWithUpperLowercaseCheck()

logger.debug("Query [{}] parse tree:\n[{}]", query, aqlParser);

Selector<ArtifactEntry> selector = aqlParser.parseQuery();
Selector<ArtifactEntity> selector = aqlParser.parseQuery();
Predicate predicate = selector.getPredicate();

assertThat(predicate).isNotNull();
assertThat(predicate.isEmpty()).isFalse();
assertThat(aqlParser.hasErrors()).isFalse();

OQueryTemplate<Object, ArtifactEntry> queryTemplate = new OQueryTemplate<>(null);
OQueryTemplate<Object, ArtifactEntity> queryTemplate = new OQueryTemplate<>(null);

String sqlQuery = queryTemplate.calculateQueryString(selector);

Expand Down
4 changes: 2 additions & 2 deletions strongbox-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<parent>
<groupId>org.carlspring.strongbox</groupId>
<artifactId>strongbox-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>strongbox-client</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Strongbox: Client</name>
Expand Down
4 changes: 2 additions & 2 deletions strongbox-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<parent>
<groupId>org.carlspring.strongbox</groupId>
<artifactId>strongbox-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>strongbox-commons</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>

<name>Strongbox: Commons</name>

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static Object flattenObject(Object o)
return o;
}

private static Stream<Entry<String, Object>> flatten(Map<String, Object> map)
public static Stream<Entry<String, Object>> flatten(Map<String, Object> map)
{
return map.entrySet().stream().flatMap(CollectionUtils::flatten);
}
Expand Down
16 changes: 7 additions & 9 deletions strongbox-commons/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,16 @@ strongbox:
feed: false
version: @{project.version}
revision: @{strongbox.revision}
orientdb:
studio:
enabled: false
ip:
address: 127.0.0.1
port: 2480
server:
database:
path: ${strongbox.vault}/db
users:
external:
cache:
seconds: 300
sse:
timeoutMillis: 600000
graph:
gremlin:
server:
enabled: false
# Changes to these properties must also be applied to [strongbox/strongbox-web-integration-tests] and possibly the pipeline.
# Please ping us on our chat channel (https://chat.carlspring.org/) to confirm.
logging:
Expand All @@ -62,6 +57,9 @@ ehcache:
store:
dir: ${strongbox.vault}/cache
management:
health:
neo4j:
enabled: false
endpoint:
health:
show-details: always
Expand Down
4 changes: 2 additions & 2 deletions strongbox-configuration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<parent>
<groupId>org.carlspring.strongbox</groupId>
<artifactId>strongbox-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>strongbox-configuration</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>

<name>Strongbox: Configuration</name>

Expand Down
4 changes: 2 additions & 2 deletions strongbox-cron/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>org.carlspring.strongbox</groupId>
<artifactId>strongbox-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>strongbox-cron</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Strongbox: Cron</name>
Expand Down
8 changes: 2 additions & 6 deletions strongbox-cron/strongbox-cron-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>org.carlspring.strongbox</groupId>
<artifactId>strongbox-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>strongbox-cron-api</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-PR-62-SNAPSHOT</version>

<name>Strongbox: Cron [API]</name>

Expand Down Expand Up @@ -114,10 +114,6 @@
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package org.carlspring.strongbox.cron.jobs;

import org.carlspring.strongbox.util.ThrowingFunction;

import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

import com.google.common.collect.ImmutableSet;
import org.apache.commons.lang3.StringUtils;
import org.carlspring.strongbox.util.ThrowingFunction;
import org.springframework.stereotype.Component;

/**
Expand All @@ -24,7 +23,7 @@ public class CronJobsDefinitionsRegistry
.stream()
.map(ThrowingFunction.unchecked(clazz -> clazz.newInstance()
.getCronJobDefinition()))
.collect(ImmutableSet.toImmutableSet());
.collect(Collectors.toSet());
}

public Set<CronJobDefinition> getCronJobDefinitions()
Expand Down
Loading