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.Encodings;
19 import org.kuali.common.util.Mode;
20 import org.kuali.common.util.maven.MavenConstants;
21 import org.kuali.common.util.property.processor.NoOpProcessor;
22 import org.kuali.common.util.property.processor.PropertyProcessor;
23 import org.springframework.util.PropertyPlaceholderHelper;
24
25 public final class Constants {
26
27 @Deprecated
28 public static final String UTF8 = Encodings.UTF8;
29 @Deprecated
30 public static final String DEFAULT_ENCODING = UTF8;
31 @Deprecated
32 public static final String DEFAULT_MAVEN_PROPERTIES_BEAN_NAME = MavenConstants.PROPERTIES_BEAN_NAME;
33 public static final String DEFAULT_PLACEHOLDER_PREFIX = "${";
34 public static final String DEFAULT_PLACEHOLDER_SUFFIX = "}";
35 public static final String DEFAULT_VALUE_SEPARATOR = ":";
36 public static final String DEFAULT_ESCAPE_STRING = "\\";
37 public static final boolean DEFAULT_IGNORE_UNRESOLVABLE_PLACEHOLDERS = true;
38 public static final boolean DEFAULT_RESOLVE_PLACEHOLDERS = true;
39 public static final String DEFAULT_ENCRYPTED_SUFFIX = ".encrypted";
40 public static final String DEFAULT_PATH_SUFFIX = "path";
41 public static final String DEFAULT_MAJOR_VERSION_SUFFIX = "major";
42 public static final String DEFAULT_MINOR_VERSION_SUFFIX = "minor";
43 public static final String DEFAULT_INCREMENTAL_VERSION_SUFFIX = "incremental";
44 public static final String DEFAULT_QUALIFIER_VERSION_SUFFIX = "qualifier";
45 public static final String DEFAULT_TRIMMED_VERSION_SUFFIX = "trimmed";
46 public static final String DEFAULT_SNAPSHOT_VERSION_SUFFIX = "snapshot";
47 public static final String DEFAULT_CODE_SUFFIX = "code";
48 public static final String DEFAULT_HOME_SUFFIX = "home";
49 @Deprecated
50 public static final String DEFAULT_GROUP_ID_PROPERTY = MavenConstants.GROUP_ID_KEY;
51 @Deprecated
52 public static final String DEFAULT_ARTIFACT_ID_PROPERTY = MavenConstants.ARTIFACT_ID_KEY;
53 @Deprecated
54 public static final String DEFAULT_VERSION_PROPERTY = MavenConstants.VERSION_KEY;
55 public static final String DEFAULT_USER_HOME_PROPERTY = "user.home";
56 public static final Mode DEFAULT_PROPERTY_OVERWRITE_MODE = Mode.INFORM;
57 public static final GlobalPropertiesMode DEFAULT_GLOBAL_PROPERTIES_MODE = GlobalPropertiesMode.BOTH;
58 public static final PropertyPlaceholderHelper DEFAULT_PROPERTY_PLACEHOLDER_HELPER = getDefaultHelper();
59 public static final PropertyProcessor NO_OP_PROCESSOR = new NoOpProcessor();
60 public static final String GROUP_ID = "groupId";
61 public static final String GROUP = "group";
62 @Deprecated
63 public static final String NONE = "NONE";
64 @Deprecated
65 public static final String NULL = "NULL";
66 public static final String WILDCARD = "*";
67
68 @Deprecated
69 public static final String ENCRYPTION_PREFIX = "ENC(";
70 @Deprecated
71 public static final String ENCRYPTION_SUFFIX = ")";
72
73
74
75 @Deprecated
76 public static final String GROUP_ID_BASE_PATH_KEY = "project.groupId.base.path";
77 public static final String ARTIFACT_ID_KEY = MavenConstants.ARTIFACT_ID_KEY;
78 public static final String GROUP_ID_PATH_KEY = MavenConstants.GROUP_ID_PATH_KEY;
79 public static final String PROJECT_PROPERTIES_BASE = "META-INF/${" + GROUP_ID_PATH_KEY + "}/${" + ARTIFACT_ID_KEY + "}";
80 public static final String PROJECT_PROPERTIES_FRAGMENT = PROJECT_PROPERTIES_BASE + "/project.properties";
81 public static final String PROJECT_PROPERTIES_OUTPUTFILE = "${project.build.outputDirectory}/" + PROJECT_PROPERTIES_FRAGMENT;
82 public static final String PROJECT_PROPERTIES_LOCATION = "classpath:" + PROJECT_PROPERTIES_FRAGMENT;
83
84 public static final String RICE_PROPERTIES_SUFFIX = "rice-properties.xml";
85 public static final String RICE_PROJECT_PROPERTIES_FRAGMENT = PROJECT_PROPERTIES_BASE + "/project-" + RICE_PROPERTIES_SUFFIX;
86 public static final String RICE_PROJECT_PROPERTIES_OUTPUTFILE = "${project.build.outputDirectory}/" + RICE_PROJECT_PROPERTIES_FRAGMENT;
87 public static final String RICE_PROJECT_PROPERTIES_LOCATION = "classpath:" + RICE_PROJECT_PROPERTIES_FRAGMENT;
88
89 private static final PropertyPlaceholderHelper getDefaultHelper() {
90 return new PropertyPlaceholderHelper(DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, DEFAULT_IGNORE_UNRESOLVABLE_PLACEHOLDERS);
91 }
92
93 }