Package org.eweb4j.config.bean

Examples of org.eweb4j.config.bean.ConfigBean


   * @param orm
   * @return
   */
  public static String checkORM(ORMConfigBean orm, String xmlFile) {
    String error = null;
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class);
    if ("true".equalsIgnoreCase(cb.getOrm().getOpen())
        || "1".equals(cb.getOrm().getOpen())) {
      StringBuilder sb = new StringBuilder();
      if (!"".equals(orm.getClazz())) {
        try {
          if (Class.forName(orm.getClazz()) == null) {
            sb.append("当前您填写的( class=").append(orm.getClazz())
View Full Code Here


   * @return
   */
  public static String checkORMProperty(List<Property> pList,
      List<ORMConfigBean> ormList, String beanID, String xmlFile) {
    String error = null;
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class);
    if ("true".equalsIgnoreCase(cb.getOrm().getOpen())
        || "1".equals(cb.getOrm().getOpen())) {
      StringBuilder sb = new StringBuilder();
      // for (Property p : pList) {
      //
      //
      // }
View Full Code Here

   * @param mvc
   * @return
   */
  public static String checkMVCAction(ActionConfigBean mvc, String xmlFile) {
    String error = null;
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class);
    if ("true".equalsIgnoreCase(cb.getMvc().getOpen())
        || "1".equals(cb.getMvc().getOpen())) {
      StringBuilder sb = new StringBuilder();
      if (!"".equals(mvc.getClazz())) {
        try {
          Class<?> clazz = Class.forName(mvc.getClazz());
          if (clazz == null) {
View Full Code Here

   * @return
   */
  public static String checkMVCResultPart(List<ResultConfigBean> rList,
      String beanID, String xmlFile) {
    String error = null;
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class);
    if ("true".equalsIgnoreCase(cb.getMvc().getOpen())
        || "1".equals(cb.getMvc().getOpen())) {
      StringBuilder sb = new StringBuilder();

      for (Iterator<ResultConfigBean> it = rList.iterator(); it.hasNext();) {
        ResultConfigBean r = it.next();
        if (!"forward".equalsIgnoreCase(r.getType())
View Full Code Here

   * @return
   */
  public static String checkMVCValidator(List<ValidatorConfigBean> vList,
      String beanID, String xmlFile) {
    String error = null;
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class);
    if ("true".equals(cb.getMvc().getOpen())
        || "1".equals(cb.getMvc().getOpen())) {
      if (vList != null && !vList.isEmpty()) {
        StringBuilder sb = new StringBuilder();
        for (Iterator<ValidatorConfigBean> it = vList.iterator(); it
            .hasNext();) {
          ValidatorConfigBean v = it.next();
View Full Code Here

  private static Log log = LogFactory.getORMLogger(ORMConfig.class);

  public synchronized static String check() {
    String error = null;
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigConstant.CONFIGBEAN_ID);
    if (cb == null)
      return null;

    List<String> ormXmlFilePaths = cb.getOrm().getOrmXmlFiles().getPath();
    for (String filePath : ormXmlFilePaths) {
      if (filePath == null || filePath.length() == 0)
        continue;

      File configFile = new File(ConfigConstant.CONFIG_BASE_PATH+filePath);
View Full Code Here

import org.eweb4j.util.xml.XMLWriter;

public class InterceptorConfig {
  public synchronized static String check() {
    String error = null;
    ConfigBean cb = (ConfigBean) SingleBeanCache
        .get(ConfigConstant.CONFIGBEAN_ID);

    if (cb != null) {
      for (String filePath : cb.getMvc().getInterXmlFiles().getPath()) {
        if (filePath != null && filePath.length() > 0) {
          File configFile = new File(ConfigConstant.CONFIG_BASE_PATH
              + filePath);
          try {
            XMLReader reader = BeanXMLUtil
View Full Code Here

import org.eweb4j.config.bean.LogConfigBean;
import org.eweb4j.config.bean.LogsConfigBean;

public class LogFactory {
  public static Log getIOCLogger(Class<?> clazz) {
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigConstant.CONFIGBEAN_ID);

    LogsConfigBean logs = cb == null ? new LogsConfigBean() : cb.getIoc().getLogs();

    return new LogImpl(logs, "IOC", clazz);
  }
View Full Code Here

    return new LogImpl(logs, "IOC", clazz);
  }

  public static Log getMVCLogger(Class<?> clazz) {
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigConstant.CONFIGBEAN_ID);

    LogsConfigBean logs = cb == null ? new LogsConfigBean() : cb.getMvc().getLogs();

    return new LogImpl(logs, "MVC", clazz);
  }
View Full Code Here

    return new LogImpl(logs, "MVC", clazz);
  }

  public static Log getORMLogger(Class<?> clazz) {
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigConstant.CONFIGBEAN_ID);

    LogsConfigBean logs = cb == null ? new LogsConfigBean() : cb.getOrm().getLogs();

    return new LogImpl(logs, "ORM", clazz);
  }
View Full Code Here

TOP

Related Classes of org.eweb4j.config.bean.ConfigBean

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.