Class ClassifiedConstraint
java.lang.Object
com.jalios.jcms.security.classified.ClassifiedConstraint
- Since:
- 10.0.8 / JCMS-10746
-
Constructor Summary
ConstructorsConstructorDescriptionClassifiedConstraint(String constraintName) Create a new ClassifiedConstraint with the specified name. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the technical name of this constraint.Retrieve a failed ControllerStatus suitable to explain the required constraint relative to classified publication.getIcon()Retrieve the icon of this constraint.Retrieve the I18Ned label of this constraint.Retrieve an english message explaining the constraint relative to classified publication.getMessage(String lang) Retrieve the I18Ned message explaining the required constraint relative to classified publication.Retrieve the plugin in which this constraint was declared (if it is not a core feature)intRetrieve the classification level starting which constraint must be enforced.booleanCheck if this constraint can be used for the specified publication.toString()
-
Constructor Details
-
ClassifiedConstraint
Create a new ClassifiedConstraint with the specified name.- Parameters:
constraintName- the technical name of this constraint, as declared in properties prefixed with "classification.constraint.".Example values :
core.reader-tracker.requiredorplugin.totp.required.Must not be null.
- Throws:
NullPointerException- ifconstraintNameisnull
-
-
Method Details
-
getConstraintName
Retrieve the technical name of this constraint.- Returns:
- the constraint's name, as declared in property prefixed with "classification.constraint.".
-
mustBeCheckedFor
Check if this constraint can be used for the specified publication.- Parameters:
pub- a publication, null accepted.- Returns:
trueif the constraint MUST be enforced for the specified publication.falseif constraint is not required, if classification is disabled, or if publication is null.
-
getStartLevel
public int getStartLevel()Retrieve the classification level starting which constraint must be enforced.- Returns:
- a classification level (inclusive)
-
getLabel
Retrieve the I18Ned label of this constraint.- Parameters:
lang- the ISO-639 code language to use to retrieve the label- Returns:
- an I18Ned label such as
"Reader tracking required"
-
getMessage
Retrieve the I18Ned message explaining the required constraint relative to classified publication.- Parameters:
lang- the ISO-639 code language to use to retrieve the message- Returns:
- an I18Ned message such as
"The 'Reader tracking required' must be honored for publication with a classification level greater than or equal to 'Confidential'."
-
getControllerStatus
Retrieve a failed ControllerStatus suitable to explain the required constraint relative to classified publication.- Returns:
- a ControllerStatus instance, never return null
-
getLogMessage
Retrieve an english message explaining the constraint relative to classified publication.- Returns:
- an english message suitable for logging of behavior explanation, such as
"The 'Reader tracking required' must be honored for publication with a classification level greater than or equal to 'Confidential'."
-
toString
-
getIcon
Retrieve the icon of this constraint.- Returns:
- an icon property name.
-
getPlugin
Retrieve the plugin in which this constraint was declared (if it is not a core feature)- Returns:
- a Plugin instance, or null if it is a core feature.
-