From be70906b2c604db5f534f3ef10f5aae2f8e1e113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Tue, 28 Jul 2015 18:17:50 +0200 Subject: [PATCH] Feature #1727: New option extend for java oca Template info --- .../opennebula/client/template/Template.java | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/oca/java/src/org/opennebula/client/template/Template.java b/src/oca/java/src/org/opennebula/client/template/Template.java index 7ce30778e9..d5a913ef13 100644 --- a/src/oca/java/src/org/opennebula/client/template/Template.java +++ b/src/oca/java/src/org/opennebula/client/template/Template.java @@ -84,7 +84,22 @@ public class Template extends PoolElement */ public static OneResponse info(Client client, int id) { - return client.call(INFO, id); + return info(client, id, false); + } + + /** + * Retrieves the information of the given Template. + * + * @param client XML-RPC Client. + * @param id The template id for the template to retrieve the information from + * @param extended optional flag to process the template and include + * extended information, such as the SIZE for each DISK + * @return If successful the message contains the string + * with the information returned by OpenNebula. + */ + public static OneResponse info(Client client, int id, boolean extended) + { + return client.call(INFO, id, extended); } /** @@ -251,7 +266,20 @@ public class Template extends PoolElement */ public OneResponse info() { - OneResponse response = info(client, id); + return info(false); + } + + /** + * Retrieves the information of the given Template. + * + * @param extended optional flag to process the template and include + * extended information, such as the SIZE for each DISK + * @return If successful the message contains the string + * with the information returned by OpenNebula. + */ + public OneResponse info(boolean extended) + { + OneResponse response = info(client, id, extended); super.processInfo(response); return response; }