| 82 | |
| 83 | |
| 84 | public class PCClass extends PObject implements InfoFacade, Cloneable |
| 85 | { |
| 86 | |
| 87 | public static final CDOMReference<DomainList> ALLOWED_DOMAINS; |
| 88 | |
| 89 | static |
| 90 | { |
| 91 | DomainList dl = new DomainList(); |
| 92 | dl.setName("*Allowed"); |
| 93 | ALLOWED_DOMAINS = CDOMDirectSingleRef.getRef(dl); |
| 94 | } |
| 95 | |
| 96 | /* |
| 97 | * TYPESAFETY This is definitely something that needs to NOT be a String, |
| 98 | * but it gets VERY complicated to do that, since the keys are widely used |
| 99 | * in the variable processor. |
| 100 | */ |
| 101 | /* |
| 102 | * ALLCLASSLEVELS Must be in all PCClassLevels, since this is the master |
| 103 | * index of what this PCClassLevel was created from. Best for debugging, and |
| 104 | * not necessarily creation on the fly? |
| 105 | */ |
| 106 | /* |
| 107 | * REFACTOR This brings up a FASCINATING point, in that the Class Key today |
| 108 | * is used in variable processing. How is that to be handled going forward - |
| 109 | * so that PCClassLevels are actually what is checked and NOT the PCClass? |
| 110 | * What needs to be done to teach the system to iterate over all |
| 111 | * PCClassLevels that implement this key? |
| 112 | */ |
| 113 | private String classKey = null; |
| 114 | |
| 115 | /** |
| 116 | * Returns the abbreviation for this class. |
| 117 | * |
| 118 | * @return The abbreviation string. |
| 119 | */ |
| 120 | /* |
| 121 | * FINALPCCLASSANDLEVEL This is required in PCClassLevel and should be present in |
| 122 | * PCClass for PCClassLevel creation (in the factory) |
| 123 | */ |
| 124 | public final String getAbbrev() |
| 125 | { |
| 126 | FactKey<String> fk = FactKey.valueOf("Abb"); |
| 127 | String abb = getResolved(fk); |
| 128 | if (abb == null) |
| 129 | { |
| 130 | String name = getDisplayName(); |
| 131 | abb = name.substring(0, Math.min(3, name.length())); |
| 132 | } |
| 133 | return abb; |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Return the qualified key, usually used as the source in a |
| 138 | * getVariableValue call. Overriden here to return CLASS:keyname |
| 139 | * |
| 140 | * @return The qualified key of the object |
| 141 | */ |