com.atlassian.confluence.plugins.contentproperty
Class ContentPropertyFactory
java.lang.Object
com.atlassian.confluence.plugins.contentproperty.ContentPropertyFactory
public class ContentPropertyFactory
- extends java.lang.Object
Factory for ContentProperty objects
- Since:
- 5.6
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContentPropertyFactory
public ContentPropertyFactory(ContentService contentService)
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 convertexpansions
- 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 clientstorageContentProperty
- the storage value to convertexpansions
- 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-2014 Atlassian. All Rights Reserved.