Java 类javax.servlet.jsp.tagext.VariableInfo 实例源码

项目:tomcat7    文件:Node.java   
public List<Object> getScriptingVars(int scope) {
    List<Object> vec = null;

    switch (scope) {
    case VariableInfo.AT_BEGIN:
        vec = this.atBeginScriptingVars;
        break;
    case VariableInfo.AT_END:
        vec = this.atEndScriptingVars;
        break;
    case VariableInfo.NESTED:
        vec = this.nestedScriptingVars;
        break;
    }

    return vec;
}
项目:lams    文件:Node.java   
public Vector getScriptingVars(int scope) {
    Vector vec = null;

    switch (scope) {
    case VariableInfo.AT_BEGIN:
        vec = this.atBeginScriptingVars;
        break;
    case VariableInfo.AT_END:
        vec = this.atEndScriptingVars;
        break;
    case VariableInfo.NESTED:
        vec = this.nestedScriptingVars;
        break;
    }

    return vec;
}
项目:lams    文件:NestedDefineTei.java   
/**
 * Return information about the scripting variables to be created.
 */
public VariableInfo[] getVariableInfo(TagData data) {
  // get the type
  String type = (String)data.getAttribute("type");

  // make it an object if none supplied
  if (type == null) {
    type = "java.lang.Object";
  }

  // return the infor about the deined object
  VariableInfo[] vinfo = new VariableInfo[1];
  vinfo[0] = new VariableInfo(data.getAttributeString("id"),
                              type, true, VariableInfo.AT_END );

  /* return the results */
  return vinfo;
}
项目:lams    文件:DefineTei.java   
/**
 * Return information about the scripting variables to be created.
 */
public VariableInfo[] getVariableInfo(TagData data) {

    String type = (String)data.getAttribute("type");
    Object name = data.getAttribute("name");
    Object value = data.getAttribute("value");
    if (type == null) {
        if ( (value!=null) ||  (name==null) )
            type = "java.lang.String";
        else 
            type = "java.lang.Object";
    }

    return new VariableInfo[] {
      new VariableInfo(data.getAttributeString("id"),
                       type,
                       true,
                       VariableInfo.AT_END )
    };

}
项目:lams    文件:PageTei.java   
/**
    * Return information about the scripting variables to be created.
    */
   public VariableInfo[] getVariableInfo(TagData data) {

       String type = null;
       String property = data.getAttributeString("property");
       if ("application".equalsIgnoreCase(property))
           type = "javax.servlet.ServletContext";
       else if ("config".equalsIgnoreCase(property))
           type = "javax.servlet.ServletConfig";
       else if ("request".equalsIgnoreCase(property))
           type = "javax.servlet.ServletRequest";
       else if ("response".equalsIgnoreCase(property))
           type = "javax.servlet.ServletResponse";
       else if ("session".equalsIgnoreCase(property))
           type = "javax.servlet.http.HttpSession";
       else
           type = "java.lang.Object";

return new VariableInfo[] {
  new VariableInfo(data.getAttributeString("id"),
                   type,
                   true,
                   VariableInfo.AT_BEGIN)
};

   }
项目:lams    文件:HeaderTei.java   
/**
    * Return information about the scripting variables to be created.
    */
   public VariableInfo[] getVariableInfo(TagData data) {

       String className = null;
       if (data.getAttribute("multiple") == null)
           className = "java.lang.String";
       else
           className = "java.lang.String[]";
return new VariableInfo[] {
  new VariableInfo(data.getAttributeString("id"),
                          className,
                   true,
                   VariableInfo.AT_BEGIN)
};

   }
项目:lams    文件:ResourceTei.java   
/**
    * Return information about the scripting variables to be created.
    */
   public VariableInfo[] getVariableInfo(TagData data) {

       String type = null;
       if (data.getAttribute("input") == null)
           type = "java.lang.String";
       else
           type = "java.io.InputStream";
return new VariableInfo[] {
  new VariableInfo(data.getAttributeString("id"),
                   type,
                   true,
                   VariableInfo.AT_BEGIN)
};

   }
项目:lams    文件:CookieTei.java   
/**
    * Return information about the scripting variables to be created.
    */
   public VariableInfo[] getVariableInfo(TagData data) {

       String className = null;
       if (data.getAttribute("multiple") == null)
           className = "javax.servlet.http.Cookie";
       else
           className = "javax.servlet.http.Cookie[]";
return new VariableInfo[] {
  new VariableInfo(data.getAttributeString("id"),
                   className,
                   true,
                   VariableInfo.AT_BEGIN)
};

   }
