return new Action() {
@Override
protected Object doAction(Object... params) {
String policyId = (String) params[0];
AuthIdsNoIdType authIds = (AuthIdsNoIdType) params[1];
if(authIds.getId() == null || authIds.getId().equals("")) {
// create the id
authIds.setId(UUID.randomUUID().toString());
}
if(LOG.isDebugEnabled()) {
LOG.debug("Create bucket:", authIds.getId());
}
com.alu.e3.data.model.sub.QuotaRLBucket authIdsDataModel = BeanConverterUtil.toDataModel(authIds);
dataManager.createBucket(policyId, authIdsDataModel);
PolicyResponse response = new PolicyResponse(PolicyResponse.SUCCESS);
response.setId(authIds.getId());
return response;
}
};
}