refs #200: Create accouting-lib library
https://support.d4science.org/issues/200 Fixing data model git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@115239 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d2a01e964d
commit
93fd14023d
|
@ -0,0 +1,28 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.accounting.datamodel;
|
||||||
|
|
||||||
|
import org.gcube.accounting.exception.InvalidValueException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||||
|
*/
|
||||||
|
public interface AggregatedUsageRecord extends UsageRecord {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the id of the usage record aggregating this
|
||||||
|
* @return Aggregated Id
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getAggregatedId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the id of the usage record aggregating this
|
||||||
|
* @param aggregatedId
|
||||||
|
* @throws InvalidValueException
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setAggregatedId(String aggregatedId) throws InvalidValueException;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.accounting.datamodel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface SingleUsageRecord extends UsageRecord {
|
||||||
|
|
||||||
|
}
|
|
@ -6,6 +6,7 @@ package org.gcube.accounting.datamodel.implementations;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
import org.gcube.accounting.datamodel.RawUsageRecord;
|
import org.gcube.accounting.datamodel.RawUsageRecord;
|
||||||
|
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
||||||
import org.gcube.accounting.datamodel.annotations.ValidInteger;
|
import org.gcube.accounting.datamodel.annotations.ValidInteger;
|
||||||
import org.gcube.accounting.datamodel.annotations.ValidLong;
|
import org.gcube.accounting.datamodel.annotations.ValidLong;
|
||||||
|
@ -15,7 +16,7 @@ import org.gcube.accounting.exception.InvalidValueException;
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class JobUsageRecord extends RawUsageRecord {
|
public class JobUsageRecord extends RawUsageRecord implements SingleUsageRecord {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated Serial Version UID
|
* Generated Serial Version UID
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
package org.gcube.accounting.datamodel.implementations;
|
package org.gcube.accounting.datamodel.implementations;
|
||||||
|
|
||||||
import org.gcube.accounting.datamodel.RawUsageRecord;
|
import org.gcube.accounting.datamodel.RawUsageRecord;
|
||||||
|
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
||||||
import org.gcube.accounting.exception.InvalidValueException;
|
import org.gcube.accounting.exception.InvalidValueException;
|
||||||
|
|
||||||
|
@ -11,7 +12,7 @@ import org.gcube.accounting.exception.InvalidValueException;
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PortletUsageRecord extends RawUsageRecord {
|
public class PortletUsageRecord extends RawUsageRecord implements SingleUsageRecord {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated Serial Version UID
|
* Generated Serial Version UID
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
package org.gcube.accounting.datamodel.implementations;
|
package org.gcube.accounting.datamodel.implementations;
|
||||||
|
|
||||||
import org.gcube.accounting.datamodel.RawUsageRecord;
|
import org.gcube.accounting.datamodel.RawUsageRecord;
|
||||||
|
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
||||||
import org.gcube.accounting.datamodel.annotations.ValidIP;
|
import org.gcube.accounting.datamodel.annotations.ValidIP;
|
||||||
import org.gcube.accounting.datamodel.annotations.ValidInteger;
|
import org.gcube.accounting.datamodel.annotations.ValidInteger;
|
||||||
|
@ -13,7 +14,7 @@ import org.gcube.accounting.exception.InvalidValueException;
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ServiceUsageRecord extends RawUsageRecord {
|
public class ServiceUsageRecord extends RawUsageRecord implements SingleUsageRecord {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated Serial Version UID
|
* Generated Serial Version UID
|
||||||
|
|
|
@ -3,19 +3,20 @@
|
||||||
*/
|
*/
|
||||||
package org.gcube.accounting.datamodel.implementations;
|
package org.gcube.accounting.datamodel.implementations;
|
||||||
|
|
||||||
import org.gcube.accounting.datamodel.aggregated.StorageStatusUsageRecord;
|
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
||||||
import org.gcube.accounting.datamodel.annotations.NotEmptyIfNotNull;
|
import org.gcube.accounting.datamodel.annotations.NotEmptyIfNotNull;
|
||||||
import org.gcube.accounting.datamodel.annotations.ValidIP;
|
import org.gcube.accounting.datamodel.annotations.ValidIP;
|
||||||
import org.gcube.accounting.datamodel.annotations.ValidInteger;
|
import org.gcube.accounting.datamodel.annotations.ValidInteger;
|
||||||
import org.gcube.accounting.datamodel.annotations.ValidLong;
|
import org.gcube.accounting.datamodel.annotations.ValidLong;
|
||||||
|
import org.gcube.accounting.datamodel.implementations.aggregated.StorageStatusUsageRecord;
|
||||||
import org.gcube.accounting.exception.InvalidValueException;
|
import org.gcube.accounting.exception.InvalidValueException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class StorageUsageUsageRecord extends StorageStatusUsageRecord {
|
public class StorageUsageUsageRecord extends StorageStatusUsageRecord implements SingleUsageRecord {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated Serial Version UID
|
* Generated Serial Version UID
|
||||||
|
|
|
@ -6,6 +6,7 @@ package org.gcube.accounting.datamodel.implementations;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
import org.gcube.accounting.datamodel.RawUsageRecord;
|
import org.gcube.accounting.datamodel.RawUsageRecord;
|
||||||
|
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
||||||
import org.gcube.accounting.datamodel.annotations.ValidInteger;
|
import org.gcube.accounting.datamodel.annotations.ValidInteger;
|
||||||
import org.gcube.accounting.datamodel.annotations.ValidLong;
|
import org.gcube.accounting.datamodel.annotations.ValidLong;
|
||||||
|
@ -15,7 +16,7 @@ import org.gcube.accounting.exception.InvalidValueException;
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TaskUsageRecord extends RawUsageRecord {
|
public class TaskUsageRecord extends RawUsageRecord implements SingleUsageRecord {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated Serial Version UID
|
* Generated Serial Version UID
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
package org.gcube.accounting.datamodel.aggregated;
|
package org.gcube.accounting.datamodel.implementations.aggregated;
|
||||||
|
|
||||||
import org.gcube.accounting.datamodel.RawUsageRecord;
|
import org.gcube.accounting.datamodel.RawUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
import org.gcube.accounting.datamodel.annotations.NotEmpty;
|
||||||
|
@ -11,7 +11,6 @@ import org.gcube.accounting.exception.InvalidValueException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class StorageStatusUsageRecord extends RawUsageRecord {
|
public class StorageStatusUsageRecord extends RawUsageRecord {
|
||||||
|
|
Loading…
Reference in New Issue