Modifier and Type | Class and Description |
---|---|
class |
CoreValidationResult
Deprecated.
since 5.7, use
SimpleValidationResult instead. |
Modifier and Type | Method and Description |
---|---|
static ValidationResult |
CoreValidationResultFactory.create(boolean authorized,
Collection<ValidationError> coreErrors) |
static ValidationResult |
CoreValidationResult.create(Message message,
com.google.common.base.Function<String,? extends ServiceException> exceptionSupplier)
Deprecated.
since 5.7, use {@link com.atlassian.confluence.api.model.validation.SimpleValidationResult.Builder instead.
|
Modifier and Type | Method and Description |
---|---|
ValidationResult |
ContentServiceImpl.ValidatorImpl.validateCreate(Content newContent) |
ValidationResult |
SpaceServiceImpl.ValidatorImpl.validateCreate(Space space,
boolean isPrivate) |
ValidationResult |
ContentServiceImpl.ValidatorImpl.validateDelete(Content content) |
ValidationResult |
SpaceServiceImpl.ValidatorImpl.validateDelete(Space space) |
protected ValidationResult |
ContentServiceImpl.ValidatorImpl.validateUpdate(Content updatedContent,
ContentEntityObject currentCeo) |
ValidationResult |
SpaceServiceImpl.ValidatorImpl.validateUpdate(Space space) |
Constructor and Description |
---|
ApiBackedActionHelper(ValidationResult validationResult) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
LegacyDraftValidator.validateDelete(ContentId draftId) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
BlogPostContentTypeApiSupport.validateCreate(Content newContent) |
ValidationResult |
CommentContentTypeApiSupport.validateCreate(Content newContent) |
ValidationResult |
AttachmentContentTypeApiSupport.validateCreate(Content newContent) |
ValidationResult |
PageContentTypeApiSupport.validateCreate(Content newContent) |
ValidationResult |
AttachmentContentTypeApiSupport.validateUpdate(Content updatedContent,
Attachment existingEntity) |
ValidationResult |
BlogPostContentTypeApiSupport.validateUpdate(Content updatedContent,
BlogPost existingEntity) |
ValidationResult |
CommentContentTypeApiSupport.validateUpdate(Content updatedContent,
Comment existingEntity) |
ValidationResult |
PageContentTypeApiSupport.validateUpdate(Content updatedContent,
Page sceo) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
GroupServiceImpl.GroupValidator.validateView() |
ValidationResult |
PersonServiceImpl.ValidatorImpl.validateView() |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
OperationServiceImpl.canPerform(Person person,
Operation operation,
Target target) |
ValidationResult |
OperationServiceImpl.canPerformWithoutExemptions(Person person,
Operation operation,
Target target) |
ValidationResult |
DefaultContentRestrictionServiceValidator.validateAddDirectRestrictionForSubject(ContentId contentId,
OperationKey operationKey,
Subject subject) |
ValidationResult |
DefaultContentRestrictionServiceValidator.validateAddRestrictions(ContentId contentId,
Collection<? extends ContentRestriction> contentRestrictions) |
ValidationResult |
DefaultContentRestrictionServiceValidator.validateDeleteAllDirectRestrictions(ContentId contentId) |
ValidationResult |
DefaultContentRestrictionServiceValidator.validateDeleteDirectRestrictionForSubject(ContentId contentId,
OperationKey operationKey,
Subject subject) |
ValidationResult |
DefaultContentRestrictionServiceValidator.validateGetRestrictions(ContentId contentId) |
ValidationResult |
DefaultContentRestrictionServiceValidator.validateGetRestrictionsForOperation(ContentId contentId,
OperationKey opKey) |
ValidationResult |
DefaultContentRestrictionServiceValidator.validateHasDirectRestrictionsForSubject(ContentId contentId,
OperationKey operationKey,
Subject subject) |
protected ValidationResult |
ContentRestrictionServiceImpl.validateSelfAccessRetained(Map<String,Collection<ContentPermission>> contentPermissionByPermissionTypeMap)
Validates that currently logged in user will have direct specific ContentPermission specified for self
in case when provided
contentPermissionByPermissionTypeMap will become the actual ContentPermissions. |
ValidationResult |
DefaultContentRestrictionServiceValidator.validateUpdateRestrictions(ContentId contentId,
Collection<? extends ContentRestriction> contentRestrictions) |
Modifier and Type | Method and Description |
---|---|
Map<Target,ValidationResult> |
OperationServiceImpl.canPerform(Person person,
Operation operation,
Iterable<Target> targets) |
Map<Target,ValidationResult> |
OperationServiceImpl.canPerformWithoutExemptions(Person person,
Operation operation,
Iterable<Target> targets) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
DefaultValidatingRelationDescriptor.canRelate(S source,
T target) |
ValidationResult |
AuthenticatedUserRelationDescriptor.canRelate(S source,
T target) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
WatchServiceImpl.ValidatorImpl.validateWatchContent(com.atlassian.sal.api.user.UserKey userKey,
ContentId contentId) |
ValidationResult |
WatchServiceImpl.ValidatorImpl.validateWatchSpace(com.atlassian.sal.api.user.UserKey userKey,
String spaceKey) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
BaseOperationCheck.canPerform(Person person,
Target target)
|
ValidationResult |
OperationCheck.canPerform(Person person,
Target target)
Check whether the specified Person can perform this operation on the specified target.
|
ValidationResult |
BaseOperationCheck.canPerformAccordingToState(Person person,
Target target)
|
ValidationResult |
OperationCheck.canPerformAccordingToState(Person person,
Target target)
Check whether the specified Person can perform this operation on the specified target based on its state.
|
Modifier and Type | Method and Description |
---|---|
Map<Target,ValidationResult> |
BaseOperationCheck.canPerform(Person person,
Iterable<Target> targets)
Validates targets are the correct
TargetType ,
then delegates to BaseOperationCheck.canPerformImpl(Person, java.lang.Iterable) . |
Map<Target,ValidationResult> |
OperationCheck.canPerform(Person person,
Iterable<Target> targets)
Check whether the specified Person can perform this operation on ALL of the specified targets.
|
Map<Target,ValidationResult> |
BaseOperationCheck.canPerformAccordingToState(Person person,
Iterable<Target> targets)
Validates targets are the correct
TargetType ,
then delegates to BaseOperationCheck.canPerformAccordingToStateImpl(Person, java.lang.Iterable) . |
Map<Target,ValidationResult> |
OperationCheck.canPerformAccordingToState(Person person,
Iterable<Target> targets)
Check whether the specified Person can perform this operation on each of the specified targets based on their state.
|
protected abstract Map<Target,ValidationResult> |
BaseOperationCheck.canPerformAccordingToStateImpl(Person person,
Iterable<Target> targets)
Subclass implements this to perform canPerformAccordingToState checks on a collection of targets.
|
protected abstract Map<Target,ValidationResult> |
BaseOperationCheck.canPerformImpl(Person person,
Iterable<Target> targets)
Subclass implements this to perform canPerform checks on a collection of targets.
|
Modifier and Type | Method and Description |
---|---|
static <S extends Relatable,T extends Relatable> |
RelationDescriptors.canRelate(S source,
RelationDescriptor<S,T> relationDescriptor,
T target)
Deprecated.
since 5.11. Use
ValidatingRelationDescriptor.canRelate(Relatable, Relatable) instead |
ValidationResult |
ValidatingRelationDescriptor.canRelate(S source,
T target)
Returns
ValidationResult , which indicates if two given entities may
form a relation, described by this RelationDescriptor object |
Modifier and Type | Interface and Description |
---|---|
interface |
MergeValidationResult
A validation result that also encapsulates the result of a merge operation.
|
Modifier and Type | Class and Description |
---|---|
class |
SimpleMergeValidationResult |
class |
SimpleValidationResult
Represents the simplest kind of ValidationResult.
|
Modifier and Type | Field and Description |
---|---|
static ValidationResult |
SimpleValidationResult.FORBIDDEN
A singleton unauthorized result.
|
static ValidationResult |
SimpleValidationResult.VALID
A singleton valid result.
|
Modifier and Type | Method and Description |
---|---|
ValidationResult |
SimpleValidationResult.Builder.build() |
static ValidationResult |
SimpleValidationResults.conflictResult(String message,
Object... args)
A conflict result usually occurs when trying to create something that already exists
|
static ValidationResult |
SimpleValidationResults.forbiddenResult(String message,
Object... args) |
ValidationResult |
WithValidationResult.getValidationResult()
Deprecated.
since 5.8 - no longer used; result typically supplied via
ServiceException.getOptionalValidationResult()
instead. |
static ValidationResult |
SimpleValidationResults.notFoundResult(String message,
Object... args) |
static ValidationResult |
SimpleValidationResults.notImplementedResult(String message,
Object... args)
To be used where some functionality hasn't been implemented.
|
Modifier and Type | Method and Description |
---|---|
static com.atlassian.fugue.Function2<String,ValidationResult,? extends BadRequestException> |
ServiceExceptionSupplier.badRequestException() |
static com.atlassian.fugue.Function2<String,ValidationResult,? extends ConflictException> |
ServiceExceptionSupplier.conflictException() |
static com.atlassian.fugue.Function2<String,ValidationResult,? extends GoneException> |
ServiceExceptionSupplier.goneException() |
static com.atlassian.fugue.Function2<String,ValidationResult,? extends NotFoundException> |
ServiceExceptionSupplier.notFoundException() |
static com.atlassian.fugue.Function2<String,ValidationResult,? extends NotImplementedServiceException> |
ServiceExceptionSupplier.notImplemented() |
static com.atlassian.fugue.Function2<String,ValidationResult,? extends PermissionException> |
ServiceExceptionSupplier.permissionExceptionException() |
Modifier and Type | Method and Description |
---|---|
static SimpleMergeValidationResult.Builder |
SimpleMergeValidationResult.builder(ValidationResult result) |
Modifier and Type | Method and Description |
---|---|
SimpleValidationResult.Builder |
SimpleValidationResult.Builder.addExceptionSupplier(com.atlassian.fugue.Function2<String,ValidationResult,? extends ServiceException> exceptionSupplier) |
Constructor and Description |
---|
Builder(ValidationResult validationResult) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
AuditService.Validator.validateCreate(AuditRecord record)
Validate that an audit record can be created.
|
Modifier and Type | Method and Description |
---|---|
ValidationResult |
ContentLabelService.Validator.validateAddLabels(ContentId contentId,
Label... labels)
Validates that the list of labels can be added to the given content
|
ValidationResult |
ContentService.Validator.validateCreate(Content newContent)
Validate that a piece of content can be included, including permission checks.
|
ValidationResult |
ContentPropertyService.Validator.validateCreate(JsonContentProperty newProperty)
Validate that a content property can be created, including permission checks.
|
ValidationResult |
SpacePropertyService.Validator.validateCreate(JsonSpaceProperty newProperty)
Validate that a space property can be created, including permission checks.
|
ValidationResult |
SpaceService.Validator.validateCreate(Space newSpace,
boolean isPrivate)
Validate that a Space can be added, including permission checks.
|
ValidationResult |
ContentService.Validator.validateDelete(Content content)
Validate that a piece of content can be deleted, including permission checks.
|
ValidationResult |
AttachmentService.Validator.validateDelete(Content attachment)
Validate that an Attachment can be deleted, including permission checks.
|
ValidationResult |
ContentDraftService.DraftValidator.validateDelete(ContentId contentId)
Validates whether a draft can be deleted
|
ValidationResult |
ContentVersionService.Validator.validateDelete(ContentId contentId,
int versionNumber)
Validate delete operation
|
ValidationResult |
ContentPropertyService.Validator.validateDelete(JsonContentProperty property)
Validate that a content property can be deleted, including permission checks.
|
ValidationResult |
SpacePropertyService.Validator.validateDelete(JsonSpaceProperty property)
Validate that a space property can be deleted, including permission checks.
|
ValidationResult |
SpaceService.Validator.validateDelete(Space spaceToDelete)
Validate that a Space can be deleted, including permission checks.
|
ValidationResult |
ContentVersionService.Validator.validateGet(ContentId contentId)
Validate get operation
|
ValidationResult |
ContentTrashService.Validator.validatePurge(Content content)
Validate that a piece of content can be purged, including permission checks.
|
ValidationResult |
ContentTrashService.Validator.validateRestore(Content content)
Validate that a piece of content can be restored, including permission checks.
|
ValidationResult |
ContentVersionService.Validator.validateRestore(ContentId contentId,
VersionRestoreParameters restData)
Validate restore operation
|
ValidationResult |
ContentTrashService.Validator.validateTrash(Content content)
Validate that a piece of content can be trashed, including permission checks.
|
ValidationResult |
ContentPropertyService.Validator.validateUpdate(JsonContentProperty property)
Validate that a content property can be updated, including permission checks.
|
ValidationResult |
SpacePropertyService.Validator.validateUpdate(JsonSpaceProperty property)
Validate that a space property can be updated, including permission checks.
|
ValidationResult |
SpaceService.Validator.validateUpdate(Space space)
Validate that a Space can be updated, including permission checks.
|
Modifier and Type | Method and Description |
---|---|
ValidationResult |
ContentTemplateService.Validator.validateCreate(ContentTemplate newContentTemplate)
Validate that the specified contentTemplate can be created by the current user.
|
default ValidationResult |
ContentTemplateService.Validator.validateCreateInstance(ContentBlueprintInstance instance)
Validate instance is legit to create draft/page instance.
|
ValidationResult |
ContentTemplateService.Validator.validateDelete(ContentTemplateId contentTemplateId)
Validate that a piece of contentTemplate can be deleted, including permission checks.
|
ValidationResult |
ContentTemplateService.Validator.validateGet(ContentTemplateId contentTemplateId)
Validate that current user has permission to view a particular template.
|
ValidationResult |
ContentTemplateService.Validator.validateUpdate(ContentTemplate contentTemplate) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
BadRequestException.getValidationResult()
Deprecated.
since 5.8 - use
ServiceException.getOptionalValidationResult()
instead. |
Modifier and Type | Method and Description |
---|---|
com.atlassian.fugue.Option<ValidationResult> |
ServiceException.getOptionalValidationResult() |
Constructor and Description |
---|
BadRequestException(String message,
ValidationResult validationResult) |
ConflictException(String message,
ValidationResult validationResult) |
GoneException(String message,
ValidationResult validationResult) |
InternalServerException(String message,
ValidationResult validationResult) |
NotFoundException(String message,
ValidationResult validationResult) |
PermissionException(String message,
ValidationResult validationResult) |
ServiceException(String message,
ValidationResult validationResult) |
Constructor and Description |
---|
NotImplementedServiceException(String message,
ValidationResult validationResult) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
PersonService.Validator.validateView()
Validate that current user can view user profiles
|
ValidationResult |
GroupService.Validator.validateView()
Validate that the logged in user has permission to view groups
|
Modifier and Type | Method and Description |
---|---|
ValidationResult |
OperationService.canPerform(Person person,
Operation operation,
Target target)
Check whether a person can perform a particular operation on a particular target.
|
ValidationResult |
OperationService.canPerformWithoutExemptions(Person person,
Operation operation,
Target target)
Check whether a person can perform a particular operation on a particular target.
|
ValidationResult |
ContentRestrictionService.Validator.validateAddDirectRestrictionForSubject(ContentId contentId,
OperationKey operationKey,
Subject subject)
Validates that:
OperationKey supplied is supported
Subject supplied is either User or a Group and does exist
Content specified exists AND can be viewed by the currently logged-in user
Currently logged-in user is allowed to alter ContentRestrictions on and edit the content specified
|
ValidationResult |
ContentRestrictionService.Validator.validateAddRestrictions(ContentId contentId,
Collection<? extends ContentRestriction> contentRestrictions)
Validates that:
Content specified exists AND can be viewed by the currently logged-in user
Currently logged-in user is allowed to alter ContentRestrictions on and edit the content specified
Input data is enough to proceed with the operation
Input data should not conflict with any restrictions existing
|
ValidationResult |
ContentRestrictionService.Validator.validateDeleteAllDirectRestrictions(ContentId contentId)
Validates that:
Content specified exists AND can be viewed by the currently logged-in user
Currently logged-in user is allowed to alter ContentRestrictions on and edit the content specified
|
ValidationResult |
ContentRestrictionService.Validator.validateDeleteDirectRestrictionForSubject(ContentId contentId,
OperationKey operationKey,
Subject subject)
Validates that:
OperationKey supplied is supported
Subject supplied is either User or a Group
Content specified exists AND can be viewed by the currently logged-in user
Currently logged-in user is allowed to alter ContentRestrictions on and edit the content specified
|
ValidationResult |
ContentRestrictionService.Validator.validateGetRestrictions(ContentId contentId)
Validates whether content specified exists and whether currently logged in user can read restrictions on a content specified.
|
ValidationResult |
ContentRestrictionService.Validator.validateGetRestrictionsForOperation(ContentId contentId,
OperationKey opKey)
Validates whether OperationKey supplied is supported, whether content specified exists, whether currently logged in user can read restrictions on a content specified
|
ValidationResult |
ContentRestrictionService.Validator.validateHasDirectRestrictionsForSubject(ContentId contentId,
OperationKey operationKey,
Subject subject)
Validates that:
OperationKey supplied is supported
Subject supplied is either User or a Group
Content specified exists AND can be viewed by the currently logged-in user
|
ValidationResult |
ContentRestrictionService.Validator.validateUpdateRestrictions(ContentId contentId,
Collection<? extends ContentRestriction> contentRestrictions)
Validates that:
Content specified exists AND can be viewed by the currently logged-in user
Input data is enough to proceed with the operation
Currently logged-in user is allowed to alter ContentRestrictions on and edit the content specified
Returns first of the failed validation results or a
ValidationResult which is both authorised and valid. |
Modifier and Type | Method and Description |
---|---|
Map<Target,ValidationResult> |
OperationService.canPerform(Person person,
Operation operation,
Iterable<Target> targets)
Check whether the specified Person can perform a particular operation on each of the specified targets.
|
Map<Target,ValidationResult> |
OperationService.canPerformWithoutExemptions(Person person,
Operation operation,
Iterable<Target> targets)
Check whether the specified Person can perform a particular operation on each of the specified targets.
|
Modifier and Type | Method and Description |
---|---|
<S extends Relatable,T extends Relatable> |
RelationService.Validator.validateCreate(S source,
RelationDescriptor<S,T> relationDescriptor,
T target)
Validate create operation
|
<S extends Relatable,T extends Relatable> |
RelationService.Validator.validateDelete(S source,
RelationDescriptor<S,T> relationDescriptor,
T target)
Validate delete operation
|
<S extends Relatable,T extends Relatable> |
RelationService.Validator.validateDeleteAllWithType(Relatable relatable,
RelationDescriptor<S,T> relationDescriptor)
Validate the delete all operation
|
<S extends Relatable,T extends Relatable> |
RelationService.Validator.validateFetch(S source,
RelationDescriptor<S,T> relationDescriptor,
T target)
Validate fetch operation to check whether a user can view the specifed relation
|
Modifier and Type | Method and Description |
---|---|
ValidationResult |
WatchService.Validator.validateWatchContent(com.atlassian.sal.api.user.UserKey userKey,
ContentId content)
Validate that the user can watch a Content.
|
ValidationResult |
WatchService.Validator.validateWatchSpace(com.atlassian.sal.api.user.UserKey userKey,
String spaceKey)
Validate that the user can see a Space.
|
Modifier and Type | Method and Description |
---|---|
ValidationResult |
ContentCreator.validateCreate(ConfluenceUser confluenceUser,
Content newContent,
Class<? extends ContentEntityObject> entityClass)
Perform common validation checks for creation of content in a space
|
ValidationResult |
ContentTypeApiSupport.validateCreate(Content newContent)
Validate the create operation
|
ValidationResult |
BaseContentTypeApiSupport.validateCreate(Content newContent) |
ValidationResult |
NullCommentExtensionsSupport.validateExtensionsForCreate(Map<String,Object> extensions,
SimpleValidationResult.Builder validationResultBuilder) |
ValidationResult |
CommentExtensionsSupport.validateExtensionsForCreate(Map<String,Object> extensions,
SimpleValidationResult.Builder validationResultBuilder)
Validation hook for create operations.
|
ValidationResult |
NullCommentExtensionsSupport.validateExtensionsForUpdate(Comment comment,
Map<String,Object> extensions,
SimpleValidationResult.Builder validationResultBuilder) |
ValidationResult |
CommentExtensionsSupport.validateExtensionsForUpdate(Comment comment,
Map<String,Object> extensions,
SimpleValidationResult.Builder validationResultBuilder)
Validation hook for update operations.
|
ValidationResult |
ContentCreator.validateUpdate(ConfluenceUser user,
Content updatedContent,
ContentEntityObject entity)
Perform common validation checks for updating content
|
ValidationResult |
ContentTypeApiSupport.validateUpdate(Content oldContent,
T existingEntity)
Validate the update operation
|
ValidationResult |
BaseContentTypeApiSupport.validateUpdate(Content updatedContent,
T existingEntity) |
Modifier and Type | Method and Description |
---|---|
Map<Long,ValidationResult> |
DefaultContentPermissionManager.hasContentLevelPermission(ConfluenceUser user,
String permissionType,
Collection<Long> contentIds) |
Modifier and Type | Method and Description |
---|---|
Map<Long,ValidationResult> |
ContentPermissionManagerInternal.hasContentLevelPermission(ConfluenceUser user,
String permissionType,
Collection<Long> contentIds)
Check permission for a collection of content at once.
|
Modifier and Type | Method and Description |
---|---|
static ValidationResult |
RelationUtils.validateAgainstApiModel(RelatableEntity source,
RelatableEntity target,
RelationDescriptor relationDescriptor)
Helper method, which can be used to validate relation based on input parameters.
|
Modifier and Type | Method and Description |
---|---|
static String |
RelationUtils.extractError(ValidationResult validationResult,
String defaultMessage)
Extracts all errors from the
ValidationResult as a single
String . |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
DummyAvailableContentTypeSupport.validateCreate(Content newContent) |
ValidationResult |
DummyCommentExtensionSupport.validateExtensionsForCreate(Map<String,Object> extensions,
SimpleValidationResult.Builder validationResultBuilder) |
ValidationResult |
DummyCommentExtensionSupport.validateExtensionsForUpdate(Comment comment,
Map<String,Object> extensions,
SimpleValidationResult.Builder validationResultBuilder) |
ValidationResult |
DummyAvailableContentTypeSupport.validateUpdate(Content updatedContent,
CustomContentEntityObject existingEntity) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
SpacePropertyValidatorImpl.validateCreate(JsonSpaceProperty newProperty) |
ValidationResult |
SpacePropertyValidatorImpl.validateDelete(JsonSpaceProperty property) |
ValidationResult |
SpacePropertyValidatorImpl.validateUpdate(JsonSpaceProperty property) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
RestError.getData()
The data returned here is a
ValidationResult so that clients can process the i18n key and
arguments. |
Modifier and Type | Class and Description |
---|---|
class |
RestValidationResult
REST-friendly version of a
ValidationResult . |
Constructor and Description |
---|
RestValidationResult(ValidationResult that) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
AggregationWarningManager.setAcknowledged(ConfluenceUser user) |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
Validation.fail() |
ValidationResult |
Validation.getValidationResult() |
Modifier and Type | Method and Description |
---|---|
com.atlassian.fugue.Either<ValidationResult,T> |
Validation.toEither()
Returns an either projection of this validation.
|
Modifier and Type | Method and Description |
---|---|
static MessageHolder |
XWorkValidationResultSupport.addAllMessages(MessageHolder holder,
ValidationResult validationResult) |
static <T> Validation<T> |
Validation.fail(ValidationResult fail) |
Copyright © 2003–2017 Atlassian. All rights reserved.