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 java.lang.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, java.lang.String path)
           
 Content.ContentBuilder ancestors(java.lang.Iterable<Content> ancestors)
           
 Content.ContentBuilder body(java.util.Map<ContentRepresentation,ContentBody> body)
           
 Content.ContentBuilder body(java.lang.String value, ContentRepresentation format)
           
 Content build()
           
 Content.ContentBuilder children(java.util.Map<ContentType,PageResponse<Content>> children)
           
 Content.ContentBuilder container(Container container)
           
 Content.ContentBuilder descendants(java.util.Map<ContentType,PageResponse<Content>> descendants)
           
 Content.ContentBuilder history(History history)
           
 Content.ContentBuilder history(Reference<History> history)
           
 Content.ContentBuilder id(ContentId id)
           
 Content.ContentBuilder metadata(java.util.Map<java.lang.String,java.lang.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(java.lang.String spaceKey)
           
 Content.ContentBuilder title(java.lang.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)

title

public Content.ContentBuilder title(java.lang.String title)

addLink

public Content.ContentBuilder addLink(Link link)

addLink

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

history

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

history

public Content.ContentBuilder history(History history)

space

public Content.ContentBuilder space(java.lang.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(java.lang.Iterable<Content> ancestors)

children

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

descendants

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

body

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

body

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

metadata

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

version

public Content.ContentBuilder version(Version version)

version

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


Copyright © 2003-2014 Atlassian. All Rights Reserved.