Falls back to DataAccess version control for asset versioning.
169272
private VersionControl getAssetVersionControl() throws IOException, DataAccessException {
        VersionControl vc = getVersionControl();
        if (vc == null)
            vc = DataAccess.getAssetVersionControl(assetRoot);
        return vc;
    }
1258759
def contracts_data_path(version: Optional[str] = None):
    """"""
    if version is None:
        return _BASE.joinpath('data')
    return _BASE.joinpath(f'data_{version}')
366645
@ApiModelProperty(hidden=true)
    public AssetFile getAssetFile(File file, AssetRevision rev) throws IOException {
        AssetFile assetFile;
        if (rev == null) {
            rev = versionControl.getRevision(file);
            if (rev == null) {
                // presumably dropped-in asset
                rev = new AssetRevision();
                rev.setVersion(0);
                rev.setModDate(new Date());
            }
            assetFile = new AssetFile(this, file.getName(), rev);
            assetFile.setRevision(rev);
        }
        else {
            versionControl.setRevision(file, rev);
            assetFile = new AssetFile(this, file.getName(), rev);
            versionControl.clearId(assetFile);
        }
        assetFile.setId(versionControl.getId(assetFile.getLogicalFile()));
        assetFiles.put(assetFile.getLogicalFile(), assetFile);
        return assetFile;
    }
197202
public void rollback() {
        try {
            log.debug("Rolling back modifyAttributes operation");
            ldapOperations.modifyAttributes(dn, compensatingModifications);
        } catch (Exception e) {
            log
                    .warn("Failed to rollback ModifyAttributes operation, dn: "
                            + dn);
        }
    }
262281
def convert_old_variant_handle(handle_dict):
    """"""
    old_variables = handle_dict.get("variables", {})
    variables = dict(repository_type="filesystem")

    for old_key, key in variant_key_conversions.iteritems():
        value = old_variables.get(old_key)
        #if value is not None:
        variables[key] = value

    path = handle_dict["path"]
    filename = os.path.basename(path)
    if os.path.splitext(filename)[0] == "package":
        key = "filesystem.variant"
    else:
        key = "filesystem.variant.combined"

    return dict(key=key, variables=variables)
1265866
public void removeTangoAttConfigListener(ITangoAttConfigListener listener, String attrName)
            throws DevFailed {
        synchronized (moni) {
            TangoAttConfig tangoAttConfig;
            String key = deviceName+"/"+attrName;
            if ((tangoAttConfig = tango_att_config_source.get(key)) != null)
                tangoAttConfig.removeTangoAttConfigListener(listener);
        }
    }
714142
def close(self, commit=True):
    """"""
    self.data_access.close(commit=commit)
    return self
897282
private Path getDatasetDirForKey(ConfigKeyPath configKey) throws VersionDoesNotExistException {
    return this.fs.getPath(this.storePrefix, configKey.getAbsolutePathString());
  }
572655
public void rollbackImage(NamespaceInfo nsInfo) throws IOException {
    Preconditions.checkState(nsInfo.getLayoutVersion() != 0,
        "can't rollback with uninitialized layout version: %s",
        nsInfo.toColonSeparatedString());
    LOG.info("Rolling back image " + this.getJournalId()
        + " with namespace info: (" + nsInfo.toColonSeparatedString() + ")");
    imageStorage.rollback(nsInfo);
  }