项目:lams    文件:ParameterTei.java   
/**
    * Return information about the scripting variables to be created.
    */
   public VariableInfo[] getVariableInfo(TagData data) {

       String className = null;
       if (data.getAttribute("multiple") == null)
           className = "java.lang.String";
       else
           className = "java.lang.String[]";
return new VariableInfo[] {
  new VariableInfo(data.getAttributeString("id"),
                          className,
                   true,
                   VariableInfo.AT_BEGIN)
};

   }
项目:lams    文件:StrutsTei.java   
/**
    * Return information about the scripting variables to be created.
    */
   public VariableInfo[] getVariableInfo(TagData data) {

       String type = null;
       if (data.getAttribute("formBean") != null)
           type = "org.apache.struts.action.ActionFormBean";
       else if (data.getAttribute("forward") != null)
           type = "org.apache.struts.action.ActionForward";
       else if (data.getAttribute("mapping") != null)
           type = "org.apache.struts.action.ActionMapping";
       else
           type = "java.lang.Object";

return new VariableInfo[] {
  new VariableInfo(data.getAttributeString("id"),
                   type,
                   true,
                   VariableInfo.AT_BEGIN)
};

   }
项目:lams    文件:UseAttributeTei.java   
/**
   * Return information about the scripting variables to be created.
   */
  public VariableInfo[] getVariableInfo(TagData data) {

    String classname = data.getAttributeString("classname");
    if( classname == null )
      classname = "java.lang.Object";
    String id = data.getAttributeString("id");
    if( id == null )
      id = data.getAttributeString("name");

    return new VariableInfo[] {
    new VariableInfo(id,
                     classname,
                     true,
                     VariableInfo.AT_END)
};

  }
项目:apache-tomcat-7.0.73-with-comment    文件:Node.java   
public List<Object> getScriptingVars(int scope) {
    List<Object> vec = null;

    switch (scope) {
    case VariableInfo.AT_BEGIN:
        vec = this.atBeginScriptingVars;
        break;
    case VariableInfo.AT_END:
        vec = this.atEndScriptingVars;
        break;
    case VariableInfo.NESTED:
        vec = this.nestedScriptingVars;
        break;
    }

    return vec;
}
项目:lazycat    文件:Node.java   
public List<Object> getScriptingVars(int scope) {
    List<Object> vec = null;

    switch (scope) {
    case VariableInfo.AT_BEGIN:
        vec = this.atBeginScriptingVars;
        break;
    case VariableInfo.AT_END:
        vec = this.atEndScriptingVars;
        break;
    case VariableInfo.NESTED:
        vec = this.nestedScriptingVars;
        break;
    }

    return vec;
}
项目:beyondj    文件:ErrorsTagExtraInfo.java   
/** Returns an array of length two, for the variables exposed. */
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    VariableInfo[]  scriptVars = new VariableInfo[2];

    scriptVars[0] = new VariableInfo("index",
                                     "java.lang.Number",
                                     true,
                                     VariableInfo.NESTED);

    // TODO: ValidationError should expose properties like field name
    scriptVars[1] = new VariableInfo("error",
                                     ValidationError.class.getName(),
                                     true,
                                     VariableInfo.NESTED);

    return scriptVars;
}
项目:beyondj    文件:UseActionBeanTagExtraInfo.java   
/**
 * Attempts to return type information so that the container can create a
 * named variable for the action bean.
 */
@Override public VariableInfo[] getVariableInfo(final TagData tag) {
    // We can only provide the type of 'var' if beanclass was used because
    // if binding was used we need runtime information!
    Object beanclass = tag.getAttribute("beanclass");

    // Turns out beanclass="${...}" does NOT return TagData.REQUEST_TIME_VALUE; only beanclass="<%= ... %>".
    if (beanclass != null && !beanclass.equals(TagData.REQUEST_TIME_VALUE)) {
        String var = tag.getAttributeString("var");
        if (var == null) var = tag.getAttributeString("id");

        // Make sure we have the class name, not the class
        if (beanclass instanceof Class<?>) beanclass = ((Class<?>) beanclass).getName();

        // Return the variable info
        if (beanclass instanceof String) {
            String string = (String) beanclass;
            if (!string.startsWith("${")) {
                return new VariableInfo[] { new VariableInfo(var, string, true, VariableInfo.AT_BEGIN) };
            }
        }
    }
    return NO_INFO;
}
项目:sonar-scanner-maven    文件:NestedWriteNestingTei.java   
/**
 * Return information about the scripting variables to be created.
 */
