/** * @deprecated since 0.5.0; instead rely on {@link DownloadResolverManager} to include local-repo, such as: * * <pre> * {@code * DownloadResolver resolver = entity.getManagementContext().getEntityDownloadsManager().resolve(this); List<String> urls = resolver.getTargets(); * } * </pre> */ protected String getEntityVersionLabel() { return getEntityVersionLabel("_"); }
public String getInstallDir() { // Cache it; evaluate lazily (and late) to ensure managementContext.config is accessible and completed its setup // Caching has the benefit that the driver is usable, even if the entity is unmanaged (useful in some tests!) if (installDir == null) { String installBasedir = ((EntityInternal)entity).getManagementContext().getConfig().getFirst("brooklyn.dirs.install"); if (installBasedir == null) installBasedir = DEFAULT_INSTALL_BASEDIR; if (installBasedir.endsWith(File.separator)) installBasedir.substring(0, installBasedir.length()-1); installDir = elvis(entity.getConfig(SoftwareProcess.SUGGESTED_INSTALL_DIR), installBasedir+"/"+getEntityVersionLabel("/")); } return installDir; }
public String getRunDir() { if (runDir == null) { String runBasedir = ((EntityInternal)entity).getManagementContext().getConfig().getFirst("brooklyn.dirs.run"); if (runBasedir == null) runBasedir = DEFAULT_RUN_BASEDIR; if (runBasedir.endsWith(File.separator)) runBasedir.substring(0, runBasedir.length()-1); runDir = elvis(entity.getConfig(SoftwareProcess.SUGGESTED_RUN_DIR), runBasedir+"/"+entity.getApplication().getId()+"/"+"entities"+"/"+ getEntityVersionLabel()+"_"+entity.getId()); } return runDir; }