795950
static InstallException create(RepositoryResolutionException e, Collection<String> assetNames, File installDir, boolean installingAsset,
                                   boolean isOpenLiberty) {
        Collection<MissingRequirement> allRequirementsNotFound = e.getAllRequirementsResourcesNotFound();
        Collection<MissingRequirement> dependants = new ArrayList<MissingRequirement>(allRequirementsNotFound.size());
        for (MissingRequirement f : allRequirementsNotFound) {
            /**
             * make sure it's not invalid asset names entered
             */
            if (!assetNames.contains(f.getRequirementName())) {
                dependants.add(f);
            }
        }

        /**
         * not valid for current product case or dependency not applicable
         */

        MissingRequirement missingRequirementWithMaxVersion = null;
        String newestVersion = null;
        for (MissingRequirement mr : allRequirementsNotFound) {
            if (missingRequirementWithMaxVersion == null)
                missingRequirementWithMaxVersion = mr;
            String r = mr.getRequirementName();
            if (r.contains("productInstallType") ||
                r.contains("productEdition") ||
                r.contains("productVersion")) {

                Pattern validNumericVersionOrRange = Pattern.compile("\\d+\\.\\d+\\.\\d+\\.\\d+");
                Matcher matcher = validNumericVersionOrRange.matcher(r);
                String version = null;
                while (matcher.find()) {
                    version = matcher.group();
                    break;
                }
                List productMatchers = SelfExtractor.parseAppliesTo(mr.getRequirementName());
                wlp.lib.extract.ReturnCode validInstallRC = SelfExtractor.validateProductMatches(installDir, productMatchers);
                String currentEdition = "";
                if (validInstallRC.getMessageKey().equals("invalidVersion") || validInstallRC.getMessageKey().equals("invalidEdition")) {
                    int productEdition = 2;
                    if (validInstallRC.getMessageKey().equals("invalidEdition")) {
                        productEdition = 0;
                    }
                    currentEdition = (String) validInstallRC.getParameters()[productEdition];
                }
                if (!!!currentEdition.equals("Liberty Early Access")) {
                    if (isNewerVersion(version, newestVersion, false)) {
                        missingRequirementWithMaxVersion = mr;
                        newestVersion = version;
                    }
                } else {
                    if (isNewerVersion(version, newestVersion, true)) {
                        missingRequirementWithMaxVersion = mr;
                        newestVersion = version;
                    }
                }

            }
        }

        /**
         * missing dependent case, keep the current message
         */
        if (dependants.size() > 0) {
            String missingRequirement = missingRequirementWithMaxVersion.getRequirementName();
            if (!missingRequirement.contains(";")
                && !missingRequirement.contains("productInstallType")
                && !missingRequirement.contains("productEdition")
                && !missingRequirement.contains("productVersion")) {
                String assetsStr = "";
                String feature = missingRequirement;
                InstallException ie = null;
                if (assetNames.size() == 1) {
                    assetsStr = assetNames.iterator().next();
                    ie = create(Messages.INSTALL_KERNEL_MESSAGES.getLogMessage(installingAsset ? "ERROR_ASSET_MISSING_DEPENDENT" : "ERROR_MISSING_DEPENDENT",
                                                                               assetsStr,
                                                                               feature),
                                e);
                } else if (assetNames.size() > 1) {
                    assetsStr = assetNames.toString();
                    ie = create(Messages.INSTALL_KERNEL_MESSAGES.getLogMessage(installingAsset ? "ERROR_ASSET_MISSING_MULTIPLE_DEPENDENT" : "ERROR_MISSING_MULTIPLE_DEPENDENT",
                                                                               assetsStr,
                                                                               feature),
                                e);
                }

                ie.setData(assetsStr, feature);

                return ie;

            }
        }

        if (missingRequirementWithMaxVersion.getRequirementName().contains("productInstallType") ||
            missingRequirementWithMaxVersion.getRequirementName().contains("productEdition") ||
            missingRequirementWithMaxVersion.getRequirementName().contains("productVersion")) {
            @SuppressWarnings("rawtypes")
            List productMatchers = SelfExtractor.parseAppliesTo(missingRequirementWithMaxVersion.getRequirementName());
            String feature = RepositoryDownloadUtil.getAssetNameFromMassiveResource(missingRequirementWithMaxVersion.getOwningResource());
            String errMsg = "";
            if (InstallUtils.containsIgnoreCase(assetNames, feature)) {
                errMsg = validateProductMatches(feature, productMatchers, installDir, installingAsset);

            } else {
                String assetsStr = assetNames.size() == 1 ? assetNames.iterator().next() : InstallUtils.getFeatureListOutput(assetNames);
                errMsg = validateProductMatches(assetsStr, feature, productMatchers, installDir, installingAsset);
            }
            if (!errMsg.isEmpty()) {
                return create(errMsg, e, InstallException.NOT_VALID_FOR_CURRENT_PRODUCT);
            }
        }

        InstallException ie;
        if (isOpenLiberty) {
            ie = create(Messages.INSTALL_KERNEL_MESSAGES.getLogMessage(installingAsset ? "ERROR_FAILED_TO_RESOLVE_ASSETS" : "ERROR_FAILED_TO_RESOLVE_FEATURES_FOR_OPEN_LIBERTY",
                                                                       InstallUtils.getFeatureListOutput(assetNames)),
                        e);
        } else {
            ie = create(Messages.INSTALL_KERNEL_MESSAGES.getLogMessage(installingAsset ? "ERROR_FAILED_TO_RESOLVE_ASSETS" : "ERROR_FAILED_TO_RESOLVE_FEATURES",
                                                                       InstallUtils.getFeatureListOutput(assetNames)),
                        e);
        }

        ie.setData(assetNames);

        return ie;
    }
131327
public void clean(final Collection<? extends FileSystemDatasetVersion> deletableVersions, final FileSystemDataset fsDataset) throws IOException {
    if (deletableVersions.isEmpty()) {
      log.warn("No deletable dataset version can be found. Ignoring.");
      return;
    }
    Set<Path> possiblyEmptyDirectories = new HashSet<>();
    for (FileSystemDatasetVersion fsdv : deletableVersions) {
      clean(fsdv, possiblyEmptyDirectories);
    }
    cleanEmptyDirectories(possiblyEmptyDirectories, fsDataset);
  }
724990
def revert_snapshot(self, name, *args, **kwargs):
        
        return self.provider.revert_snapshot(name, *args, **kwargs)
53323
void rollback()
	{
		switch (data_type)
		{
		case Tango_DEV_BOOLEAN :
			bool_val = old_bool_val;
			break;
		
		case Tango_DEV_SHORT :
			short_val = old_short_val;
			break;
		
		case Tango_DEV_LONG :
			long_val = old_long_val;
			break;
		
		case Tango_DEV_LONG64 :
			long64_val = old_long64_val;
			break;
		
		case Tango_DEV_DOUBLE :
			double_val = old_double_val;
			break;
		
		case Tango_DEV_STRING :
			str_val = old_str_val;
			break;
		}
	}
557642
private void deleteVersion(final Future<Void> aFuture) {
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug(MessageCodes.PT_DEBUG_006, myPath);
        }

        myFileSystem.delete(getVersionFilePath(), result -> {
            if (result.succeeded()) {
                if (hasPrefix()) {
                    deletePrefix(aFuture);
                } else {
                    aFuture.complete();
                }
            } else {
                aFuture.fail(result.cause());
            }
        });
    }
839409
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		if (AbstractDataSource.this.options.databaseLifecycleHandler != null) {
			AbstractDataSource.this.options.databaseLifecycleHandler.onUpdate(db, oldVersion, newVersion, false);
			versionChanged = true;
		}
	}
484158
@Override
  public void execute(List<DatasetVersion> allVersions) throws IOException {
    for (AccessControlAction aca : this.embeddedAccessControlActions) {
      aca.execute(allVersions);
    }
  }
1242917
function DesktopAssetsHandler(req, res, next, local = false) {
            return FilesystemHandler(req, res, next, self.desktopAssetsUrl, path.join(desktopPath, 'assets'), local);
        }