.resolvePolicyExpression(component.getExpression());
// Create image asset from the policy and get fallback
DefaultComponentImageAssetReference imageAsset = new DefaultComponentImageAssetReference(
policyReference, assetResolver);
TextAssetReference textAsset = imageAsset.getTextFallback();
// If e.g policy file is missing and as consequence textAsset == null,
// throw suitable exception
if (null == textAsset) {
throw new ProtocolException(exceptionLocalizer.format(
"missing-policy-failure", policyReference.getName()));
}
// Return text in plain encoding, or empty string
String altText = textAsset.getText(TextEncoding.PLAIN);
if (null == altText) {
altText = "";
}
return altText;