Package org.apache.abdera.i18n.templates

Examples of org.apache.abdera.i18n.templates.Context


      context.getContextPath() + route.expand(getContext(param)) : null;
  }
 
  @SuppressWarnings("unchecked")
  private Context getContext(Object param) {
    Context context = new EmptyContext();
    if (param != null) {
      if (param instanceof Map) {
        context = new HashMapContext(cleanMapCtx(param), true);
      } else if (param instanceof Context) {
        context = (Context)param;
View Full Code Here


    }
    return template;
  }
 
  public static Context getContext(RequestContext request, Object param) {
    Context context = null;
    if (param != null) {
      if (param instanceof Map) {
        context = new HashMapContext((Map<String,Object>)param, true);
      } else if (param instanceof Context) {
        context = (Context)param;
View Full Code Here

        return route != null ? context.getContextPath() + route.expand(getContext(param)) : null;
    }

    @SuppressWarnings("unchecked")
    private Context getContext(Object param) {
        Context context = new EmptyContext();
        if (param != null) {
            if (param instanceof Map) {
                context = new HashMapContext(cleanMapCtx(param), true);
            } else if (param instanceof Context) {
                context = (Context)param;
View Full Code Here

        }
        return template;
    }

    public static Context getContext(RequestContext request, Object param) {
        Context context = null;
        if (param != null) {
            if (param instanceof Map) {
                context = new HashMapContext((Map<String, Object>)param, true);
            } else if (param instanceof Context) {
                context = (Context)param;
View Full Code Here

    Object key,
    Object param) {
    Route route = routes.get(key);
    if (route != null) {
      Map<String, Object> map = new HashMap<String,Object>();
      Context ctx = getContext(param);
      for (String var : ctx) {
        map.put(var, ctx.resolve(var));
      }
      for (String var : route.getVariables()) {
        Object value = context.getTarget().getParameter(var);
        if (!map.containsKey(var) && value != null) {
          map.put(var, value);
View Full Code Here

    }
  }
 
  @SuppressWarnings("unchecked")
  private Context getContext(Object param) {
    Context context = null;
    if (param != null) {
      if (param instanceof Map) {
        context = new HashMapContext((Map<String,Object>)param, true);
      } else if (param instanceof Context) {
        context = (Context)param;
View Full Code Here

TOP

Related Classes of org.apache.abdera.i18n.templates.Context

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.