Permalink
Browse files

Merge branch 'master' into development

  • Loading branch information...
dgkncelik committed May 29, 2018
2 parents 1ea1c20 + 57f93ce commit 569034c1fd48bc907e994d1027b02b951157159b
Showing with 40 additions and 0 deletions.
  1. 0 .gitattributes
  2. 0 .gitignore
  3. 0 .travis.yml
  4. 0 README.md
  5. 0 pom.xml
  6. 0 src/main/java/edu/itu/cavabunga/CavabungaApplication.java
  7. 0 src/main/java/edu/itu/cavabunga/advice/ExceptionHandlerAdvice.java
  8. +10 −0 src/main/java/edu/itu/cavabunga/business/CalendarManagerService.java
  9. +14 −0 src/main/java/edu/itu/cavabunga/business/CalendarManagerServiceImpl.java
  10. 0 src/main/java/edu/itu/cavabunga/configuration/SwaggerConfig.java
  11. 0 src/main/java/edu/itu/cavabunga/controller/ComponentController.java
  12. 0 src/main/java/edu/itu/cavabunga/controller/ParameterController.java
  13. +15 −0 src/main/java/edu/itu/cavabunga/controller/ParticipantController.java
  14. 0 src/main/java/edu/itu/cavabunga/controller/PropertyController.java
  15. 0 src/main/java/edu/itu/cavabunga/core/entity/AuditingConfiguration.java
  16. 0 src/main/java/edu/itu/cavabunga/core/entity/Component.java
  17. 0 src/main/java/edu/itu/cavabunga/core/entity/ComponentProperty.java
  18. 0 src/main/java/edu/itu/cavabunga/core/entity/Parameter.java
  19. 0 src/main/java/edu/itu/cavabunga/core/entity/Participant.java
  20. 0 src/main/java/edu/itu/cavabunga/core/entity/ParticipantProperty.java
  21. 0 src/main/java/edu/itu/cavabunga/core/entity/Property.java
  22. 0 src/main/java/edu/itu/cavabunga/core/entity/component/Alarm.java
  23. 0 src/main/java/edu/itu/cavabunga/core/entity/component/Calendar.java
  24. 0 src/main/java/edu/itu/cavabunga/core/entity/component/ComponentType.java
  25. 0 src/main/java/edu/itu/cavabunga/core/entity/component/Daylight.java
  26. 0 src/main/java/edu/itu/cavabunga/core/entity/component/Event.java
  27. 0 src/main/java/edu/itu/cavabunga/core/entity/component/Freebusy.java
  28. 0 src/main/java/edu/itu/cavabunga/core/entity/component/Journal.java
  29. 0 src/main/java/edu/itu/cavabunga/core/entity/component/Standard.java
  30. 0 src/main/java/edu/itu/cavabunga/core/entity/component/Timezone.java
  31. 0 src/main/java/edu/itu/cavabunga/core/entity/component/Todo.java
  32. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Altrep.java
  33. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Cn.java
  34. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Cutype.java
  35. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/DelegatedFrom.java
  36. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/DelegatedTo.java
  37. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Dir.java
  38. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Encoding.java
  39. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Fbtype.java
  40. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Fmttype.java
  41. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Language.java
  42. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Member.java
  43. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/ParameterType.java
  44. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Partstat.java
  45. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Range.java
  46. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Related.java
  47. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Reltype.java
  48. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Role.java
  49. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Rsvp.java
  50. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/SentBy.java
  51. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Tzid.java
  52. 0 src/main/java/edu/itu/cavabunga/core/entity/parameter/Value.java
  53. 0 src/main/java/edu/itu/cavabunga/core/entity/participant/Group.java
  54. 0 src/main/java/edu/itu/cavabunga/core/entity/participant/ParticipantType.java
  55. 0 src/main/java/edu/itu/cavabunga/core/entity/participant/User.java
  56. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Acknowledged.java
  57. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Action.java
  58. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Attach.java
  59. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Attendee.java
  60. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Calscale.java
  61. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Catagories.java
  62. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Class.java
  63. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Comment.java
  64. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Completed.java
  65. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Contact.java
  66. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Country.java
  67. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Created.java
  68. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Description.java
  69. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Dtend.java
  70. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Dtstamp.java
  71. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Dtstart.java
  72. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Due.java
  73. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Duration.java
  74. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Exdate.java
  75. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Exrule.java
  76. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Freebusy.java
  77. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Geo.java
  78. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Lastmod.java
  79. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Location.java
  80. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Method.java
  81. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Organizer.java
  82. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Percent.java
  83. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Priority.java
  84. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Prodid.java
  85. 0 src/main/java/edu/itu/cavabunga/core/entity/property/PropertyType.java
  86. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Rdate.java
  87. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Recurid.java
  88. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Related.java
  89. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Repeat.java
  90. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Resources.java
  91. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Rrule.java
  92. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Rstatus.java
  93. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Seq.java
  94. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Status.java
  95. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Summary.java
  96. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Transp.java
  97. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Trigger.java
  98. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Tzid.java
  99. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Tzname.java
  100. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Tzoffsetfrom.java
  101. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Tzoffsetto.java
  102. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Tzurl.java
  103. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Uid.java
  104. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Url.java
  105. 0 src/main/java/edu/itu/cavabunga/core/entity/property/Version.java
  106. 0 src/main/java/edu/itu/cavabunga/core/factory/ComponentFactory.java
  107. 0 src/main/java/edu/itu/cavabunga/core/factory/ComponentFactoryImpl.java
  108. 0 src/main/java/edu/itu/cavabunga/core/factory/ParameterFactory.java
  109. 0 src/main/java/edu/itu/cavabunga/core/factory/ParameterFactoryImpl.java
  110. 0 src/main/java/edu/itu/cavabunga/core/factory/ParticipantFactory.java
  111. 0 src/main/java/edu/itu/cavabunga/core/factory/ParticipantFactoryImpl.java
  112. 0 src/main/java/edu/itu/cavabunga/core/factory/PropertyFactory.java
  113. 0 src/main/java/edu/itu/cavabunga/core/factory/PropertyFactoryImpl.java
  114. 0 src/main/java/edu/itu/cavabunga/core/factory/TimeFactory.java
  115. 0 src/main/java/edu/itu/cavabunga/core/factory/TimeFactoryImpl.java
  116. 0 src/main/java/edu/itu/cavabunga/core/http/ComponentResponse.java
  117. 0 src/main/java/edu/itu/cavabunga/core/http/ErrorResponse.java
  118. 0 src/main/java/edu/itu/cavabunga/core/http/ParameterResponse.java
  119. 0 src/main/java/edu/itu/cavabunga/core/http/ParticipantResponse.java
  120. 0 src/main/java/edu/itu/cavabunga/core/http/PropertyResponse.java
  121. 0 src/main/java/edu/itu/cavabunga/core/http/Response.java
  122. +1 −0 src/main/java/edu/itu/cavabunga/core/repository/ComponentRepository.java
  123. 0 src/main/java/edu/itu/cavabunga/core/repository/ParameterRepository.java
  124. 0 src/main/java/edu/itu/cavabunga/core/repository/ParticipantRepository.java
  125. 0 src/main/java/edu/itu/cavabunga/core/repository/PropertyRepository.java
  126. 0 src/main/java/edu/itu/cavabunga/core/service/IcalService.java
  127. 0 src/main/java/edu/itu/cavabunga/core/service/IcalServiceImpl.java
  128. 0 src/main/java/edu/itu/cavabunga/core/service/ParticipantService.java
  129. 0 src/main/java/edu/itu/cavabunga/core/service/ParticipantServiceImpl.java
  130. 0 src/main/java/edu/itu/cavabunga/exception/Conflict.java
  131. 0 src/main/java/edu/itu/cavabunga/exception/NotFound.java
  132. 0 src/main/resources/application.properties
  133. 0 src/test/java/edu/itu/cavabunga/CavabungaApplicationTest.java
  134. 0 src/test/java/edu/itu/cavabunga/core/factory/ComponentFactoryImplTest.java
  135. 0 src/test/java/edu/itu/cavabunga/core/factory/ParameterFactoryImplTest.java
  136. 0 src/test/java/edu/itu/cavabunga/core/factory/ParticipantFactoryImplTest.java
  137. 0 src/test/java/edu/itu/cavabunga/core/factory/PropertyFactoryImplTest.java
  138. 0 src/test/java/edu/itu/cavabunga/core/service/IcalServiceImplTest.java
