Skip to content

Commit

Permalink
Minor cleanup and comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
ocielliottc committed Sep 10, 2024
1 parent fc77f50 commit 8628863
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ public FileInfoDTO uploadFile(@NotNull UUID checkInID, @NotNull CompletedFileUpl
}
}

/// Upload a Markdown document to the specified directory and copy it to
/// a Google document, which results in an automatic conversion from
/// Markdown to the Google Doc format.
public FileInfoDTO uploadDocument(String directoryName, String name, String text) {
final String GOOGLE_DOC_TYPE = "application/vnd.google-apps.document";
MemberProfile currentUser = currentUserServices.getCurrentUser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
import java.nio.ByteBuffer;
import java.io.IOException;

/// Collates all of the data necessary to generate a Merit Report. It uses
/// files uploaded by the user, as well as data stored in the database.
public class ReportDataCollation {
private static final Logger LOG = LoggerFactory.getLogger(ReportDataCollation.class);

Expand Down Expand Up @@ -143,6 +145,7 @@ public MemberProfile getMemberProfile() {
);
}

/// Get the compensation history for the designated member.
public List<CompensationHistory.Compensation> getCompensationHistory() {
try {
ByteBuffer buffer = reportDataServices.get(
Expand All @@ -153,6 +156,7 @@ public List<CompensationHistory.Compensation> getCompensationHistory() {
return compensationHistory.getHistory(memberId);
}

/// Get the current information for the designated member.
public CurrentInformation.Information getCurrentInformation() {
try {
ByteBuffer buffer = reportDataServices.get(
Expand All @@ -163,6 +167,7 @@ public CurrentInformation.Information getCurrentInformation() {
return currentInformation.getInformation(memberId);
}

/// Get the position history for the designated member.
public List<PositionHistory.Position> getPositionHistory() {
try {
ByteBuffer buffer = reportDataServices.get(
Expand All @@ -173,18 +178,23 @@ public List<PositionHistory.Position> getPositionHistory() {
return positionHistory.getHistory(memberId);
}

/// Get the self reviews for the designated member.
public List<Feedback> getSelfReviews() {
return getFeedbackType(FeedbackType.selfReviews);
}

/// Get the reviews for the designated member.
public List<Feedback> getReviews() {
return getFeedbackType(FeedbackType.reviews);
}

/// Get the feedback for the designated member.
public List<Feedback> getFeedback() {
return getFeedbackType(FeedbackType.feedback);
}

/// Get the employee hours for the designated member. This only returns
/// the first entry found for the member.
public ReportHours getReportHours() {
MemberProfile memberProfile = getMemberProfile();
Set<EmployeeHours> employeeHours =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public Stored() {
private final long expireCheck = 10*60*1000;
private final long expiration = 60*60*1000;

public ReportDataServicesImpl(
CurrentUserServices currentUserServices) {
public ReportDataServicesImpl(CurrentUserServices currentUserServices) {
this.currentUserServices = currentUserServices;

timer.scheduleAtFixedRate(this, new Date(), expireCheck);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.objectcomputing.checkins.services.reports;
import io.micronaut.core.annotation.Introspected;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
@Introspected
class ReportHours {
private final float contributionHours;
private final float ptoHours;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ void getReportData() throws JsonProcessingException {
assertNotNull(first.get("selfReviews"));
assertNotNull(first.get("reviews"));
assertNotNull(first.get("feedback"));
assertNotNull(first.get("hours"));
}

@Test
Expand Down

0 comments on commit 8628863

Please sign in to comment.