// Get asset and policy resolvers, resolve component policy
PolicyReferenceResolver referenceResolver = protocol.getMarinerPageContext().getPolicyReferenceResolver();
AssetResolver assetResolver = protocol.getMarinerPageContext()
.getAssetResolver();
RuntimePolicyReference policyReference = referenceResolver
.resolvePolicyExpression(((StyleComponentURI)labelContent).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
textLabel = textAsset.getText(TextEncoding.PLAIN);
if (null == textLabel) {