1919package com .cloud .storage ;
2020
2121import java .util .Date ;
22+ import java .util .Map ;
2223import java .util .UUID ;
2324
2425import javax .persistence .Column ;
@@ -122,9 +123,10 @@ public class VMTemplateVO implements VirtualMachineTemplate, Identity {
122123 @ Column (name ="uuid" )
123124 private String uuid ;
124125
125-
126126 @ Column (name ="sort_key" )
127127 int sortKey ;
128+
129+ Map details ;
128130
129131 @ Override
130132 public String getUniqueName () {
@@ -142,13 +144,13 @@ protected VMTemplateVO() {
142144 /**
143145 * Proper constructor for a new vm template.
144146 */
145- public VMTemplateVO (long id , String name , ImageFormat format , boolean isPublic , boolean featured , boolean isExtractable , TemplateType type , String url , boolean requiresHvm , int bits , long accountId , String cksum , String displayText , boolean enablePassword , long guestOSId , boolean bootable , HypervisorType hyperType ) {
146- this (id , generateUniqueName (id , accountId , name ), name , format , isPublic , featured , isExtractable , type , url , null , requiresHvm , bits , accountId , cksum , displayText , enablePassword , guestOSId , bootable , hyperType );
147+ public VMTemplateVO (long id , String name , ImageFormat format , boolean isPublic , boolean featured , boolean isExtractable , TemplateType type , String url , boolean requiresHvm , int bits , long accountId , String cksum , String displayText , boolean enablePassword , long guestOSId , boolean bootable , HypervisorType hyperType , Map details ) {
148+ this (id , generateUniqueName (id , accountId , name ), name , format , isPublic , featured , isExtractable , type , url , null , requiresHvm , bits , accountId , cksum , displayText , enablePassword , guestOSId , bootable , hyperType , details );
147149 this .uuid = UUID .randomUUID ().toString ();
148150 }
149151
150- public VMTemplateVO (long id , String name , ImageFormat format , boolean isPublic , boolean featured , boolean isExtractable , TemplateType type , String url , boolean requiresHvm , int bits , long accountId , String cksum , String displayText , boolean enablePassword , long guestOSId , boolean bootable , HypervisorType hyperType , String templateTag ) {
151- this (id , name , format , isPublic , featured , isExtractable , type , url , requiresHvm , bits , accountId , cksum , displayText , enablePassword , guestOSId , bootable , hyperType );
152+ public VMTemplateVO (long id , String name , ImageFormat format , boolean isPublic , boolean featured , boolean isExtractable , TemplateType type , String url , boolean requiresHvm , int bits , long accountId , String cksum , String displayText , boolean enablePassword , long guestOSId , boolean bootable , HypervisorType hyperType , String templateTag , Map details ) {
153+ this (id , name , format , isPublic , featured , isExtractable , type , url , requiresHvm , bits , accountId , cksum , displayText , enablePassword , guestOSId , bootable , hyperType , details );
152154 this .templateTag = templateTag ;
153155 this .uuid = UUID .randomUUID ().toString ();
154156 }
@@ -176,14 +178,15 @@ public VMTemplateVO(Long id, String uniqueName, String name, ImageFormat format,
176178 }
177179
178180 // Has an extra attribute - isExtractable
179- public VMTemplateVO (Long id , String uniqueName , String name , ImageFormat format , boolean isPublic , boolean featured , boolean isExtractable , TemplateType type , String url , Date created , boolean requiresHvm , int bits , long accountId , String cksum , String displayText , boolean enablePassword , long guestOSId , boolean bootable , HypervisorType hyperType ) {
181+ public VMTemplateVO (Long id , String uniqueName , String name , ImageFormat format , boolean isPublic , boolean featured , boolean isExtractable , TemplateType type , String url , Date created , boolean requiresHvm , int bits , long accountId , String cksum , String displayText , boolean enablePassword , long guestOSId , boolean bootable , HypervisorType hyperType , Map details ) {
180182 this (id , uniqueName , name , format , isPublic , featured , type , url , created , requiresHvm , bits , accountId , cksum , displayText , enablePassword , guestOSId , bootable , hyperType );
181183 this .extractable = isExtractable ;
182184 this .uuid = UUID .randomUUID ().toString ();
185+ this .details = details ;
183186 }
184187
185- public VMTemplateVO (Long id , String uniqueName , String name , ImageFormat format , boolean isPublic , boolean featured , boolean isExtractable , TemplateType type , String url , Date created , boolean requiresHvm , int bits , long accountId , String cksum , String displayText , boolean enablePassword , long guestOSId , boolean bootable , HypervisorType hyperType , String templateTag ) {
186- this (id , uniqueName , name , format , isPublic , featured , isExtractable , type , url , created , requiresHvm , bits , accountId , cksum , displayText , enablePassword , guestOSId , bootable , hyperType );
188+ public VMTemplateVO (Long id , String uniqueName , String name , ImageFormat format , boolean isPublic , boolean featured , boolean isExtractable , TemplateType type , String url , Date created , boolean requiresHvm , int bits , long accountId , String cksum , String displayText , boolean enablePassword , long guestOSId , boolean bootable , HypervisorType hyperType , String templateTag , Map details ) {
189+ this (id , uniqueName , name , format , isPublic , featured , isExtractable , type , url , created , requiresHvm , bits , accountId , cksum , displayText , enablePassword , guestOSId , bootable , hyperType , details );
187190 this .templateTag = templateTag ;
188191 this .uuid = UUID .randomUUID ().toString ();
189192 }
@@ -404,6 +407,14 @@ public String getUuid() {
404407 public void setUuid (String uuid ) {
405408 this .uuid = uuid ;
406409 }
410+
411+ public Map getDetails () {
412+ return this .details ;
413+ }
414+
415+ public void setDetails (Map details ) {
416+ this .details = details ;
417+ }
407418
408419 @ Override
409420 public boolean equals (Object that ) {
0 commit comments