1 18 package org.apache.batik.bridge; 19 20 import org.apache.batik.util.ParsedURL; 21 22 30 public class EmbededExternalResourceSecurity implements ExternalResourceSecurity { 31 public static final String DATA_PROTOCOL = "data"; 32 33 37 public static final String ERROR_EXTERNAL_RESOURCE_NOT_EMBEDED 38 = "EmbededExternalResourceSecurity.error.external.esource.not.embeded"; 39 40 44 protected SecurityException se; 45 46 51 public void checkLoadExternalResource(){ 52 if (se != null) { 53 throw se; 54 } 55 } 56 57 63 public EmbededExternalResourceSecurity(ParsedURL externalResourceURL){ 64 if ( externalResourceURL == null 65 || 66 !DATA_PROTOCOL.equals(externalResourceURL.getProtocol()) ) { 67 se = new SecurityException 68 (Messages.formatMessage(ERROR_EXTERNAL_RESOURCE_NOT_EMBEDED, 69 new Object []{externalResourceURL})); 70 71 72 } 73 } 74 } 75 76 77 78 | Popular Tags |