com.atlassian.confluence.plugins.contentproperty
Class ContentPropertyFactory

java.lang.Object
  extended by com.atlassian.confluence.plugins.contentproperty.ContentPropertyFactory

public class ContentPropertyFactory
extends Object

Factory for ContentProperty objects

Since:
5.6

Constructor Summary
ContentPropertyFactory(ContentService contentService)
           
 
Method Summary
 JsonContentProperty buildFrom(Content content, CustomContentEntityObject storageContentProperty, Expansions expansions)
          Convert the given CustomContentEntityObject into a corresponding ContentProperty with the given container.
 JsonContentProperty buildFrom(CustomContentEntityObject storageContentProperty, Expansions expansions)
          Convert the given CustomContentEntityObject into a corresponding ContentProperty.
 com.google.common.base.Function<CustomContentEntityObject,JsonContentProperty> buildFromFunction(Content content, Expansions expansions)
           
 Version makeVersion(ContentEntityObject entity)
           
 Reference<Version> makeVersion(ContentEntityObject entity, boolean expanded)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentPropertyFactory

public ContentPropertyFactory(ContentService contentService)
Method Detail

buildFromFunction

public com.google.common.base.Function<CustomContentEntityObject,JsonContentProperty> buildFromFunction(Content content,
                                                                                                        Expansions expansions)

buildFrom

public JsonContentProperty buildFrom(CustomContentEntityObject storageContentProperty,
                                     Expansions expansions)
                              throws NotFoundException
Convert the given CustomContentEntityObject into a corresponding ContentProperty.

Parameters:
storageContentProperty - the storage value to convert
expansions - the properties to expand while building the ContentProperty
Returns:
the property
Throws:
NotFoundException - if the referenced owner in the storageContentProperty cannot be found via the ContentService

buildFrom

public JsonContentProperty buildFrom(Content content,
                                     CustomContentEntityObject storageContentProperty,
                                     Expansions expansions)
Convert the given CustomContentEntityObject into a corresponding ContentProperty with the given container.

Parameters:
content - the container. This must have been initialized via the ContentService or ContentFactory, rather than deserialized from the client
storageContentProperty - the storage value to convert
expansions - the properties to expand while building the ContentProperty
Returns:
the property

makeVersion

public Version makeVersion(ContentEntityObject entity)

makeVersion

public Reference<Version> makeVersion(ContentEntityObject entity,
                                      boolean expanded)


Copyright © 2003–2015 Atlassian. All rights reserved.