Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ This project holds all Model POJO classes for indy microservices.
This lib is extracted from the old indy monolith code of "indy-model-core-java", which is commonly used by all the other services

### Event Model
This event model lib is created to hold all model classes for indy messaging interaction between services.
This event model lib is created to hold all model classes for indy messaging interaction between services.

### Folo Model
This lib is extracted from the old indy monolith code of "indy-folo-model-java", which is commonly used by all the other services
10 changes: 0 additions & 10 deletions core-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@
<groupId>ch.qos.logback.contrib</groupId>
<artifactId>logback-jackson</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
5 changes: 0 additions & 5 deletions event/model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
5 changes: 0 additions & 5 deletions event/serialize/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-kafka-client</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
44 changes: 44 additions & 0 deletions folo/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (C) 2022-2023 Red Hat, Inc. (https://github.com/Commonjava/indy-model)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>indy-model-parent</artifactId>
<groupId>org.commonjava.indy.service</groupId>
<version>1.3-SNAPSHOT</version>
</parent>

<artifactId>indy-folo-model-java</artifactId>
<name>Indy :: Library :: Folo Usage Tracker Model</name>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.commonjava.indy.service</groupId>
<artifactId>indy-model-core-java</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/**
* Copyright (C) 2022-2023 Red Hat, Inc. (https://github.com/Commonjava/indy-model)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.commonjava.indy.folo.dto;

import org.commonjava.indy.folo.model.TrackingKey;

import java.util.Set;

public class TrackedContentDTO
{

private TrackingKey key;

private Set<TrackedContentEntryDTO> uploads;

private Set<TrackedContentEntryDTO> downloads;

public TrackedContentDTO()
{
}

public TrackedContentDTO( final TrackingKey key, final Set<TrackedContentEntryDTO> uploads,
final Set<TrackedContentEntryDTO> downloads )
{
this.key = key;
this.uploads = uploads;
this.downloads = downloads;
}

public TrackingKey getKey()
{
return key;
}

public void setKey( final TrackingKey key )
{
this.key = key;
}

public Set<TrackedContentEntryDTO> getUploads()
{
return uploads;
}

public void setUploads( final Set<TrackedContentEntryDTO> uploads )
{
this.uploads = uploads;
}

public Set<TrackedContentEntryDTO> getDownloads()
{
return downloads;
}

public void setDownloads( final Set<TrackedContentEntryDTO> downloads )
{
this.downloads = downloads;
}

@Override
public boolean equals( Object o )
{
if ( this == o )
{
return true;
}
if ( !( o instanceof TrackedContentDTO ) )
{
return false;
}

TrackedContentDTO that = (TrackedContentDTO) o;

return getKey() != null ? getKey().equals( that.getKey() ) : that.getKey() == null;

}

@Override
public int hashCode()
{
return getKey() != null ? getKey().hashCode() : 0;
}
}
Loading