Examples of CleanerSystemException


Examples of com.asakusafw.cleaner.exception.CleanerSystemException

            String strFile = file.getAbsolutePath();
            try {
                Matcher m = Pattern.compile(pattern).matcher(strFile);
                return m.matches();
            } catch (PatternSyntaxException e) {
                throw new CleanerSystemException(e, this.getClass(), MessageIdConst.LCLN_PATTERN_FAIL, pattern);
            }
        }
    }
View Full Code Here

Examples of com.asakusafw.cleaner.exception.CleanerSystemException

            // クリーニングパターンを設定
            String number = dirKey.substring(dirKey.lastIndexOf(".") + 1, dirKey.length());
            String pattarnKey = Constants.PROP_KEY_LOCAL_FILE_CLEAN_PATTERN + "." + number;
            String pattern = ConfigurationLoader.getProperty(pattarnKey);
            if (pattern == null || pattern.equals("")) {
                throw new CleanerSystemException(
                        this.getClass(), MessageIdConst.LCLN_PATTERN_NOT_FOUND, dirKey, strDir, pattarnKey);
            } else {
                bean.setPattern(pattern);
            }
View Full Code Here

Examples of com.asakusafw.cleaner.exception.CleanerSystemException

        String keepDate = prop.getProperty(Constants.PROP_KEY_LOCAL_FILE_KEEP_DATE);
        if (isEmpty(keepDate)) {
            prop.setProperty(Constants.PROP_KEY_LOCAL_FILE_KEEP_DATE, Constants.PROP_DEFAULT_LOCAL_FILE_KEEP_DATE);
        } else {
            if (!isNumber(keepDate, 0)) {
                throw new CleanerSystemException(
                        ConfigurationLoader.class,
                        MessageIdConst.CMN_PROP_CHECK_ERROR,
                        "LocalFileCleanerでクリーニング対象を保持する期間の設定が不正。設定値:" + keepDate);
            }
        }

        // 必須チェック
        // クリーニング対象ディレクトリ
        List<String> cleanDirList = getPropStartWithString(Constants.PROP_KEY_LOCAL_FILE_CLEAN_DIR + ".");
        List<String> noEmptyList = getNoEmptyList(cleanDirList);
        if (noEmptyList.size() == 0) {
            throw new CleanerSystemException(
                    ConfigurationLoader.class,
                    MessageIdConst.CMN_PROP_CHECK_ERROR,
                    "LocalFileCleanerでクリーニング対象ディレクトリが設定されていない。");
        }
    }
View Full Code Here

Examples of com.asakusafw.cleaner.exception.CleanerSystemException

        String keepDate = prop.getProperty(Constants.PROP_KEY_HDFS_FILE_KEEP_DATE);
        if (isEmpty(keepDate)) {
            prop.setProperty(Constants.PROP_KEY_HDFS_FILE_KEEP_DATE, Constants.PROP_DEFAULT_HDFS_FILE_KEEP_DATE);
        } else {
            if (!isNumber(keepDate, 0)) {
                throw new CleanerSystemException(
                        ConfigurationLoader.class,
                        MessageIdConst.CMN_PROP_CHECK_ERROR,
                        "HDFSCleanerでクリーニング対象を保持する期間の設定が不正。設定値:" + keepDate);
            }
        }

        // 必須チェック
        // HDFSのプロトコルとホスト名
        if (isEmpty(prop.getProperty(Constants.PROP_KEY_HDFS_PROTCOL_HOST))) {
            throw new CleanerSystemException(
                    ConfigurationLoader.class,
                    MessageIdConst.CMN_PROP_CHECK_ERROR,
                    "HDFSのプロトコルとホスト名が設定されていない。");
        }
        // クリーニング対象ディレクトリ
        List<String> cleanDirList = getPropStartWithString(Constants.PROP_KEY_HDFS_FILE_CLEAN_DIR + ".");
        List<String> noEmptyList = getNoEmptyList(cleanDirList);
        if (noEmptyList.size() == 0) {
            throw new CleanerSystemException(
                    ConfigurationLoader.class,
                    MessageIdConst.CMN_PROP_CHECK_ERROR,
                    "HDFSCleanerでクリーニング対象ディレクトリが設定されていない。");
        }
    }
View Full Code Here

Examples of com.asakusafw.cleaner.exception.CleanerSystemException

            String strFile = path.toString();
            try {
                Matcher m = Pattern.compile(pattern).matcher(strFile);
                return m.matches();
            } catch (PatternSyntaxException e) {
                throw new CleanerSystemException(e, this.getClass(), MessageIdConst.HCLN_PATTERN_FAIL, pattern);
            }
        }
    }
View Full Code Here

Examples of com.asakusafw.cleaner.exception.CleanerSystemException

            // クリーニングパターンを設定
            String number = dirKey.substring(dirKey.lastIndexOf(".") + 1, dirKey.length());
            String pattarnKey = Constants.PROP_KEY_HDFS_FILE_CLEAN_PATTERN + "." + number;
            String pattern = ConfigurationLoader.getProperty(pattarnKey);
            if (pattern == null || pattern.equals("")) {
                throw new CleanerSystemException(
                        this.getClass(),
                        MessageIdConst.HCLN_PATTERN_NOT_FOUND,
                        dirKey,
                        strPath,
                        pattarnKey);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.