View
0 .gitattributes 100644 → 100755
No changes.
View
0 .gitignore 100644 → 100755
No changes.
View
0 .travis.yml 100644 → 100755
No changes.
View
0 README.md 100644 → 100755
No changes.
View
0 pom.xml 100644 → 100755
No changes.
No changes.
No changes.
@@ -78,6 +78,16 @@
*/
Component getComponentById(Long id);
/**
* get component by owner
*
* @param owner requested component's owner username
* @return requested components
* @throws IllegalArgumentException when owner is null
* @throws NotFound when participant with given username not found
*/
List<Component> getComponentByOwner(String owner);
/**
* delete a component
*
@@ -139,6 +139,20 @@ public Component getComponentById(Long id){
return icalService.getComponentById(id).get();
}
/**
* {@inheritDoc}
*/
@Override
public List<Component> getComponentByOwner(String owner){
Assert.notNull(owner, "Owner participant cannot be null");
if(!participantService.getParticipantByUserName(owner).isPresent()){
throw new NotFound("No participant found for username: " + owner);
}
return icalService.getComponentByOwner(participantService.getParticipantByUserName(owner).get());
}
/**
* {@inheritDoc}
*/
No changes.
No changes.
No changes.
@@ -2,6 +2,7 @@
import edu.itu.cavabunga.business.CalendarManagerService;
import edu.itu.cavabunga.core.entity.Participant;
import edu.itu.cavabunga.core.http.ComponentResponse;
import edu.itu.cavabunga.core.http.ErrorResponse;
import edu.itu.cavabunga.core.http.ParticipantResponse;
import edu.itu.cavabunga.core.http.Response;
@@ -66,6 +67,20 @@ public ParticipantResponse getParticipant(@PathVariable(value = "user_name") Str
return new ParticipantResponse(0,null,calendarManagerService.getParticipantByUserName(userName));
}
@ApiOperation(value = "Get component which owned by participant with username = {user_name}", response = Object.class)
@ApiResponses({
@ApiResponse(code = 200, message = "Successfully retrieve a components owned by participant with username = {user_name}", response = ComponentResponse.class),
@ApiResponse(code = 400, message = "Bad Request", response = ErrorResponse.class),
@ApiResponse(code = 401, message = "Unauthorized request", response = ErrorResponse.class),
@ApiResponse(code = 403, message = "Forbidden", response = ErrorResponse.class),
@ApiResponse(code = 404, message = "No component found which owned by participant with username = {user_name}", response = ErrorResponse.class)
})
@GetMapping(value = "/{user_name}/components", produces = "application/json")
@ResponseStatus(HttpStatus.OK)
public ComponentResponse getComponentByOwner(@PathVariable(value = "user_name") String userName){
return new ComponentResponse(0, null, calendarManagerService.getComponentByOwner(userName));
}
@ApiOperation(value = "Delete participant with id = {user_id}")
@ApiResponses({
@ApiResponse(code = 200, message = "Successfully delete participant with id = {user_id}", response = Response.class),
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
@@ -5,6 +5,7 @@
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import javax.swing.text.html.Option;
import java.util.List;
import java.util.Optional;
No changes.
No changes.
No changes.
No changes.
No changes.
View
No changes.
No changes.
No changes.

0 comments on commit 569034c

Please sign in to comment.