Skip to content

Commit

Permalink
#8 early test
Browse files Browse the repository at this point in the history
  • Loading branch information
pethers committed Feb 25, 2018
1 parent 7afc0b1 commit a50b2c8
Show file tree
Hide file tree
Showing 9 changed files with 354 additions and 104 deletions.
10 changes: 5 additions & 5 deletions parent-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -766,11 +766,11 @@
<artifactId>wagon-git</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.54</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.54</version>
</dependency>
</dependencies>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/*
* Copyright 2010 James Pether Sörling
*
* 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.
*
* $Id$
* $HeadURL$
*/
package com.hack23.cia.service.impl.rules;

import com.hack23.cia.service.api.action.kpi.ComplianceCheck;
import com.hack23.cia.service.api.action.kpi.ResourceType;
import com.hack23.cia.service.api.action.kpi.Status;

/**
* The Class AbstractComplianceCheckImpl.
*/
public abstract class AbstractComplianceCheckImpl implements ComplianceCheck {

/** The resource type. */
private final ResourceType resourceType;

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

/** The rule description. */
private String ruleDescription;

/** The status. */
private Status status = Status.OK;

/**
* Instantiates a new abstract compliance check impl.
*
* @param resourceType
* the resource type
*/
public AbstractComplianceCheckImpl(final ResourceType resourceType) {
super();
this.resourceType = resourceType;
}

public String getRuleName() {
return ruleName;
}

/**
* Sets the rule name.
*
* @param ruleName
* the new rule name
*/
public void setRuleName(String ruleName) {
this.ruleName = ruleName;
}

public String getRuleDescription() {
return ruleDescription;
}

/**
* Sets the rule description.
*
* @param ruleDescription
* the new rule description
*/
public void setRuleDescription(String ruleDescription) {
this.ruleDescription = ruleDescription;
}

/**
* Sets the status.
*
* @param status
* the new status
*/
public void setStatus(Status status) {
this.status = status;
}

public ResourceType getResourceType() {
return resourceType;
}

public Status getStatus() {
return status;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* Copyright 2010 James Pether Sörling
*
* 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.
*
* $Id$
* $HeadURL$
*/
package com.hack23.cia.service.impl.rules;

import java.text.MessageFormat;

import com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenPartySummary;
import com.hack23.cia.service.api.action.kpi.ResourceIdentifier;
import com.hack23.cia.service.api.action.kpi.ResourceType;

/**
* The Class PartyComplianceCheckImpl.
*/
public final class PartyComplianceCheckImpl extends AbstractComplianceCheckImpl implements ResourceIdentifier {

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

/**
* Instantiates a new party compliance check impl.
*
* @param party
* the party
*/
public PartyComplianceCheckImpl(final ViewRiksdagenPartySummary party) {
super(ResourceType.PARTY);
this.party = party;
}

/**
* Gets the party.
*
* @return the party
*/
public ViewRiksdagenPartySummary getParty() {
return party;
}

@Override
public ResourceIdentifier getResourceIdentifier() {
return this;
}

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

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


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* Copyright 2010 James Pether Sörling
*
* 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.
*
* $Id$
* $HeadURL$
*/
package com.hack23.cia.service.impl.rules;

import java.text.MessageFormat;

import com.hack23.cia.model.internal.application.data.politician.impl.ViewRiksdagenPolitician;
import com.hack23.cia.service.api.action.kpi.ResourceIdentifier;
import com.hack23.cia.service.api.action.kpi.ResourceType;

/**
* The Class PoliticianComplianceCheckImpl.
*/
public final class PoliticianComplianceCheckImpl extends AbstractComplianceCheckImpl implements ResourceIdentifier {

/** The politician. */
private final ViewRiksdagenPolitician politician;

/**
* Instantiates a new politician compliance check impl.
*
* @param politician
* the politician
*/
public PoliticianComplianceCheckImpl(final ViewRiksdagenPolitician politician) {
super(ResourceType.POLITICIAN);
this.politician = politician;
}

/**
* Gets the politician.
*
* @return the politician
*/
public ViewRiksdagenPolitician getPolitician() {
return politician;
}

@Override
public ResourceIdentifier getResourceIdentifier() {
return this;
}

@Override
public String getName() {
return politician.getFirstName();
}

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


}
Loading

0 comments on commit a50b2c8

Please sign in to comment.