if (!(asset instanceof SubstantiveAsset)) {
return null;
}
SubstantiveAsset sAsset = (SubstantiveAsset) asset;
String assetGroupName = sAsset.getAssetGroupName();
if (assetGroupName == null) {
return null;
}
// Get the project for the asset group.
RuntimeProject project = (RuntimeProject) sAsset.getAssetGroupProject();
if (project == null) {
// If the project could not be found then use the project for the
// asset.
project = (RuntimeProject) sAsset.getProject();
if (project == null) {
// If the project could not be found then try the current
// project.
project = context.getCurrentProject();
}
}
RuntimePolicyReference reference =
referenceFactory.createLazyNormalizedReference(
project,
new MarinerURL(sAsset.getName()),
assetGroupName,
PolicyType.BASE_URL);
Policy policy = policyFetcher.fetchPolicy(reference);
AssetGroup group = null;