1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.property;
17
18 import org.kuali.common.util.Mode;
19 import org.kuali.common.util.property.processor.NoOpProcessor;
20 import org.kuali.common.util.property.processor.PropertyProcessor;
21 import org.springframework.util.PropertyPlaceholderHelper;
22
23 public final class Constants {
24
25 public static final String UTF8 = "UTF-8";
26 public static final String DEFAULT_ENCODING = UTF8;
27 public static final String DEFAULT_MAVEN_PROPERTIES_BEAN_NAME = "mavenProperties";
28 public static final String DEFAULT_PLACEHOLDER_PREFIX = "${";
29 public static final String DEFAULT_PLACEHOLDER_SUFFIX = "}";
30 public static final String DEFAULT_VALUE_SEPARATOR = ":";
31 public static final String DEFAULT_ESCAPE_STRING = "\\";
32 public static final boolean DEFAULT_IGNORE_UNRESOLVABLE_PLACEHOLDERS = true;
33 public static final boolean DEFAULT_RESOLVE_PLACEHOLDERS = true;
34 public static final String DEFAULT_ENCRYPTED_SUFFIX = ".encrypted";
35 public static final String DEFAULT_PATH_SUFFIX = "path";
36 public static final String DEFAULT_MAJOR_VERSION_SUFFIX = "major";
37 public static final String DEFAULT_MINOR_VERSION_SUFFIX = "minor";
38 public static final String DEFAULT_INCREMENTAL_VERSION_SUFFIX = "incremental";
39 public static final String DEFAULT_QUALIFIER_VERSION_SUFFIX = "qualifier";
40 public static final String DEFAULT_TRIMMED_VERSION_SUFFIX = "trimmed";
41 public static final String DEFAULT_SNAPSHOT_VERSION_SUFFIX = "snapshot";
42 public static final String DEFAULT_CODE_SUFFIX = "code";
43 public static final String DEFAULT_HOME_SUFFIX = "home";
44 public static final String DEFAULT_GROUP_ID_PROPERTY = "project.groupId";
45 public static final String DEFAULT_ARTIFACT_ID_PROPERTY = "project.artifactId";
46 public static final String DEFAULT_USER_HOME_PROPERTY = "user.home";
47 public static final String DEFAULT_VERSION_PROPERTY = "project.version";
48 public static final Mode DEFAULT_PROPERTY_OVERWRITE_MODE = Mode.INFORM;
49 public static final GlobalPropertiesMode DEFAULT_GLOBAL_PROPERTIES_MODE = GlobalPropertiesMode.BOTH;
50 public static final PropertyPlaceholderHelper DEFAULT_PROPERTY_PLACEHOLDER_HELPER = getDefaultHelper();
51 public static final PropertyProcessor NO_OP_PROCESSOR = new NoOpProcessor();
52 public static final String GROUP_ID = "groupId";
53 public static final String GROUP = "group";
54 public static final String NONE = "NONE";
55 public static final String NULL = "NULL";
56 public static final String WILDCARD = "*";
57 public static final String ENCRYPTION_PREFIX = "ENC(";
58 public static final String ENCRYPTION_SUFFIX = ")";
59 public static final String PROJECT_PROPERTIES_FRAGMENT = "META-INF/${project.groupId.path}/${project.artifactId}/project.properties";
60 public static final String PROJECT_PROPERTIES_OUTPUTFILE = "${project.build.outputDirectory}/" + PROJECT_PROPERTIES_FRAGMENT;
61 public static final String PROJECT_PROPERTIES_LOCATION = "classpath:" + PROJECT_PROPERTIES_FRAGMENT;
62
63 private static final PropertyPlaceholderHelper getDefaultHelper() {
64 return new PropertyPlaceholderHelper(DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, DEFAULT_IGNORE_UNRESOLVABLE_PLACEHOLDERS);
65 }
66
67 }