/** * Generates a URL for the client to retrieve the asset. The context path is prepended to the * asset path, which means that assets deployed inside web applications will still work (if * things are configured properly). */ public String buildURL() { if (_resolvedURL == null) _resolvedURL = _contextPath + getResourceLocation().getPath(); return _resolvedURL; }
/** * Generates a URL for the client to retrieve the asset. The context path is prepended to the * asset path, which means that assets deployed inside web applications will still work (if * things are configured properly). */ public String buildURL() { if (_resolvedURL == null) _resolvedURL = _contextPath + getResourceLocation().getPath(); return _resolvedURL; }
private Element getSubModuleElement(SubModuleDescriptor smd) { Element subModule = _document.createElement("sub-module"); subModule.setAttribute("descriptor", smd.getDescriptor().getPath()); return subModule; }
/** * {@inheritDoc} */ public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ComponentSpecification other = (ComponentSpecification) obj; if (_componentClassName == null) { if (other._componentClassName != null) return false; } else if (!_componentClassName.equals(other._componentClassName)) return false; if (_description == null) { if (other._description != null) return false; } else if (!_description.equals(other._description)) return false; if (_pageSpecification != other._pageSpecification) return false; if (_publicId == null) { if (other._publicId != null) return false; } else if (!_publicId.equals(other._publicId)) return false; if (_specificationLocation == null) { if (other._specificationLocation != null) return false; } else if (!_specificationLocation.getPath().equals(other._specificationLocation.getPath())) return false; return true; }
public IAsset createAsset(Resource resource, Location location) { return new ExternalAsset(resource.getPath(), location); }
public IAsset createAsset(Resource resource, Location location) { return new ExternalAsset(resource.getPath(), location); }
/** * {@inheritDoc} */ public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ComponentSpecification other = (ComponentSpecification) obj; if (_componentClassName == null) { if (other._componentClassName != null) return false; } else if (!_componentClassName.equals(other._componentClassName)) return false; if (_description == null) { if (other._description != null) return false; } else if (!_description.equals(other._description)) return false; if (_pageSpecification != other._pageSpecification) return false; if (_publicId == null) { if (other._publicId != null) return false; } else if (!_publicId.equals(other._publicId)) return false; if (_specificationLocation == null) { if (other._specificationLocation != null) return false; } else if (!_specificationLocation.getPath().equals(other._specificationLocation.getPath())) return false; return true; }
/** * Gets the localized version of the resource. Build the URL for the resource. If possible, the * application's {@link ExternalAsset}is located, to copy the resource to a directory * visible to the web server. */ public String buildURL() { String path = getResourceLocation().getPath(); ILink link = _assetService.getLink(false, path); return link.getURL(); }
/** * Gets the localized version of the resource. Build the URL for the resource. If possible, the * application's {@link ExternalAsset}is located, to copy the resource to a directory * visible to the web server. */ public String buildURL() { String path = getResourceLocation().getPath(); ILink link = _assetService.getLink(false, path); return link.getURL(); }
public InputStream getResourceAsStream() { Resource location = getResourceLocation(); try { URL url = location.getResourceURL(); return url.openStream(); } catch (Exception ex) { throw new ApplicationRuntimeException(AssetMessages.noSuchResource(location.getPath())); } }
public InputStream getResourceAsStream() { Resource location = getResourceLocation(); try { URL url = location.getResourceURL(); return url.openStream(); } catch (Exception ex) { throw new ApplicationRuntimeException(AssetMessages.noSuchResource(location.getPath())); } }