Interface RelationService.Validator
- Enclosing interface:
RelationService
public static interface RelationService.Validator
Responsible for validating the create and delete operations that can be performed using the RelationService
-
Method Summary
Modifier and TypeMethodDescription<S extends Relatable,
T extends Relatable>
ValidationResultvalidateCreate
(S source, RelationDescriptor<S, T> relationDescriptor, T target) Validate create operation<S extends Relatable,
T extends Relatable>
ValidationResultvalidateDelete
(S source, RelationDescriptor<S, T> relationDescriptor, T target) Validate delete operation<S extends Relatable,
T extends Relatable>
ValidationResultvalidateDeleteAllWithType
(Relatable relatable, RelationDescriptor<S, T> relationDescriptor) Validate the delete all operation<S extends Relatable,
T extends Relatable>
ValidationResultvalidateFetch
(S source, RelationDescriptor<S, T> relationDescriptor, T target) Validate fetch operation to check whether a user can view the specifed relation
-
Method Details
-
validateCreate
<S extends Relatable,T extends Relatable> ValidationResult validateCreate(S source, RelationDescriptor<S, T> relationDescriptor, T target) Validate create operation- Parameters:
relationDescriptor
- descriptor- Returns:
ValidationResult
-
validateDelete
<S extends Relatable,T extends Relatable> ValidationResult validateDelete(S source, RelationDescriptor<S, T> relationDescriptor, T target) Validate delete operation- Parameters:
relationDescriptor
- descriptor- Returns:
ValidationResult
-
validateFetch
<S extends Relatable,T extends Relatable> ValidationResult validateFetch(S source, RelationDescriptor<S, T> relationDescriptor, T target) Validate fetch operation to check whether a user can view the specifed relation- Parameters:
relationDescriptor
- descriptor- Returns:
ValidationResult
-
validateDeleteAllWithType
<S extends Relatable,T extends Relatable> ValidationResult validateDeleteAllWithType(Relatable relatable, RelationDescriptor<S, T> relationDescriptor) Validate the delete all operation- Parameters:
relatable
- the object from which all relations of the given type will be removedrelationDescriptor
- descriptor- Returns:
ValidationResult
-