boolean createNewAsset = isCreateNewAsset(sessionParameters);
String assetName = getAssetName(sessionParameters);
String assetFormat = getAssetFormat(sessionParameters);
RuleAssetProvider provider;
if (createNewAsset) {
provider = new NewRuleAssetProvider(packageName,
categoryName,
assetName,
assetFormat, serviceImplementation, repositoryAssetService);
invocationParameters.setTemporalAssets(false);
} else if (assetsUUIDs != null) {
provider = new UUIDRuleAssetProvider(assetsUUIDs, repositoryAssetService);
invocationParameters.setTemporalAssets(false);
} else if (initialBRL != null) {
provider = new BRLRuleAssetProvider(packageName,
initialBRL, repositoryAssetService);
invocationParameters.setTemporalAssets(true);
} else {
throw new IllegalStateException();
}
invocationParameters.setAssetsToBeEdited(provider.getRuleAssets());
}