Package org.opencms.acacia.client
Class CmsValidationContext
java.lang.Object
org.opencms.acacia.client.CmsValidationContext
The validation context. Keeps track of valid and invalid entity id's as well as of entity ids with warnings attached.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.CmsValidationContext
(org.opencms.acacia.shared.CmsValidationResult validationResult, Set<String> synchronizedPaths) Constructor, starting with an initial validation result. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearWarningEntity
(String entityId) Clears a warning entity id.Returns the invalid entity id's.Returns the valid entity id's.Returns the warning entity id's.boolean
Returns if there are any invalid entities.boolean
Returns if there are any warning entities.void
removeEntityId
(String entityId) Removes the given entity id, use when validating the entity is no longer required.void
Sets an entity as invalid and adds the error paths.void
setValidEntity
(String entityId) Sets an entity as valid.void
Sets warnings for an entity id.
-
Constructor Details
-
CmsValidationContext
public CmsValidationContext()Constructor.
-
-
Method Details
-
clearWarningEntity
Clears a warning entity id.- Parameters:
entityId
- the entity id
-
getInvalidEntityIds
Returns the invalid entity id's.- Returns:
- the invalid entity id's
-
getValidEntityIds
Returns the valid entity id's.- Returns:
- the valid entity id's
-
getWarningEntityIds
Returns the warning entity id's.- Returns:
- the warning entity id's
-
hasValidationErrors
Returns if there are any invalid entities.- Returns:
true
if there are any invalid entities
-
hasValidationWarnings
Returns if there are any warning entities.- Returns:
true
if there are any warning entities
-
removeEntityId
Removes the given entity id, use when validating the entity is no longer required.- Parameters:
entityId
- the entity id
-
setInvalidEntity
public void setInvalidEntity(String entityId, Map<String[], org.opencms.util.CmsPair<String, String>> errors) Sets an entity as invalid and adds the error paths.- Parameters:
entityId
- the entity iderrors
- the errors for the entity
-
setValidEntity
Sets an entity as valid.- Parameters:
entityId
- the entity id
-
setWarningEntity
public void setWarningEntity(String entityId, Map<String[], org.opencms.util.CmsPair<String, String>> warnings) Sets warnings for an entity id.- Parameters:
entityId
- the entity idwarnings
- the warnings for the entity
-