if (files != null) {
for (File archiveFile : files) {
if (!archiveFile.isDirectory()) {
try {
ViewConfig viewConfig = helper.getViewConfigFromArchive(archiveFile);
String viewName = ViewEntity.getViewName(viewConfig.getName(), viewConfig.getVersion());
String archivePath = extractedArchivesPath + File.separator + viewName;
// extract the archive and get the class loader
ClassLoader cl = extractViewArchive(archiveFile, helper.getFile(archivePath));
ViewEntity viewDefinition = installView(viewConfig, configuration, cl, archivePath);
for (InstanceConfig instanceConfig : viewConfig.getInstances()) {
ViewInstanceEntity viewInstanceDefinition =
new ViewInstanceEntity(viewDefinition, instanceConfig);
for (PropertyConfig propertyConfig : instanceConfig.getProperties()) {
viewInstanceDefinition.putProperty(propertyConfig.getKey(), propertyConfig.getValue());