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

java.lang.Object
  extended by com.atlassian.confluence.api.model.content.Content
All Implemented Interfaces:
Container

@ExperimentalApi
public class Content
extends java.lang.Object
implements Container

Represents all the different kinds of content that can be housed in Confluence: pages, blog posts, comments and so on.


Nested Class Summary
static class Content.ContentBuilder
          Builds Content objects.
 
Method Summary
static Content.ContentBuilder builder()
          Returns a Content.ContentBuilder instance that can be used to create a new Content object.
static Content.ContentBuilder builder(Content content)
          Returns a Content.ContentBuilder instance that clones an existing Content object.
static Content.ContentBuilder builder(ContentType type)
          Returns a Content.ContentBuilder instance that can be used to create a new Content object.
static Reference<Content> buildReference(java.lang.String id)
           
 java.util.List<ContentLink> getAncestors()
           
 java.util.Map<ContentRepresentation,ContentBody> getBody()
           
 Container getContainer()
          Returns the container for this Content, which for Pages and Blog Posts will be the Space, and for Comments the Page or BlogPost.
protected  java.lang.Class getContainerType()
           
static java.lang.String getContentId(Reference<Content> contentRef)
          get the content id from the Reference to a piece of content
 History getHistory()
           
 Reference<History> getHistoryRef()
           
 java.lang.String getId()
           
 java.util.Map<java.lang.String,java.lang.Object> getMetadata()
           
 java.util.Map<Permission,java.lang.Boolean> getPermissions()
           
 Reference<Space> getSpaceRef()
           
 com.atlassian.fugue.Option<java.lang.String> getTinyUrlPath()
           
 java.lang.String getTitle()
           
 ContentType getType()
           
 Version getVersion()
           
 java.lang.String getWebUrlPath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContentId

public static java.lang.String getContentId(Reference<Content> contentRef)
get the content id from the Reference to a piece of content

Parameters:
contentRef -
Returns:
the contentId or null if the referenced content does not have a contentId.

builder

public static Content.ContentBuilder builder()
Returns a Content.ContentBuilder instance that can be used to create a new Content object.


builder

public static Content.ContentBuilder builder(ContentType type)
Returns a Content.ContentBuilder instance that can be used to create a new Content object.

Parameters:
type - the type of Content to create

builder

public static Content.ContentBuilder builder(Content content)
Returns a Content.ContentBuilder instance that clones an existing Content object.

Parameters:
content - the Content to clone

buildReference

public static Reference<Content> buildReference(java.lang.String id)
Parameters:
id -
Returns:
a collapsed reference to a piece of content with the given ID

getId

public java.lang.String getId()

getType

public ContentType getType()

getTitle

public java.lang.String getTitle()

getWebUrlPath

public java.lang.String getWebUrlPath()

getTinyUrlPath

public com.atlassian.fugue.Option<java.lang.String> getTinyUrlPath()

getHistoryRef

public Reference<History> getHistoryRef()

getHistory

public History getHistory()

getSpaceRef

public Reference<Space> getSpaceRef()

getContainer

public Container getContainer()
Returns the container for this Content, which for Pages and Blog Posts will be the Space, and for Comments the Page or BlogPost. The container class MUST be serializable for REST. For the parent of this Content, use getAncestors().


getContainerType

protected java.lang.Class getContainerType()

getAncestors

public java.util.List<ContentLink> getAncestors()

getBody

public java.util.Map<ContentRepresentation,ContentBody> getBody()

getPermissions

public java.util.Map<Permission,java.lang.Boolean> getPermissions()

getMetadata

public java.util.Map<java.lang.String,java.lang.Object> getMetadata()

getVersion

public Version getVersion()


Copyright © 2003-2014 Atlassian. All Rights Reserved.