refs #200: Create accouting-lib library

https://support.d4science.org/issues/200
Implementing library

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@115296 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2015-06-10 13:23:12 +00:00
parent 3164a8e66c
commit 1378ba1bb3
2 changed files with 8 additions and 6 deletions

View File

@ -64,10 +64,10 @@ public class PortletUsageRecord extends RawUsageRecord implements SingleUsageRec
super(properties); super(properties);
} }
/** /* *
* Use {@link #getConsumerId()} instead * Use {@link #getConsumerId()} instead
* @return the Consumer ID * @return the Consumer ID
*/ * /
@Deprecated @Deprecated
public String getUserId() { public String getUserId() {
return (String) this.resourceProperties.get(CONSUMER_ID); return (String) this.resourceProperties.get(CONSUMER_ID);
@ -78,12 +78,13 @@ public class PortletUsageRecord extends RawUsageRecord implements SingleUsageRec
* {@link #setConsumerId()} instead. * {@link #setConsumerId()} instead.
* @param userId Consumer Id * @param userId Consumer Id
* @throws InvalidValueException if fails * @throws InvalidValueException if fails
*/ * /
@Deprecated @Deprecated
public void setUserId(String userId) throws InvalidValueException { public void setUserId(String userId) throws InvalidValueException {
setResourceProperty(USER_ID, userId); setResourceProperty(USER_ID, userId);
} }
*/
public String getPortletId() { public String getPortletId() {
return (String) this.resourceProperties.get(PORTLET_ID); return (String) this.resourceProperties.get(PORTLET_ID);

View File

@ -36,7 +36,7 @@ public class ServiceUsageRecord extends RawUsageRecord implements SingleUsageRec
@RequiredField @NotEmpty @RequiredField @NotEmpty
public static final String REF_VM = "refVM"; public static final String REF_VM = "refVM";
@NotEmpty @DeprecatedWarning @NotEmpty @DeprecatedWarning
public static final String DOMAIN = "domain"; protected static final String DOMAIN = "domain";
@ValidInteger @AggregatedField @ValidInteger @AggregatedField
protected static final String INVOCATION_COUNT = "invocationCount"; protected static final String INVOCATION_COUNT = "invocationCount";
@ValidInteger @AggregatedField @ValidInteger @AggregatedField
@ -85,7 +85,7 @@ public class ServiceUsageRecord extends RawUsageRecord implements SingleUsageRec
public void setRefVM(String refVM) throws InvalidValueException { public void setRefVM(String refVM) throws InvalidValueException {
setResourceProperty(REF_VM, refVM); setResourceProperty(REF_VM, refVM);
} }
/*
protected String getDomain() { protected String getDomain() {
return (String) this.resourceProperties.get(DOMAIN); return (String) this.resourceProperties.get(DOMAIN);
} }
@ -109,7 +109,8 @@ public class ServiceUsageRecord extends RawUsageRecord implements SingleUsageRec
public void setAverageInvocationTime(String averageInvocationTime) throws InvalidValueException { public void setAverageInvocationTime(String averageInvocationTime) throws InvalidValueException {
setResourceProperty(AVERAGE_INVOCATION_COUNT, averageInvocationTime); setResourceProperty(AVERAGE_INVOCATION_COUNT, averageInvocationTime);
} }
*/
public String getServiceClass() { public String getServiceClass() {
return (String) this.resourceProperties.get(SERVICE_CLASS); return (String) this.resourceProperties.get(SERVICE_CLASS);
} }