com.atlassian.confluence.api.model.content
Class Content.ContentBuilder

java.lang.Object
  extended by com.atlassian.confluence.api.model.content.Content.ContentBuilder
Enclosing class:
Content

public static class Content.ContentBuilder
extends Object

Builds Content objects.


Constructor Summary
protected Content.ContentBuilder(ContentType type)
          Create new builders with Content.builder(ContentType).
protected Content.ContentBuilder(ContentType type, long id)
          Create new builders with Content.builder(ContentType) and a ContentId generated from the ContentType and the Long id.
 
Method Summary
 Content.ContentBuilder addLink(Link link)
           
 Content.ContentBuilder addLink(LinkType type, String path)
           
 Content.ContentBuilder ancestors(Iterable<Content> ancestors)
           
 Content.ContentBuilder body(Map<ContentRepresentation,ContentBody> body)
           
 Content.ContentBuilder body(String value, ContentRepresentation format)
           
 Content build()
           
 Content.ContentBuilder children(Map<ContentType,PageResponse<Content>> children)
           
 Content.ContentBuilder container(Container container)
           
 Content.ContentBuilder descendants(Map<ContentType,PageResponse<Content>> descendants)
           
 Content.ContentBuilder extension(String key, Object value)
           
 Content.ContentBuilder extensions(Map<String,Object> extensions)
           
 Content.ContentBuilder history(History history)
           
 Content.ContentBuilder history(Reference<History> history)
           
 Content.ContentBuilder id(ContentId id)
           
 Content.ContentBuilder metadata(Map<String,Object> metadata)
           
 Content.ContentBuilder parent(Content parent)
          Shortcut method for creating ancestors with a single item of Content
 Content.ContentBuilder space(Reference<Space> space)
           
 Content.ContentBuilder space(Space space)
           
 Content.ContentBuilder space(String spaceKey)
           
 Content.ContentBuilder status(ContentStatus status)
           
 Content.ContentBuilder title(String title)
           
 Content.ContentBuilder type(ContentType type)
           
 Content.ContentBuilder version(Reference<Version> version)
           
 Content.ContentBuilder version(Version version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Content.ContentBuilder

protected Content.ContentBuilder(ContentType type)
Create new builders with Content.builder(ContentType).


Content.ContentBuilder

protected Content.ContentBuilder(ContentType type,
                                 long id)
Create new builders with Content.builder(ContentType) and a ContentId generated from the ContentType and the Long id.

Method Detail

type

public Content.ContentBuilder type(ContentType type)

build

public Content build()

id

public Content.ContentBuilder id(ContentId id)

status

public Content.ContentBuilder status(ContentStatus status)

title

public Content.ContentBuilder title(String title)

addLink

public Content.ContentBuilder addLink(Link link)

addLink

public Content.ContentBuilder addLink(LinkType type,
                                      String path)

history

public Content.ContentBuilder history(Reference<History> history)

history

public Content.ContentBuilder history(History history)

space

public Content.ContentBuilder space(String spaceKey)

space

public Content.ContentBuilder space(Space space)

space

public Content.ContentBuilder space(Reference<Space> space)

container

public Content.ContentBuilder container(Container container)

parent

public Content.ContentBuilder parent(Content parent)
Shortcut method for creating ancestors with a single item of Content

Parameters:
parent - the parent Content
Returns:
this builder

ancestors

public Content.ContentBuilder ancestors(Iterable<Content> ancestors)

children

public Content.ContentBuilder children(Map<ContentType,PageResponse<Content>> children)

descendants

public Content.ContentBuilder descendants(Map<ContentType,PageResponse<Content>> descendants)

body

public Content.ContentBuilder body(String value,
                                   ContentRepresentation format)

body

public Content.ContentBuilder body(Map<ContentRepresentation,ContentBody> body)

metadata

public Content.ContentBuilder metadata(Map<String,Object> metadata)

extensions

public Content.ContentBuilder extensions(Map<String,Object> extensions)

extension

public Content.ContentBuilder extension(String key,
                                        Object value)

version

public Content.ContentBuilder version(Version version)

version

public Content.ContentBuilder version(Reference<Version> version)


Copyright © 2003–2015 Atlassian. All rights reserved.