public VariableInfo[] getVariableInfo(TagData data) {
    /* the id parameter */
    String id = data.getAttributeString("id");

    VariableInfo[] vi = null;

    if (id != null) {
        vi = new VariableInfo[1];
        vi[0] =
            new VariableInfo(id, "java.lang.String", true,
                VariableInfo.AT_END);
    } else {
        vi = new VariableInfo[0];
    }

    // job done
    return vi;
}
项目:sonar-scanner-maven    文件:NestedDefineTei.java   
/**
 * Return information about the scripting variables to be created.
 */
public VariableInfo[] getVariableInfo(TagData data) {
    // get the type
    String type = (String) data.getAttribute("type");

    // make it an object if none supplied
    if (type == null) {
        type = "java.lang.Object";
    }

    // return the infor about the deined object
    VariableInfo[] vinfo = new VariableInfo[1];

    vinfo[0] =
        new VariableInfo(data.getAttributeString("id"), type, true,
            VariableInfo.AT_END);

    /* return the results */
    return vinfo;
}
项目:sonar-scanner-maven    文件:DefineTei.java   
/**
 * Return information about the scripting variables to be created.
 */
public VariableInfo[] getVariableInfo(TagData data) {
    String type = (String) data.getAttribute("type");
    Object name = data.getAttribute("name");
    Object value = data.getAttribute("value");

    if (type == null) {
        if ((value != null) || (name == null)) {
            type = "java.lang.String";
        } else {
            type = "java.lang.Object";
        }
    }

    return new VariableInfo[] {
        new VariableInfo(data.getAttributeString("id"), type, true,
            VariableInfo.AT_END)
    };
}
项目:sonar-scanner-maven    文件:PageTei.java   
/**
 * Return information about the scripting variables to be created.
 */
public VariableInfo[] getVariableInfo(TagData data) {
    String type = null;
    String property = data.getAttributeString("property");

    if ("application".equalsIgnoreCase(property)) {
        type = "javax.servlet.ServletContext";
    } else if ("config".equalsIgnoreCase(property)) {
        type = "javax.servlet.ServletConfig";
    } else if ("request".equalsIgnoreCase(property)) {
        type = "javax.servlet.ServletRequest";
    } else if ("response".equalsIgnoreCase(property)) {
        type = "javax.servlet.ServletResponse";
    } else if ("session".equalsIgnoreCase(property)) {
        type = "javax.servlet.http.HttpSession";
    } else {
        type = "java.lang.Object";
    }

    return new VariableInfo[] {
        new VariableInfo(data.getAttributeString("id"), type, true,
            VariableInfo.AT_BEGIN)
    };
}
项目:sonar-scanner-maven    文件:StrutsTei.java   
/**
 * Return information about the scripting variables to be created.
 */
public VariableInfo[] getVariableInfo(TagData data) {
    String type = null;

    if (data.getAttribute("formBean") != null) {
        type = "org.apache.struts.action.ActionFormBean";
    } else if (data.getAttribute("forward") != null) {
        type = "org.apache.struts.action.ActionForward";
    } else if (data.getAttribute("mapping") != null) {
        type = "org.apache.struts.action.ActionMapping";
    } else {
        type = "java.lang.Object";
    }

    return new VariableInfo[] {
        new VariableInfo(data.getAttributeString("id"), type, true,
            VariableInfo.AT_BEGIN)
    };
}
项目:sonar-scanner-maven    文件:UseAttributeTei.java   
/**
   * Return information about the scripting variables to be created.
   */
  public VariableInfo[] getVariableInfo(TagData data) {

    String classname = data.getAttributeString("classname");
    if( classname == null )
      classname = "java.lang.Object";
    String id = data.getAttributeString("id");
    if( id == null )
      id = data.getAttributeString("name");

    return new VariableInfo[] {
    new VariableInfo(id,
                     classname,
                     true,
                     VariableInfo.AT_END)
};

  }
