1 package com.trendmicro.grid.acl.metadata;
2
3 import java.util.Arrays;
4 import java.util.Collections;
5 import java.util.List;
6
7 /**
8 * Collects well known profile names that are guarantied to exist.
9 *
10 * @author juergen_kellerer, 2010-12-02
11 * @version 1.0
12 */
13 public enum WellKnownProfileNames {
14 /**
15 * Defines the base profile that other may use to depend from-
16 */
17 BASIC("basic.profile-level%d"),
18
19 /**
20 * Defines the profile to use for handling requests.
21 */
22 REQUEST("request.profile-level%d"),
23
24 /**
25 * Defines the profile to use for processing elements.
26 */
27 PROCESSING("processing.profile-level%d"),;
28
29 /**
30 * Defines a collection of known profile levels.
31 */
32 public static final List<Integer> KNOWN_LEVELS = Collections.unmodifiableList(Arrays.asList(0));
33
34 final String fqnPattern;
35
36 private WellKnownProfileNames(String fqnPattern) {
37 this.fqnPattern = fqnPattern;
38 }
39
40 /**
41 * Retursn the full qualified name of the well known profile for the given level.
42 *
43 * @param level the level (~ version) of the profile.
44 * @return the full qualified name of the well known profile for the given level.
45 */
46 public String getFQN(int level) {
47 return String.format(fqnPattern, level);
48 }
49 }