4242import org .labkey .api .security .roles .CanSeeAuditLogRole ;
4343import org .labkey .api .security .roles .Role ;
4444import org .labkey .api .security .roles .RoleManager ;
45- import org .labkey .api .settings .OptionalFeatureService ;
4645
4746import java .util .ArrayList ;
4847import java .util .List ;
5150
5251public class DefaultAuditTypeTable extends FilteredTable <UserSchema >
5352{
54- public static final String LEGACY_UNION_AUDIT_TABLE = "legacyUnionAuditTable" ;
55-
5653 protected AuditTypeProvider _provider ;
57- protected Map <FieldKey , String > _legacyNameMap ;
5854 protected Map <String , String > _dbSchemaToColumnMap ;
5955
6056 public DefaultAuditTypeTable (AuditTypeProvider provider , TableInfo storage , UserSchema schema , ContainerFilter cf , List <FieldKey > defaultVisibleColumns )
@@ -67,17 +63,9 @@ public DefaultAuditTypeTable(AuditTypeProvider provider, TableInfo storage, User
6763 if (_provider .getDescription () != null )
6864 setDescription (_provider .getDescription ());
6965
70- _legacyNameMap = OptionalFeatureService .get ().isFeatureEnabled (LEGACY_UNION_AUDIT_TABLE ) ? provider .legacyNameMap () : Map .of ();
71-
7266 // Create a mapping from the real dbTable names to the legacy query table names for QueryUpdateService.
7367 _dbSchemaToColumnMap = new CaseInsensitiveHashMap <>();
7468
75- for (FieldKey legacyName : _legacyNameMap .keySet ())
76- {
77- String newName = _legacyNameMap .get (legacyName );
78- _dbSchemaToColumnMap .put (newName , legacyName .getName ());
79- }
80-
8169 setTitle (provider .getEventName ());
8270
8371 wrapAllColumns (true );
@@ -171,17 +159,10 @@ protected ColumnInfo resolveColumn(String name)
171159
172160 String newName = null ;
173161
174- if (_legacyNameMap .isEmpty ())
175- {
176- // Backward compatibility with widely used legacy name
177- if ("Date" .equalsIgnoreCase (name ))
178- newName = "Created" ;
179- }
180- else
181- {
182- // Handle the old style 'intKey1' and 'key1' columns
183- newName = _legacyNameMap .get (FieldKey .fromParts (name ));
184- }
162+ // Backward compatibility with widely-used legacy name
163+ if ("Date" .equalsIgnoreCase (name ))
164+ newName = "Created" ;
165+
185166 col = super .resolveColumn (newName );
186167 if (col != null )
187168 {
0 commit comments