}
return element;
}
protected GraphicElement createDefaultGallery() throws Exception {
ResourceGallery gallery = new ResourceGallery();
gallery.setId("default");
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ZipOutputStream zos = new ZipOutputStream(bos);
ZipEntry entry= new ZipEntry(ResourceGallery.DESCRIPTOR_FILENAME);
zos.putNextEntry(entry);
Properties prop = new Properties();
//TODO: Make it external
prop.setProperty("name.es","Im\u00e1genes subidas");
prop.setProperty("name.en","Uploaded images");
prop.setProperty("name.ca","Imatges pujades");
prop.store(zos,"");
zos.closeEntry();
zos.close();
gallery.setZipFile(bos.toByteArray());
this.createOrUpdate(gallery);
return gallery;
}