Skip to content

Commit

Permalink
#8 add more data to rules
Browse files Browse the repository at this point in the history
  • Loading branch information
pethers committed Mar 1, 2018
1 parent 3c874b0 commit 81a0f7b
Show file tree
Hide file tree
Showing 2 changed files with 315 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@
package com.hack23.cia.service.impl.rules;

import java.text.MessageFormat;
import java.util.List;
import java.util.Locale;

import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeBallotDecisionPartySummary;
import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenVoteDataBallotPartySummary;
import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenVoteDataBallotPartySummaryAnnual;
import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenVoteDataBallotPartySummaryDaily;
import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenVoteDataBallotPartySummaryMonthly;
import com.hack23.cia.model.internal.application.data.document.impl.ViewRiksdagenPartyDocumentDailySummary;
import com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenPartySummary;
import com.hack23.cia.service.api.action.kpi.ResourceType;

Expand All @@ -33,10 +40,31 @@ public final class PartyComplianceCheckImpl extends AbstractComplianceCheckImpl
private static final long serialVersionUID = 1L;

/** The party. */
private ViewRiksdagenPartySummary party;
private final ViewRiksdagenPartySummary party;

/** The name. */
private String name;
private final String name;

/** The document daily summary. */
private List<ViewRiksdagenPartyDocumentDailySummary> documentDailySummary;

/** The ballot decisions. */
private List<ViewRiksdagenCommitteeBallotDecisionPartySummary> ballotDecisions;

/** The ballots. */
private List<ViewRiksdagenVoteDataBallotPartySummary> ballots;

/** The daily ballot summary. */
private List<ViewRiksdagenVoteDataBallotPartySummaryDaily> dailyBallotSummary;

/** The daily summary. */
private ViewRiksdagenVoteDataBallotPartySummaryDaily dailySummary;

/** The monthly summary. */
private ViewRiksdagenVoteDataBallotPartySummaryMonthly monthlySummary;

/** The annual summary. */
private ViewRiksdagenVoteDataBallotPartySummaryAnnual annualSummary;

/**
* Instantiates a new party compliance check impl.
Expand Down Expand Up @@ -64,15 +92,129 @@ public String getName() {
return name;
}

@Override
public String getId() {
return party.getParty();
}

@Override
public String toString() {
return new MessageFormat("PartyComplianceCheckImpl [getName()={0}, getRuleName()={1}, getRuleDescription()={2}, getResourceType()={3}, getStatus()={4}]",Locale.ENGLISH).format(
new Object[] {getName(), getRuleName(), getRuleDescription(), getResourceType(), getStatus()});
}

@Override
public String getId() {
return party.getParty();
/**
* Gets the document daily summary.
*
* @return the document daily summary
*/
public List<ViewRiksdagenPartyDocumentDailySummary> getDocumentDailySummary() {
return documentDailySummary;
}

/**
* Sets the document daily summary.
*
* @param documentDailySummary
* the new document daily summary
*/
public void setDocumentDailySummary(List<ViewRiksdagenPartyDocumentDailySummary> documentDailySummary) {
this.documentDailySummary = documentDailySummary;
}

/**
* Gets the ballots.
*
* @return the ballots
*/
public List<ViewRiksdagenVoteDataBallotPartySummary> getBallots() {
return ballots;
}

/**
* Sets the ballots.
*
* @param ballots
* the new ballots
*/
public void setBallots(List<ViewRiksdagenVoteDataBallotPartySummary> ballots) {
this.ballots = ballots;
}

/**
* Gets the daily ballot summary.
*
* @return the daily ballot summary
*/
public List<ViewRiksdagenVoteDataBallotPartySummaryDaily> getDailyBallotSummary() {
return dailyBallotSummary;
}

/**
* Sets the daily ballot summary.
*
* @param dailyBallotSummary
* the new daily ballot summary
*/
public void setDailyBallotSummary(List<ViewRiksdagenVoteDataBallotPartySummaryDaily> dailyBallotSummary) {
this.dailyBallotSummary = dailyBallotSummary;
}

/**
* Gets the daily summary.
*
* @return the daily summary
*/
public ViewRiksdagenVoteDataBallotPartySummaryDaily getDailySummary() {
return dailySummary;
}

/**
* Sets the daily summary.
*
* @param dailySummary
* the new daily summary
*/
public void setDailySummary(ViewRiksdagenVoteDataBallotPartySummaryDaily dailySummary) {
this.dailySummary = dailySummary;
}

/**
* Gets the monthly summary.
*
* @return the monthly summary
*/
public ViewRiksdagenVoteDataBallotPartySummaryMonthly getMonthlySummary() {
return monthlySummary;
}

/**
* Sets the monthly summary.
*
* @param monthlySummary
* the new monthly summary
*/
public void setMonthlySummary(ViewRiksdagenVoteDataBallotPartySummaryMonthly monthlySummary) {
this.monthlySummary = monthlySummary;
}

/**
* Gets the annual summary.
*
* @return the annual summary
*/
public ViewRiksdagenVoteDataBallotPartySummaryAnnual getAnnualSummary() {
return annualSummary;
}

