Class DelegatingAuditManager
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.audit.DelegatingAuditManager
-
- All Implemented Interfaces:
AuditManager
,ExtensionPointManager
public class DelegatingAuditManager extends java.lang.Object implements AuditManager
-
-
Constructor Summary
Constructors Constructor Description DelegatingAuditManager(AuditManager delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAuditProfileType(AuditProfileType type)
Adds a new type of audit profile to the system.void
clearAuditContext()
Removes the threadlocal AuditContextjava.util.Optional<AuditContext>
getAuditContext()
Returns a populatedAuditContext
if the current thread is attached to a valid http session, ie aClientReqSession
orIgnitionSession
.java.util.List<java.lang.String>
getAvailableAuditProfiles()
Return the list of audit profiles known to this manager.ExtensionPointType
getExtensionPoint(java.lang.String typeId)
java.util.List<? extends ExtensionPointType>
getExtensionPoints()
AuditProfile
getGatewayAuditProfile()
Returns the audit profile specified bySystemPropertiesRecord.GatewayAuditProfile
, ornull
.AuditProfile
getProfile(java.lang.String name)
Returns the named audit profile, or null if none exists with that nameAuditProfile
getProfileForProject(java.lang.String projectName)
Returns the audit profile for a given project.void
removeAuditProfileType(java.lang.String typeId)
Remove an audit profile type with the given type ID.void
setAuditContext(AuditContext auditContext)
Sets an threadlocal for AuditContext that will be returned byAuditManager.getAuditContext()
on the calling thread untilAuditManager.clearAuditContext()
is invoked.
-
-
-
Constructor Detail
-
DelegatingAuditManager
public DelegatingAuditManager(AuditManager delegate)
-
-
Method Detail
-
getProfile
@Nullable public AuditProfile getProfile(java.lang.String name) throws java.lang.Exception
Description copied from interface:AuditManager
Returns the named audit profile, or null if none exists with that name- Specified by:
getProfile
in interfaceAuditManager
- Throws:
java.lang.Exception
-
getProfileForProject
@Nullable public AuditProfile getProfileForProject(java.lang.String projectName)
Description copied from interface:AuditManager
Returns the audit profile for a given project. May be null- Specified by:
getProfileForProject
in interfaceAuditManager
-
getGatewayAuditProfile
@Nullable public AuditProfile getGatewayAuditProfile()
Description copied from interface:AuditManager
Returns the audit profile specified bySystemPropertiesRecord.GatewayAuditProfile
, ornull
.- Specified by:
getGatewayAuditProfile
in interfaceAuditManager
-
getAuditContext
public java.util.Optional<AuditContext> getAuditContext()
Description copied from interface:AuditManager
Returns a populatedAuditContext
if the current thread is attached to a valid http session, ie aClientReqSession
orIgnitionSession
. Returns an empty optional if no contextual information could be found.- Specified by:
getAuditContext
in interfaceAuditManager
-
setAuditContext
public void setAuditContext(AuditContext auditContext)
Description copied from interface:AuditManager
Sets an threadlocal for AuditContext that will be returned byAuditManager.getAuditContext()
on the calling thread untilAuditManager.clearAuditContext()
is invoked.- Specified by:
setAuditContext
in interfaceAuditManager
-
clearAuditContext
public void clearAuditContext()
Description copied from interface:AuditManager
Removes the threadlocal AuditContext- Specified by:
clearAuditContext
in interfaceAuditManager
-
addAuditProfileType
public void addAuditProfileType(AuditProfileType type) throws java.lang.Exception
Description copied from interface:AuditManager
Adds a new type of audit profile to the system. Also makes sure that the persistent settings record indicated in the type is known by the internal schema manager- Specified by:
addAuditProfileType
in interfaceAuditManager
- Parameters:
type
- The new type of audit profile to add.- Throws:
java.lang.Exception
- If automatic schema updating fails.
-
removeAuditProfileType
public void removeAuditProfileType(java.lang.String typeId)
Description copied from interface:AuditManager
Remove an audit profile type with the given type ID.- Specified by:
removeAuditProfileType
in interfaceAuditManager
- Parameters:
typeId
- The typeId associated with the audit profile to remove.
-
getAvailableAuditProfiles
public java.util.List<java.lang.String> getAvailableAuditProfiles()
Description copied from interface:AuditManager
Return the list of audit profiles known to this manager.- Specified by:
getAvailableAuditProfiles
in interfaceAuditManager
-
getExtensionPoint
@Nullable public ExtensionPointType getExtensionPoint(java.lang.String typeId)
- Specified by:
getExtensionPoint
in interfaceExtensionPointManager
- Returns:
- the
ExtensionPointType
identified bytypeId
, ornull
if none exists for that name. - See Also:
ExtensionPointType.getTypeId()
-
getExtensionPoints
public java.util.List<? extends ExtensionPointType> getExtensionPoints()
- Specified by:
getExtensionPoints
in interfaceExtensionPointManager
- Returns:
- all
ExtensionPointType
s managed by thisExtensionPointManager
.
-
-