Пример #1
0
 @Override
 public String getAppCssUrl(AuraContext context) {
   String contextPath = context.getContextPath();
   StringBuilder defs = new StringBuilder(contextPath).append("/l/");
   defs.append(context.getEncodedURL(AuraContext.EncodingStyle.Css));
   defs.append("/app.css");
   return defs.toString();
 }
Пример #2
0
 private String commonJsUrl(String filepath, AuraContext context, Map<String, Object> attributes) {
   StringBuilder url = new StringBuilder(context.getContextPath()).append("/l/");
   url.append(context.getEncodedURL(AuraContext.EncodingStyle.Normal));
   url.append(filepath);
   if (attributes != null) {
     addAttributes(url, attributes);
   }
   return url.toString();
 }
Пример #3
0
 private void addAttributes(StringBuilder builder, Map<String, Object> attributes) {
   //
   // This feels a lot like a hack.
   //
   if (attributes != null && !attributes.isEmpty()) {
     builder.append("?aura.attributes=");
     builder.append(AuraTextUtil.urlencode(JsonEncoder.serialize(attributes, false, false)));
   }
 }
Пример #4
0
  /**
   * get the manifest URL.
   *
   * <p>This routine will simply return the string, it does not check to see if the manifest is
   * enabled first.
   *
   * @return a string for the manifest URL.
   */
  @Override
  public String getManifestUrl(AuraContext context, Map<String, Object> attributes) {
    String contextPath = context.getContextPath();
    String ret = "";

    StringBuilder defs = new StringBuilder(contextPath).append("/l/");
    defs.append(context.getEncodedURL(AuraContext.EncodingStyle.Bare));
    defs.append("/app.manifest");
    addAttributes(defs, attributes);
    ret = defs.toString();
    return ret;
  }