117 lines
3.3 KiB
Java
117 lines
3.3 KiB
Java
/**
|
|
*
|
|
*/
|
|
package org.gcube.accounting.datamodel.implementations;
|
|
|
|
import org.gcube.accounting.datamodel.RawUsageRecord;
|
|
import org.gcube.accounting.exception.InvalidValueException;
|
|
import org.gcube.common.validator.annotations.NotEmpty;
|
|
|
|
/**
|
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
|
*
|
|
*/
|
|
public class ServiceUsageRecord extends RawUsageRecord {
|
|
|
|
/**
|
|
* Generated Serial Version UID
|
|
*/
|
|
private static final long serialVersionUID = -4214891294699473587L;
|
|
|
|
@NotEmpty
|
|
public static final String CALLER_IP = "callerIP";
|
|
@NotEmpty
|
|
public static final String CALLER_SCOPE = "callerScope";
|
|
@NotEmpty
|
|
public static final String REF_HOST = "refHost";
|
|
@NotEmpty
|
|
public static final String REF_VM = "refVM";
|
|
@NotEmpty
|
|
public static final String DOMAIN = "domain";
|
|
@NotEmpty
|
|
public static final String INVOCATION_COUNT = "invocationCount";
|
|
@NotEmpty
|
|
public static final String AVERAGE_INVOCATION_COUNT = "averageInvocationTime";
|
|
@NotEmpty
|
|
public static final String SERVICE_CLASS = "serviceClass";
|
|
@NotEmpty
|
|
public static final String SERVICE_NAME = "serviceName";
|
|
|
|
public ServiceUsageRecord(){
|
|
super();
|
|
}
|
|
|
|
public String getCallerIP() {
|
|
return (String) this.resourceSpecificProperties.get(CALLER_IP);
|
|
}
|
|
|
|
public void setCallerIP(String callerIP) throws InvalidValueException {
|
|
setResourceSpecificProperty(CALLER_IP, callerIP);
|
|
}
|
|
|
|
public String getCallerScope() {
|
|
return (String) this.resourceSpecificProperties.get(CALLER_SCOPE);
|
|
}
|
|
|
|
public void setCallerScope(String callerScope) throws InvalidValueException {
|
|
setResourceSpecificProperty(CALLER_SCOPE, callerScope);
|
|
}
|
|
|
|
public String getRefHost() {
|
|
return (String) this.resourceSpecificProperties.get(REF_HOST);
|
|
}
|
|
|
|
public void setRefHost(String refHost) throws InvalidValueException {
|
|
setResourceSpecificProperty(REF_HOST, refHost);
|
|
}
|
|
|
|
public String getRefVM() {
|
|
return (String) this.resourceSpecificProperties.get(REF_VM);
|
|
}
|
|
|
|
public void setRefVM(String refVM) throws InvalidValueException {
|
|
setResourceSpecificProperty(REF_VM, refVM);
|
|
}
|
|
|
|
public String getDomain() {
|
|
return (String) this.resourceSpecificProperties.get(DOMAIN);
|
|
}
|
|
|
|
public void setDomain(String domain) throws InvalidValueException {
|
|
setResourceSpecificProperty(DOMAIN, domain);
|
|
}
|
|
|
|
public String getInvocationCount() {
|
|
return (String) this.resourceSpecificProperties.get(INVOCATION_COUNT);
|
|
}
|
|
|
|
public void setInvocationCount(String invocationCount) throws InvalidValueException {
|
|
setResourceSpecificProperty(INVOCATION_COUNT, invocationCount);
|
|
}
|
|
|
|
public String getAverageInvocationTime() {
|
|
return (String) this.resourceSpecificProperties.get(AVERAGE_INVOCATION_COUNT);
|
|
}
|
|
|
|
public void setAverageInvocationTime(String averageInvocationTime) throws InvalidValueException {
|
|
setResourceSpecificProperty(AVERAGE_INVOCATION_COUNT, averageInvocationTime);
|
|
}
|
|
|
|
public String getServiceClass() {
|
|
return (String) this.resourceSpecificProperties.get(SERVICE_CLASS);
|
|
}
|
|
|
|
public void setServiceClass(String serviceClass) throws InvalidValueException {
|
|
setResourceSpecificProperty(SERVICE_CLASS, serviceClass);
|
|
}
|
|
|
|
public String getServiceName() {
|
|
return (String) this.resourceSpecificProperties.get(SERVICE_NAME);
|
|
}
|
|
|
|
public void setServiceName(String serviceName) throws InvalidValueException {
|
|
setResourceSpecificProperty(SERVICE_NAME, serviceName);
|
|
}
|
|
|
|
}
|