public class WriteConstraintsDisabler extends java.lang.Object implements WriteConstraintsOverriderI
WriteConstraintsOverriderI
that always allows overriding write constraints.
This class provides a straightforward way to disable attribute write constraints in scenarios where such
overrides are necessary.
It always returns true
for the disableAttributeWriteConstraints()
method, effectively allowing
any attribute to be modified regardless of its usual write constraints, such as read-only status.
Constructor and Description |
---|
WriteConstraintsDisabler()
Constructs a WriteConstraintsDisabler.
|
WriteConstraintsDisabler(org.apache.log4j.Level level)
Constructs a WriteConstraintsDisabler with the specified log level.
|
Modifier and Type | Method and Description |
---|---|
boolean |
disableAttributeWriteConstraints()
Disables write constraints on attributes.
|
org.apache.log4j.Level |
getLogLevelForDisableAttributeWriteConstraints()
Returns the log level to use when logging the disabling of attribute write constraints.
|
public WriteConstraintsDisabler()
public WriteConstraintsDisabler(org.apache.log4j.Level level)
level
- The log level to use for logging write constraint overrides.public boolean disableAttributeWriteConstraints()
This method temporarily disables any write constraints that might be in place for attributes. This allows for modifying attributes that would normally be restricted via read-only.
This implementation always returns true
, allowing unrestricted modification of attributes.
disableAttributeWriteConstraints
in interface WriteConstraintsOverriderI
true
if write constraints shall be disabled, false
otherwise.public org.apache.log4j.Level getLogLevelForDisableAttributeWriteConstraints()
The default implementation returns Level.INFO
.
getLogLevelForDisableAttributeWriteConstraints
in interface WriteConstraintsOverriderI
Copyright © 2000-2024 OAshi S.à r.l. All Rights Reserved.