/** * Deploys the specified ZIP file to this container. * * @param zipDeployment * The ZIP file. * @param permissions * The permissions to be granted for classes of this classpath. * @throws LimbusException * Thrown on any error while unpacking or deploying this ZIP file. */ @Override public void deployZipFile(File zipDeployment, Set<Permission> permissions) throws LimbusException { checkState(); String deployName = toDeployName(zipDeployment.getName()); if (hasPlugin(deployName)) { throw new LimbusException(String.format("The plugin '%s' is already deployed.", deployName)); } try { File deployDirectory = getCreateOrFailPluginDirectory(deployName); Zip.unpack(zipDeployment, deployDirectory); } catch (Exception e) { throw new LimbusException(String.format("Cannot unpack ZIP plugin bundle %s", zipDeployment.getAbsolutePath()), e); } // Trigger deploy deployFromFilesystem(deployName, permissions); }
deployFromFilesystem(deployName, permissions);