项目:metaworks_framework    文件:GetProductsByCategoryIdTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = GetProductsByCategoryIdTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:metaworks_framework    文件:CategoryTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = CategoryTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:metaworks_framework    文件:CategoryBreadcrumbTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = CategoryBreadCrumbTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:SparkCommerce    文件:GetProductsByCategoryIdTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = GetProductsByCategoryIdTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:SparkCommerce    文件:CategoryTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = CategoryTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:SparkCommerce    文件:CategoryBreadcrumbTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = CategoryBreadCrumbTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:SparkCore    文件:GetProductsByCategoryIdTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = GetProductsByCategoryIdTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:SparkCore    文件:CategoryTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = CategoryTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:SparkCore    文件:CategoryBreadcrumbTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = CategoryBreadCrumbTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:blcdemo    文件:GetProductsByCategoryIdTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = GetProductsByCategoryIdTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:blcdemo    文件:CategoryTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = CategoryTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:blcdemo    文件:CategoryBreadcrumbTei.java   
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
    List<VariableInfo> infos = new ArrayList<VariableInfo>(2);

    String variableName = tagData.getAttributeString("var");
    infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));

    variableName = tagData.getAttributeString("categoryId");

    if (variableName != null) {
        variableName = CategoryBreadCrumbTag.toVariableName(variableName);
        infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED));
    }

    return infos.toArray(new VariableInfo[infos.size()]);
}
项目:elpi    文件:ObjectTEI.java   
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    String name = null;
    String className = null;

    name = data.getAttributeString("name");
    className = data.getAttributeString("type");
    if (className == null)
        className = "org.ofbiz.entity.GenericValue";

    VariableInfo info =
        new VariableInfo(name, className, true, VariableInfo.AT_BEGIN);
    VariableInfo[] result = {info};

    return result;
}
项目:elpi    文件:IteratorTEI.java   
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    String name = null;
    String className = null;

    name = data.getAttributeString("name");
    className = data.getAttributeString("type");
    if (className == null)
        className = "org.ofbiz.entity.GenericValue";

    VariableInfo info =
        new VariableInfo(name, className, true, VariableInfo.NESTED);
    VariableInfo[] result = {info};

    return result;
}
项目:elpi    文件:IterateNextTEI.java   
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    String name = null;
    String className = null;

    name = data.getAttributeString("name");
    if (name == null)
        name = "next";

    className = data.getAttributeString("type");
    if (className == null)
        className = "org.ofbiz.entity.GenericValue";

    VariableInfo info =
        new VariableInfo(name, className, true, VariableInfo.NESTED);
    VariableInfo[] result = {info};

    return result;
}
项目:o3erp    文件:ObjectTEI.java   
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    String name = null;
    String className = null;

    name = data.getAttributeString("name");
    className = data.getAttributeString("type");
    if (className == null)
        className = "org.ofbiz.entity.GenericValue";

    VariableInfo info =
        new VariableInfo(name, className, true, VariableInfo.AT_BEGIN);
    VariableInfo[] result = {info};

    return result;
}
项目:o3erp    文件:IteratorTEI.java   
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    String name = null;
    String className = null;

    name = data.getAttributeString("name");
    className = data.getAttributeString("type");
    if (className == null)
        className = "org.ofbiz.entity.GenericValue";

    VariableInfo info =
        new VariableInfo(name, className, true, VariableInfo.NESTED);
    VariableInfo[] result = {info};

    return result;
}
项目:o3erp    文件:IterateNextTEI.java   
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    String name = null;
    String className = null;

    name = data.getAttributeString("name");
    if (name == null)
        name = "next";

    className = data.getAttributeString("type");
    if (className == null)
        className = "org.ofbiz.entity.GenericValue";

    VariableInfo info =
        new VariableInfo(name, className, true, VariableInfo.NESTED);
    VariableInfo[] result = {info};

    return result;
}
项目:class-guard    文件:Node.java   
public List<Object> getScriptingVars(int scope) {
    List<Object> vec = null;

    switch (scope) {
    case VariableInfo.AT_BEGIN:
        vec = this.atBeginScriptingVars;
        break;
    case VariableInfo.AT_END:
        vec = this.atEndScriptingVars;
        break;
    case VariableInfo.NESTED:
        vec = this.nestedScriptingVars;
        break;
    }

    return vec;
}