예제 #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;
  }