public class AttachmentContentTypeApiSupport extends BaseContentTypeApiSupport<Attachment>
Attachment
s.Constructor and Description |
---|
AttachmentContentTypeApiSupport(ContentEntityManager contentEntityManager,
AttachmentFactory attachmentFactory,
AttachmentManagerInternal attachmentManager,
PaginationService paginationService,
PermissionManager permissionManager,
ApiSupportProvider apiSupportProvider) |
Modifier and Type | Method and Description |
---|---|
PageResponse<Content> |
getAttachments(ContentId containerId,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super Attachment> predicate,
Expansions contentExpansions) |
com.atlassian.fugue.Option<Content> |
getById(ContentId attachmentId,
List<ContentStatus> statuses,
Expansions expansions) |
protected PageResponse<Content> |
getChildrenForThisType(Attachment content,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth) |
PageResponse<Content> |
getChildrenOfThisTypeForOtherType(ContentConvertible parent,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth) |
Class<Attachment> |
getEntityClass()
Get the class of the hibernate object used to persist the content type handled by this api support
|
Map<ContentId,Map<String,Object>> |
getExtensions(Iterable<Attachment> attachments,
Expansions expansions)
Get the set of extension properties for the collection of contentEntity Ids.
|
ContentType |
getHandledType() |
List<Link> |
getLinks(Attachment attachment)
Get additional link properties for the _links map
Implementors should override and provide links for the given contentEntity
|
boolean |
supportsChildrenForParentType(ContentType parentType) |
boolean |
supportsChildrenOfType(ContentType otherType)
A check that to allow other ContentTypeApiSupports to provide children for this type
|
ValidationResult |
validateCreate(Content newContent)
Validate the create operation
|
ValidationResult |
validateUpdate(Content updatedContent,
Attachment existingEntity)
Validate the update operation
|
create, getChildren, getChildrenForThisType, getChildrenOfThisTypeForOtherType, getContainer, update
public AttachmentContentTypeApiSupport(ContentEntityManager contentEntityManager, AttachmentFactory attachmentFactory, AttachmentManagerInternal attachmentManager, PaginationService paginationService, PermissionManager permissionManager, ApiSupportProvider apiSupportProvider)
public PageResponse<Content> getChildrenOfThisTypeForOtherType(ContentConvertible parent, LimitedRequest limitedRequest, Expansions expansions, Depth depth)
getChildrenOfThisTypeForOtherType
in class BaseContentTypeApiSupport<Attachment>
public PageResponse<Content> getAttachments(ContentId containerId, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super Attachment> predicate, Expansions contentExpansions) throws ServiceException
ServiceException
public com.atlassian.fugue.Option<Content> getById(ContentId attachmentId, List<ContentStatus> statuses, Expansions expansions)
public ContentType getHandledType()
ContentType
of the Content
that this service provides.protected PageResponse<Content> getChildrenForThisType(Attachment content, LimitedRequest limitedRequest, Expansions expansions, Depth depth)
getChildrenForThisType
in class BaseContentTypeApiSupport<Attachment>
public boolean supportsChildrenOfType(ContentType otherType)
BaseContentTypeApiSupport
supportsChildrenOfType
in interface ContentTypeApiSupport<Attachment>
supportsChildrenOfType
in class BaseContentTypeApiSupport<Attachment>
otherType
- - the other Content type that wants to offer children of our typepublic boolean supportsChildrenForParentType(ContentType parentType)
supportsChildrenForParentType
in interface ContentTypeApiSupport<Attachment>
supportsChildrenForParentType
in class BaseContentTypeApiSupport<Attachment>
Content
of this binding's ContentType
can be a child of contentEntity of the given typepublic Map<ContentId,Map<String,Object>> getExtensions(Iterable<Attachment> attachments, Expansions expansions)
BaseContentTypeApiSupport
getExtensions
in interface ContentTypeApiSupport<Attachment>
getExtensions
in class BaseContentTypeApiSupport<Attachment>
public List<Link> getLinks(Attachment attachment)
BaseContentTypeApiSupport
getLinks
in interface ContentTypeApiSupport<Attachment>
getLinks
in class BaseContentTypeApiSupport<Attachment>
public Class<Attachment> getEntityClass()
ContentTypeApiSupport
public ValidationResult validateCreate(Content newContent)
ContentTypeApiSupport
validateCreate
in interface ContentTypeApiSupport<Attachment>
validateCreate
in class BaseContentTypeApiSupport<Attachment>
newContent
- the content that will be used to create an entitypublic ValidationResult validateUpdate(Content updatedContent, Attachment existingEntity)
ContentTypeApiSupport
validateUpdate
in interface ContentTypeApiSupport<Attachment>
validateUpdate
in class BaseContentTypeApiSupport<Attachment>
updatedContent
- the content that will be used to update the entityexistingEntity
- the existing entity to be updatedCopyright © 2003–2015 Atlassian. All rights reserved.