Skip to content

Commit

Permalink
new resource type
Browse files Browse the repository at this point in the history
  • Loading branch information
dgkncelik committed Jun 5, 2018
1 parent 57b0715 commit fcd1322
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 41 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

24 changes: 0 additions & 24 deletions .gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -15,7 +15,7 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.8.RELEASE</version> <version>1.5.8.RELEASE</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from reposi/otory -->
</parent> </parent>


<properties> <properties>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/edu/itu/cavabunga/core/entity/Participant.java
Expand Up @@ -3,6 +3,7 @@


import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.annotation.*;
import edu.itu.cavabunga.core.entity.participant.Group; import edu.itu.cavabunga.core.entity.participant.Group;
import edu.itu.cavabunga.core.entity.participant.Resource;
import edu.itu.cavabunga.core.entity.participant.User; import edu.itu.cavabunga.core.entity.participant.User;
import lombok.Data; import lombok.Data;
import org.hibernate.annotations.DiscriminatorOptions; import org.hibernate.annotations.DiscriminatorOptions;
Expand All @@ -24,6 +25,7 @@
@JsonSubTypes({ @JsonSubTypes({
@JsonSubTypes.Type(value = User.class, name = "User"), @JsonSubTypes.Type(value = User.class, name = "User"),
@JsonSubTypes.Type(value = Group.class, name = "Group"), @JsonSubTypes.Type(value = Group.class, name = "Group"),
@JsonSubTypes.Type(value = Resource.class, name = "Resource"),
}) })
@Data @Data
public abstract class Participant { public abstract class Participant {
Expand Down
Expand Up @@ -12,7 +12,11 @@ public Participant create(){
public Participant create(){ public Participant create(){
return new Group(); return new Group();
} }
}; },
Resource {
public Participant create(){ return new Resource(); }
}
;


public Participant create() { return null; } public Participant create() { return null; }
} }
@@ -0,0 +1,6 @@
package edu.itu.cavabunga.core.entity.participant;

import edu.itu.cavabunga.core.entity.Participant;

public class Resource extends Participant {
}

0 comments on commit fcd1322

Please sign in to comment.