Updated Branches: refs/heads/master 2eee2cd99 -> 7c5c3c5df
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 <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/7c5c3c5d Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/7c5c3c5d Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/7c5c3c5d Branch: refs/heads/master Commit: 7c5c3c5dfcc985dfd6dd890c96fa840a2bac3e0e Parents: 2eee2cd Author: Rohit Yadav <[email protected]> Authored: Wed Jan 9 05:43:41 2013 -0800 Committer: Rohit Yadav <[email protected]> Committed: Wed Jan 9 05:43:41 2013 -0800 ---------------------------------------------------------------------- api/src/com/cloud/exception/CloudException.java | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7c5c3c5d/api/src/com/cloud/exception/CloudException.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/exception/CloudException.java b/api/src/com/cloud/exception/CloudException.java index fd83956..2ec6142 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<String> getIdProxyList() { return idList; }
