From 7c5c3c5dfcc985dfd6dd890c96fa840a2bac3e0e Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Wed, 9 Jan 2013 05:43:41 -0800 Subject: [PATCH] api: Re-add deleted addProxyObject method on CloudException - This was removed part of the response work - Re-adding as this kind of method definition is available in several other exception classes and is used in a lot of cmd classes and in service layer - TODO: We need to find a way to replace old code and refactor method with the new definition that gets only uuid. - FIXME: Some tables don't have uuid for ex. ClusterVSMMapVO, in this case we should keep the method until we find a way to fix this issue Partially reverting a88ce6bb7f495dddeb954d1fc7826176646b3590 Signed-off-by: Rohit Yadav --- api/src/com/cloud/exception/CloudException.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/src/com/cloud/exception/CloudException.java b/api/src/com/cloud/exception/CloudException.java index fd839565253..2ec61420cee 100644 --- a/api/src/com/cloud/exception/CloudException.java +++ b/api/src/com/cloud/exception/CloudException.java @@ -56,6 +56,15 @@ public class CloudException extends Exception { return; } + public void addProxyObject(Object voObj, Long id, String idFieldName) { + // Get the VO object's table name. + String tablename = AnnotationHelper.getTableName(voObj); + if (tablename != null) { + addProxyObject(tablename, id, idFieldName); + } + return; + } + public ArrayList getIdProxyList() { return idList; }