Interface SpaceService.Validator
- All Known Implementing Classes:
SpaceValidatorImpl
- Enclosing interface:
- SpaceService
public static interface SpaceService.Validator
Provides methods for validating the create, update and delete methods.
-
Method Summary
Modifier and TypeMethodDescriptionvalidateArchive
(Space spaceToArchive) Validate that a Space can be archived, including permission checks.validateCreate
(Space newSpace, boolean isPrivate) Validate that a Space can be added, including permission checks.validateDelete
(Space spaceToDelete) Validate that a Space can be deleted, including permission checks.validateGet
(String spaceKey) Validate that a Space can be retrieved, including permission checks.validateRestore
(Space spaceToRestore) Validate that a Space can be restored, including permission checks.validateUpdate
(Space space) Validate that a Space can be updated, including permission checks.
-
Method Details
-
validateGet
Validate that a Space can be retrieved, including permission checks.- Parameters:
spaceKey
- the space to be validated- Returns:
- an immutable Validation result.
-
validateCreate
Validate that a Space can be added, including permission checks.- Parameters:
newSpace
- the space to be createdisPrivate
- whether the space is private (true) or has default permissions (false)- Returns:
- an immutable Validation result.
-
validateUpdate
Validate that a Space can be updated, including permission checks.- Parameters:
space
- the space to be updated- Returns:
- an immutable Validation result.
-
validateDelete
Validate that a Space can be deleted, including permission checks.- Parameters:
spaceToDelete
- the space to be deleted- Returns:
- an immutable Validation result.
-
validateArchive
Validate that a Space can be archived, including permission checks.- Parameters:
spaceToArchive
- the space to be archived- Returns:
- an immutable Validation result.
-
validateRestore
Validate that a Space can be restored, including permission checks.- Parameters:
spaceToRestore
- the space to be restored- Returns:
- an immutable Validation result.
-