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:
parent
7d9586bec0
commit
8f5f7b369a
|
@ -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);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
|
@ -24,6 +24,7 @@ public class StorageUsageRecordAggregationStrategy extends AggregationStrategy<S
|
||||||
this.aggregationField.add(StorageUsageRecord.PROVIDER_URI);
|
this.aggregationField.add(StorageUsageRecord.PROVIDER_URI);
|
||||||
this.aggregationField.add(StorageUsageRecord.OPERATION_TYPE);
|
this.aggregationField.add(StorageUsageRecord.OPERATION_TYPE);
|
||||||
this.aggregationField.add(StorageUsageRecord.DATA_TYPE);
|
this.aggregationField.add(StorageUsageRecord.DATA_TYPE);
|
||||||
|
this.aggregationField.add(StorageUsageRecord.QUALIFIER);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected StorageUsageRecord reallyAggregate(StorageUsageRecord record)
|
protected StorageUsageRecord reallyAggregate(StorageUsageRecord record)
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.gcube.accounting.datamodel.BasicUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.decorators.RequiredField;
|
import org.gcube.accounting.datamodel.decorators.RequiredField;
|
||||||
import org.gcube.accounting.datamodel.validations.annotations.NotEmpty;
|
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.ValidDataType;
|
||||||
import org.gcube.accounting.datamodel.validations.annotations.ValidLong;
|
import org.gcube.accounting.datamodel.validations.annotations.ValidLong;
|
||||||
import org.gcube.accounting.datamodel.validations.annotations.ValidOperationType;
|
import org.gcube.accounting.datamodel.validations.annotations.ValidOperationType;
|
||||||
|
@ -96,13 +97,12 @@ public class StorageUsageRecord extends BasicUsageRecord implements SingleUsageR
|
||||||
public static final String DATA_VOLUME = "dataVolume";
|
public static final String DATA_VOLUME = "dataVolume";
|
||||||
|
|
||||||
|
|
||||||
/* *
|
/**
|
||||||
* KEY for : Qualifies the data in terms of data (e.g. MIME type for the
|
* KEY for : Qualifies the data in terms of data (e.g. MIME type for the
|
||||||
* Storage, domain for a database)
|
* Storage, domain for a database)
|
||||||
* /
|
*/
|
||||||
@NotEmptyIfNotNull
|
@NotEmptyIfNotNull
|
||||||
public static final String QUALIFIER = "qualifier";
|
public static final String QUALIFIER = "qualifier";
|
||||||
*/
|
|
||||||
|
|
||||||
public StorageUsageRecord() {
|
public StorageUsageRecord() {
|
||||||
super();
|
super();
|
||||||
|
@ -185,7 +185,6 @@ public class StorageUsageRecord extends BasicUsageRecord implements SingleUsageR
|
||||||
setResourceProperty(DATA_VOLUME, dataVolume);
|
setResourceProperty(DATA_VOLUME, dataVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
public String getQualifier() {
|
public String getQualifier() {
|
||||||
return (String) this.resourceProperties.get(QUALIFIER);
|
return (String) this.resourceProperties.get(QUALIFIER);
|
||||||
}
|
}
|
||||||
|
@ -193,6 +192,5 @@ public class StorageUsageRecord extends BasicUsageRecord implements SingleUsageR
|
||||||
public void setQualifier(String qualifier) throws InvalidValueException {
|
public void setQualifier(String qualifier) throws InvalidValueException {
|
||||||
setResourceProperty(QUALIFIER, qualifier);
|
setResourceProperty(QUALIFIER, qualifier);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue