public static String getMessage(String key) throws MissingResourceException { return formatMessage(key, null); } }
public static String getMessage(String key) throws MissingResourceException { return formatMessage(key, null); } }
public static String getMessage(String key) throws MissingResourceException { return formatMessage(key, null); } }
/** */ public NoLoadExternalResourceSecurity(){ se = new SecurityException (Messages.formatMessage(ERROR_NO_EXTERNAL_RESOURCE_ALLOWED, null)); } }
/** */ public NoLoadExternalResourceSecurity(){ se = new SecurityException (Messages.formatMessage(ERROR_NO_EXTERNAL_RESOURCE_ALLOWED, null)); } }
/** * Creates a new NoLoadScriptSecurity object. * @param scriptType type of script, as found in the * type attribute of the <script> element. */ public NoLoadScriptSecurity(String scriptType){ se = new SecurityException (Messages.formatMessage(ERROR_NO_SCRIPT_OF_TYPE_ALLOWED, new Object[]{scriptType})); } }
/** * Creates a new NoLoadScriptSecurity object. * @param scriptType type of script, as found in the * type attribute of the <script> element. */ public NoLoadScriptSecurity(String scriptType){ se = new SecurityException (Messages.formatMessage(ERROR_NO_SCRIPT_OF_TYPE_ALLOWED, new Object[]{scriptType})); } }
/** */ public NoLoadExternalResourceSecurity(){ se = new SecurityException (Messages.formatMessage(ERROR_NO_EXTERNAL_RESOURCE_ALLOWED, null)); } }
/** * Creates a new NoLoadScriptSecurity object. * @param scriptType type of script, as found in the * type attribute of the <script> element. */ public NoLoadScriptSecurity(String scriptType){ se = new SecurityException (Messages.formatMessage(ERROR_NO_SCRIPT_OF_TYPE_ALLOWED, new Object[]{scriptType})); } }
/** * @param externalResourceURL url for the externalResource, as defined in * the externalResource's xlink:href attribute. If that * attribute was empty, then this parameter should * be null */ public EmbededExternalResourceSecurity(ParsedURL externalResourceURL){ if ( externalResourceURL == null || !DATA_PROTOCOL.equals(externalResourceURL.getProtocol()) ) { se = new SecurityException (Messages.formatMessage(ERROR_EXTERNAL_RESOURCE_NOT_EMBEDED, new Object[]{externalResourceURL})); } } }
/** * @param externalResourceURL url for the externalResource, as defined in * the externalResource's xlink:href attribute. If that * attribute was empty, then this parameter should * be null */ public EmbededExternalResourceSecurity(ParsedURL externalResourceURL){ if ( externalResourceURL == null || !DATA_PROTOCOL.equals(externalResourceURL.getProtocol()) ) { se = new SecurityException (Messages.formatMessage(ERROR_EXTERNAL_RESOURCE_NOT_EMBEDED, new Object[]{externalResourceURL})); } } }
/** * @param externalResourceURL url for the externalResource, as defined in * the externalResource's xlink:href attribute. If that * attribute was empty, then this parameter should * be null */ public EmbededExternalResourceSecurity(ParsedURL externalResourceURL){ if ( externalResourceURL == null || !DATA_PROTOCOL.equals(externalResourceURL.getProtocol()) ) { se = new SecurityException (Messages.formatMessage(ERROR_EXTERNAL_RESOURCE_NOT_EMBEDED, new Object[]{externalResourceURL})); } } }
/** * Returns the error message according to the error code and parameters. */ public String getMessage() { if (message != null) { return message; } String uri; String lname = "<Unknown Element>"; SVGDocument doc = null; if (e != null) { doc = (SVGDocument)e.getOwnerDocument(); lname = e.getLocalName(); } if (doc == null) uri = "<Unknown Document>"; else uri = doc.getURL(); Object [] fullparams = new Object[params.length+3]; fullparams[0] = uri; fullparams[1] = line; fullparams[2] = lname; System.arraycopy( params, 0, fullparams, 3, params.length ); return Messages.formatMessage(code, fullparams); }
/** * Returns the error message according to the error code and parameters. */ public String getMessage() { if (message != null) { return message; } String uri; String lname = "<Unknown Element>"; SVGDocument doc = null; if (e != null) { doc = (SVGDocument)e.getOwnerDocument(); lname = e.getLocalName(); } if (doc == null) uri = "<Unknown Document>"; else uri = doc.getURL(); Object [] fullparams = new Object[params.length+3]; fullparams[0] = uri; fullparams[1] = line; fullparams[2] = lname; System.arraycopy( params, 0, fullparams, 3, params.length ); return Messages.formatMessage(code, fullparams); }
/** * Returns the error message according to the error code and parameters. */ public String getMessage() { if (message != null) { return message; } String uri; String lname = "<Unknown Element>"; SVGDocument doc = null; if (e != null) { doc = (SVGDocument)e.getOwnerDocument(); lname = e.getLocalName(); } if (doc == null) uri = "<Unknown Document>"; else uri = doc.getURL(); Object [] fullparams = new Object[params.length+3]; fullparams[0] = uri; fullparams[1] = new Integer(line); fullparams[2] = lname; System.arraycopy( params, 0, fullparams, 3, params.length ); return Messages.formatMessage(code, fullparams); }
(Messages.formatMessage(ERROR_CANNOT_ACCESS_DOCUMENT_URL, new Object[]{externalResourceURL})); } else { !DATA_PROTOCOL.equals(externalResourceURL.getProtocol()) ) { se = new SecurityException (Messages.formatMessage(ERROR_EXTERNAL_RESOURCE_FROM_DIFFERENT_URL, new Object[]{externalResourceURL}));
GraphicsNode createBrokenImageNode (BridgeContext ctx, Element e, String uri, String message) { SVGDocument doc = ctx.getUserAgent().getBrokenLinkDocument (e, uri, Messages.formatMessage(URI_IMAGE_ERROR, new Object[] { message } )); return createSVGImageNode(ctx, e, doc); }
/** * Runs the script. */ public void handleEvent(Event evt) { Element elt = (Element)evt.getCurrentTarget(); // Evaluate the script String script = elt.getAttributeNS(null, attribute); if (script.length() == 0) return; DocumentLoader dl = bridgeContext.getDocumentLoader(); SVGDocument d = (SVGDocument)elt.getOwnerDocument(); int line = dl.getLineNumber(elt); final String desc = Messages.formatMessage (EVENT_SCRIPT_DESCRIPTION, new Object [] {d.getURL(), attribute, new Integer(line)}); // Find the scripting language Element e = elt; while (e != null && (!SVGConstants.SVG_NAMESPACE_URI.equals (e.getNamespaceURI()) || !SVGConstants.SVG_SVG_TAG.equals(e.getLocalName()))) { e = SVGUtilities.getParentElement(e); } if (e == null) return; String lang = e.getAttributeNS (null, SVGConstants.SVG_CONTENT_SCRIPT_TYPE_ATTRIBUTE); runEventHandler(script, evt, lang, desc); } }
GraphicsNode createBrokenImageNode (BridgeContext ctx, Element e, String uri, String message) { SVGDocument doc = ctx.getUserAgent().getBrokenLinkDocument (e, uri, Messages.formatMessage(URI_IMAGE_ERROR, new Object[] { message } )); return createSVGImageNode(ctx, e, doc); }
GraphicsNode createBrokenImageNode (BridgeContext ctx, Element e, String uri, String message) { SVGDocument doc = ctx.getUserAgent().getBrokenLinkDocument (e, uri, Messages.formatMessage(URI_IMAGE_ERROR, new Object[] { message } )); return createSVGImageNode(ctx, e, doc); }