/**
* Sets the annual summary.
*
* @param annualSummary
* the new annual summary
*/
public void setAnnualSummary(ViewRiksdagenVoteDataBallotPartySummaryAnnual annualSummary) {
this.annualSummary = annualSummary;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeBallotDecisionPoliticianSummary;
import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenVoteDataBallotPoliticianSummary;
import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenVoteDataBallotPoliticianSummaryAnnual;
import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenVoteDataBallotPoliticianSummaryDaily;
import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenVoteDataBallotPoliticianSummaryMonthly;
import com.hack23.cia.model.internal.application.data.document.impl.ViewRiksdagenPoliticianDocument;
import com.hack23.cia.model.internal.application.data.document.impl.ViewRiksdagenPoliticianDocumentDailySummary;
import com.hack23.cia.model.internal.application.data.politician.impl.ViewRiksdagenPolitician;
Expand All @@ -41,16 +43,31 @@ public final class PoliticianComplianceCheckImpl extends AbstractComplianceCheck
/** The politician. */
private final ViewRiksdagenPolitician politician;

/** The documents. */
private List<ViewRiksdagenPoliticianDocument> documents;

/** The document daily summary. */
private List<ViewRiksdagenPoliticianDocumentDailySummary> documentDailySummary;

/** The ballot decisions. */
private List<ViewRiksdagenCommitteeBallotDecisionPoliticianSummary> ballotDecisions;

/** The ballots. */
private List<ViewRiksdagenVoteDataBallotPoliticianSummary> ballots;

/** The daily ballot summary. */
private List<ViewRiksdagenVoteDataBallotPoliticianSummaryDaily> dailyBallotSummary;

/** The daily summary. */
private ViewRiksdagenVoteDataBallotPoliticianSummaryDaily dailySummary;

/** The monthly summary. */
private ViewRiksdagenVoteDataBallotPoliticianSummaryMonthly monthlySummary;

/** The annual summary. */
private ViewRiksdagenVoteDataBallotPoliticianSummaryAnnual annualSummary;

/** The name. */
private String name;

/**
Expand Down Expand Up @@ -90,5 +107,156 @@ public String getId() {
return politician.getPersonId();
}

/**
* Gets the documents.
*
* @return the documents
*/
public List<ViewRiksdagenPoliticianDocument> getDocuments() {
return documents;
}

/**
* Sets the documents.
*
* @param documents
* the new documents
*/
public void setDocuments(List<ViewRiksdagenPoliticianDocument> documents) {
this.documents = documents;
}

/**
* Gets the document daily summary.
*
* @return the document daily summary
*/
public List<ViewRiksdagenPoliticianDocumentDailySummary> getDocumentDailySummary() {
return documentDailySummary;
}

/**
* Sets the document daily summary.
*
* @param documentDailySummary
* the new document daily summary
*/
public void setDocumentDailySummary(List<ViewRiksdagenPoliticianDocumentDailySummary> documentDailySummary) {
this.documentDailySummary = documentDailySummary;
}

/**
* Gets the ballot decisions.
*
* @return the ballot decisions
*/
public List<ViewRiksdagenCommitteeBallotDecisionPoliticianSummary> getBallotDecisions() {
return ballotDecisions;
}

/**
* Sets the ballot decisions.
*
* @param ballotDecisions
* the new ballot decisions
*/
public void setBallotDecisions(List<ViewRiksdagenCommitteeBallotDecisionPoliticianSummary> ballotDecisions) {
this.ballotDecisions = ballotDecisions;
}

/**
* Gets the ballots.
*
* @return the ballots
*/
public List<ViewRiksdagenVoteDataBallotPoliticianSummary> getBallots() {
return ballots;
}

/**
* Sets the ballots.
*
* @param ballots
* the new ballots
*/
public void setBallots(List<ViewRiksdagenVoteDataBallotPoliticianSummary> ballots) {
this.ballots = ballots;
}

/**
* Gets the daily ballot summary.
*
* @return the daily ballot summary
*/
public List<ViewRiksdagenVoteDataBallotPoliticianSummaryDaily> getDailyBallotSummary() {
return dailyBallotSummary;
}

/**
* Sets the daily ballot summary.
*
* @param dailyBallotSummary
* the new daily ballot summary
*/
public void setDailyBallotSummary(List<ViewRiksdagenVoteDataBallotPoliticianSummaryDaily> dailyBallotSummary) {
this.dailyBallotSummary = dailyBallotSummary;
}

/**
* Gets the daily summary.
*
* @return the daily summary
*/
public ViewRiksdagenVoteDataBallotPoliticianSummaryDaily getDailySummary() {
return dailySummary;
}

/**
* Sets the daily summary.
*
* @param dailySummary
* the new daily summary
*/
public void setDailySummary(ViewRiksdagenVoteDataBallotPoliticianSummaryDaily dailySummary) {
this.dailySummary = dailySummary;
}

/**
* Gets the monthly summary.
*
* @return the monthly summary
*/
public ViewRiksdagenVoteDataBallotPoliticianSummaryMonthly getMonthlySummary() {
return monthlySummary;
}

/**
* Sets the monthly summary.
*
* @param monthlySummary
* the new monthly summary
*/
public void setMonthlySummary(ViewRiksdagenVoteDataBallotPoliticianSummaryMonthly monthlySummary) {
this.monthlySummary = monthlySummary;
}

/**
* Gets the annual summary.
*
* @return the annual summary
*/
public ViewRiksdagenVoteDataBallotPoliticianSummaryAnnual getAnnualSummary() {
return annualSummary;
}

/**
* Sets the annual summary.
*
* @param annualSummary
* the new annual summary
*/
public void setAnnualSummary(ViewRiksdagenVoteDataBallotPoliticianSummaryAnnual annualSummary) {
this.annualSummary = annualSummary;
}

}

0 comments on commit 81a0f7b

Please sign in to comment.