001    /**
002     * Copyright 2010-2012 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.common.util.property;
017    
018    import org.kuali.common.util.Mode;
019    import org.kuali.common.util.property.processor.NoOpProcessor;
020    import org.kuali.common.util.property.processor.PropertyProcessor;
021    import org.springframework.util.PropertyPlaceholderHelper;
022    
023    public final class Constants {
024    
025            public static final String DEFAULT_MAVEN_PROPERTIES_BEAN_NAME = "mavenProperties";
026            public static final String DEFAULT_PLACEHOLDER_PREFIX = "${";
027            public static final String DEFAULT_PLACEHOLDER_SUFFIX = "}";
028            public static final String DEFAULT_VALUE_SEPARATOR = ":";
029            public static final String DEFAULT_ESCAPE_STRING = "\\";
030            public static final boolean DEFAULT_IGNORE_UNRESOLVABLE_PLACEHOLDERS = true;
031            public static final boolean DEFAULT_RESOLVE_PLACEHOLDERS = true;
032            public static final String DEFAULT_ENCRYPTED_SUFFIX = ".encrypted";
033            public static final String DEFAULT_PATH_SUFFIX = "path";
034            public static final String DEFAULT_MAJOR_VERSION_SUFFIX = "major";
035            public static final String DEFAULT_MINOR_VERSION_SUFFIX = "minor";
036            public static final String DEFAULT_INCREMENTAL_VERSION_SUFFIX = "incremental";
037            public static final String DEFAULT_QUALIFIER_VERSION_SUFFIX = "qualifier";
038            public static final String DEFAULT_TRIMMED_VERSION_SUFFIX = "trimmed";
039            public static final String DEFAULT_SNAPSHOT_VERSION_SUFFIX = "snapshot";
040            public static final String DEFAULT_CODE_SUFFIX = "code";
041            public static final String DEFAULT_HOME_SUFFIX = "home";
042            public static final String DEFAULT_GROUP_ID_PROPERTY = "project.groupId";
043            public static final String DEFAULT_ARTIFACT_ID_PROPERTY = "project.artifactId";
044            public static final String DEFAULT_USER_HOME_PROPERTY = "user.home";
045            public static final String DEFAULT_VERSION_PROPERTY = "project.version";
046            public static final Mode DEFAULT_PROPERTY_OVERWRITE_MODE = Mode.INFORM;
047            public static final GlobalPropertiesMode DEFAULT_GLOBAL_PROPERTIES_MODE = GlobalPropertiesMode.BOTH;
048            public static final PropertyPlaceholderHelper DEFAULT_PROPERTY_PLACEHOLDER_HELPER = getDefaultHelper();
049            public static final PropertyProcessor NO_OP_PROCESSOR = new NoOpProcessor();
050            public static final String GROUP_ID = "groupId";
051            public static final String GROUP = "group";
052            public static final String NONE = "NONE";
053            public static final String NULL = "NULL";
054            public static final String WILDCARD = "*";
055            public static final String ENCRYPTION_PREFIX = "ENC(";
056            public static final String ENCRYPTION_SUFFIX = ")";
057    
058            private static final PropertyPlaceholderHelper getDefaultHelper() {
059                    return new PropertyPlaceholderHelper(DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, DEFAULT_IGNORE_UNRESOLVABLE_PLACEHOLDERS);
060            }
061    
062    }