2015-05-28 13:19:25 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
package org.gcube.accounting.datamodel.implementations;
|
|
|
|
|
|
|
|
import org.gcube.accounting.datamodel.RawUsageRecord;
|
2015-06-05 14:43:04 +02:00
|
|
|
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
2015-06-08 17:30:08 +02:00
|
|
|
import org.gcube.accounting.datamodel.decorators.RequiredField;
|
2015-06-09 10:41:32 +02:00
|
|
|
import org.gcube.accounting.datamodel.deprecationmanagement.annotations.DeprecatedWarning;
|
2015-06-08 17:19:09 +02:00
|
|
|
import org.gcube.accounting.datamodel.validations.annotations.NotEmpty;
|
|
|
|
import org.gcube.accounting.datamodel.validations.annotations.NotEmptyIfNotNull;
|
2015-05-29 16:08:21 +02:00
|
|
|
import org.gcube.accounting.exception.InvalidValueException;
|
2015-05-28 13:19:25 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
|
|
|
*
|
|
|
|
*/
|
2015-06-05 14:43:04 +02:00
|
|
|
public class PortletUsageRecord extends RawUsageRecord implements SingleUsageRecord {
|
2015-05-28 13:19:25 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Generated Serial Version UID
|
|
|
|
*/
|
|
|
|
private static final long serialVersionUID = 8339324883678974869L;
|
|
|
|
|
2015-06-08 18:20:02 +02:00
|
|
|
@DeprecatedWarning @NotEmptyIfNotNull
|
2015-06-05 18:50:07 +02:00
|
|
|
protected static final String USER_ID = "userId";
|
|
|
|
|
2015-06-08 17:30:08 +02:00
|
|
|
@RequiredField @NotEmpty
|
2015-06-05 18:50:07 +02:00
|
|
|
public static final String PORTLET_ID = "portletId";
|
2015-06-08 17:30:08 +02:00
|
|
|
@RequiredField @NotEmpty
|
2015-05-28 13:19:25 +02:00
|
|
|
public static final String OPERATION_ID = "operationId";
|
2015-06-05 18:50:07 +02:00
|
|
|
// TODO More
|
2015-05-28 13:19:25 +02:00
|
|
|
|
|
|
|
public PortletUsageRecord(){
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
2015-06-05 18:50:07 +02:00
|
|
|
@Deprecated
|
2015-05-29 16:08:21 +02:00
|
|
|
public String getUserId() {
|
|
|
|
return (String) this.resourceSpecificProperties.get(USER_ID);
|
|
|
|
}
|
|
|
|
|
2015-06-05 18:50:07 +02:00
|
|
|
@Deprecated
|
2015-05-29 16:08:21 +02:00
|
|
|
public void setUserId(String userId) throws InvalidValueException {
|
|
|
|
setResourceSpecificProperty(USER_ID, userId);
|
|
|
|
}
|
|
|
|
|
2015-06-05 18:50:07 +02:00
|
|
|
public String getPortletId() {
|
|
|
|
return (String) this.resourceSpecificProperties.get(PORTLET_ID);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setPortletId(String portletId) throws InvalidValueException {
|
|
|
|
setResourceSpecificProperty(PORTLET_ID, portletId);
|
|
|
|
}
|
|
|
|
|
2015-05-29 16:08:21 +02:00
|
|
|
public String getOperationId() {
|
|
|
|
return (String) this.resourceSpecificProperties.get(OPERATION_ID);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setOperationId(String operationId) throws InvalidValueException {
|
|
|
|
setResourceSpecificProperty(OPERATION_ID, operationId);
|
|
|
|
}
|
|
|
|
|
2015-05-28 13:19:25 +02:00
|
|
|
}
|