aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins/metadata-store-jcr/src
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2019-08-21 22:44:40 +0200
committerMartin Stockhammer <martin_s@apache.org>2019-08-21 22:44:40 +0200
commit31e8442faddc796db59426a5749ecb64ad76acf5 (patch)
treea29d7343f31a000ec4b89a90881706a9a22e0ca2 /archiva-modules/plugins/metadata-store-jcr/src
parent37a92817ef738ea0c0b82aff15605e65de7fc9dd (diff)
downloadarchiva-31e8442faddc796db59426a5749ecb64ad76acf5.tar.gz
archiva-31e8442faddc796db59426a5749ecb64ad76acf5.zip
Fixing TZ for time storage. Adding stream implementations.
Diffstat (limited to 'archiva-modules/plugins/metadata-store-jcr/src')
-rw-r--r--archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrConstants.java5
-rw-r--r--archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java21
2 files changed, 9 insertions, 17 deletions
diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrConstants.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrConstants.java
index e4faa4e1f..46caef96f 100644
--- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrConstants.java
+++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrConstants.java
@@ -19,6 +19,8 @@ package org.apache.archiva.metadata.repository.jcr;
* under the License.
*/
+import java.time.ZoneId;
+
/**
* Node types and properties defined in the schema.
*
@@ -26,6 +28,9 @@ package org.apache.archiva.metadata.repository.jcr;
*/
public interface JcrConstants
{
+
+
+
String BASE_NODE_TYPE = "archiva:base";
String NAMESPACE_NODE_TYPE = "archiva:namespace";
String PROJECT_NODE_TYPE = "archiva:project";
diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
index fd3fd49cf..101b633d8 100644
--- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
+++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
@@ -21,20 +21,7 @@ package org.apache.archiva.metadata.repository.jcr;
import com.google.common.collect.ImmutableMap;
import org.apache.archiva.metadata.QueryParameter;
-import org.apache.archiva.metadata.model.ArtifactMetadata;
-import org.apache.archiva.metadata.model.CiManagement;
-import org.apache.archiva.metadata.model.Dependency;
-import org.apache.archiva.metadata.model.FacetedMetadata;
-import org.apache.archiva.metadata.model.IssueManagement;
-import org.apache.archiva.metadata.model.License;
-import org.apache.archiva.metadata.model.MailingList;
-import org.apache.archiva.metadata.model.MetadataFacet;
-import org.apache.archiva.metadata.model.MetadataFacetFactory;
-import org.apache.archiva.metadata.model.Organization;
-import org.apache.archiva.metadata.model.ProjectMetadata;
-import org.apache.archiva.metadata.model.ProjectVersionMetadata;
-import org.apache.archiva.metadata.model.ProjectVersionReference;
-import org.apache.archiva.metadata.model.Scm;
+import org.apache.archiva.metadata.model.*;
import org.apache.archiva.metadata.model.maven2.MavenArtifactFacet;
import org.apache.archiva.metadata.repository.AbstractMetadataRepository;
import org.apache.archiva.metadata.repository.MetadataRepository;
@@ -792,10 +779,10 @@ public class JcrMetadataRepository
query.setLimit(queryParameter.getLimit());
ValueFactory valueFactory = jcrSession.getValueFactory();
if (startTime != null) {
- query.bindValue("start", valueFactory.createValue(createCalendar(startTime)));
+ query.bindValue("start", valueFactory.createValue(createCalendar(startTime.withZoneSameInstant(ModelInfo.STORAGE_TZ))));
}
if (endTime != null) {
- query.bindValue("end", valueFactory.createValue(createCalendar(endTime)));
+ query.bindValue("end", valueFactory.createValue(createCalendar(endTime.withZoneSameInstant(ModelInfo.STORAGE_TZ))));
}
return query.execute();
} catch (RepositoryException e) {
@@ -843,7 +830,7 @@ public class JcrMetadataRepository
@Override
- public List<ArtifactMetadata> getArtifactsByChecksum( RepositorySession session, String repositoryId, String checksum )
+ public List<ArtifactMetadata> getArtifactsByChecksum(RepositorySession session, String repositoryId, String checksum )
throws MetadataRepositoryException
{
final Session jcrSession = getSession( session );