refs #200: Create accouting-lib library

https://support.d4science.org/issues/200
Fixing model

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@115591 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2015-06-26 15:09:55 +00:00
parent 7d9586bec0
commit 8f5f7b369a
3 changed files with 4 additions and 86 deletions

View File

@ -1,81 +0,0 @@
/**
*
*/
package org.gcube.accounting.datamodel.aggregation;
import org.gcube.accounting.datamodel.BasicUsageRecord;
/*
import org.gcube.accounting.datamodel.validations.annotations.NotEmpty;
import org.gcube.accounting.datamodel.validations.annotations.ValidInteger;
import org.gcube.accounting.datamodel.validations.annotations.ValidLong;
import org.gcube.accounting.exception.InvalidValueException;
*/
/**
* This Class is for library internal use only
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
*/
@Deprecated
public class StorageStatusUsageRecord extends BasicUsageRecord {
/**
* Generated Serial Version UID
*/
private static final long serialVersionUID = 2456314684466092685L;
/*
@NotEmpty
public static final String PROVIDER_ID = "providerId";
@NotEmpty
public static final String QUALIFIER = "qualifier";
@NotEmpty
public static final String DATA_TYPE = "dataType";
@ValidLong
public static final String DATA_VOLUME = "dataVolume";
@ValidInteger
public static final String DATA_COUNT = "dataCount";
public StorageStatusUsageRecord(){
super();
}
public String getProviderId() {
return (String) this.resourceProperties.get(PROVIDER_ID);
}
public void setProviderId(String providerId) throws InvalidValueException {
setResourceProperty(PROVIDER_ID, providerId);
}
public String getQualifier() {
return (String) this.resourceProperties.get(QUALIFIER);
}
public void setQualifier(String qualifier) throws InvalidValueException {
setResourceProperty(QUALIFIER, qualifier);
}
public String getDataType() {
return (String) this.resourceProperties.get(DATA_TYPE);
}
public void setDataType(String dataType) throws InvalidValueException {
setResourceProperty(DATA_TYPE, dataType);
}
public long getDataVolume() {
return (Long) this.resourceProperties.get(DATA_VOLUME);
}
public void setDataVolume(long dataVolume) throws InvalidValueException {
setResourceProperty(DATA_VOLUME, dataVolume);
}
public int getDataCount() {
return (Integer) this.resourceProperties.get(DATA_COUNT);
}
public void setDataCount(int dataCount) throws InvalidValueException {
setResourceProperty(DATA_COUNT, dataCount);
}
*/
}

View File

@ -24,6 +24,7 @@ public class StorageUsageRecordAggregationStrategy extends AggregationStrategy<S
this.aggregationField.add(StorageUsageRecord.PROVIDER_URI);
this.aggregationField.add(StorageUsageRecord.OPERATION_TYPE);
this.aggregationField.add(StorageUsageRecord.DATA_TYPE);
this.aggregationField.add(StorageUsageRecord.QUALIFIER);
}
protected StorageUsageRecord reallyAggregate(StorageUsageRecord record)

View File

@ -11,6 +11,7 @@ import org.gcube.accounting.datamodel.BasicUsageRecord;
import org.gcube.accounting.datamodel.SingleUsageRecord;
import org.gcube.accounting.datamodel.decorators.RequiredField;
import org.gcube.accounting.datamodel.validations.annotations.NotEmpty;
import org.gcube.accounting.datamodel.validations.annotations.NotEmptyIfNotNull;
import org.gcube.accounting.datamodel.validations.annotations.ValidDataType;
import org.gcube.accounting.datamodel.validations.annotations.ValidLong;
import org.gcube.accounting.datamodel.validations.annotations.ValidOperationType;
@ -102,7 +103,6 @@ public class StorageUsageRecord extends BasicUsageRecord implements SingleUsageR
*/
@NotEmptyIfNotNull
public static final String QUALIFIER = "qualifier";
*/
public StorageUsageRecord() {
super();
@ -185,7 +185,6 @@ public class StorageUsageRecord extends BasicUsageRecord implements SingleUsageR
setResourceProperty(DATA_VOLUME, dataVolume);
}
/*
public String getQualifier() {
return (String) this.resourceProperties.get(QUALIFIER);
}
@ -193,6 +192,5 @@ public class StorageUsageRecord extends BasicUsageRecord implements SingleUsageR
public void setQualifier(String qualifier) throws InvalidValueException {
setResourceProperty(QUALIFIER, qualifier);
}
*/
}