Class DefaultRestEntityFactory
- java.lang.Object
-
- com.atlassian.confluence.rest.serialization.DefaultRestEntityFactory
-
- All Implemented Interfaces:
RestEntityFactory
public class DefaultRestEntityFactory extends Object implements RestEntityFactory
-
-
Constructor Summary
Constructors Constructor Description DefaultRestEntityFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> RestEntity<T>
create(T entity, boolean graphql)
Creates a RestEntity that wraps the provided entity.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.rest.api.services.RestEntityFactory
create
-
-
-
-
Method Detail
-
create
public <T> RestEntity<T> create(T entity, boolean graphql)
Description copied from interface:RestEntityFactory
Creates a RestEntity that wraps the provided entity. All of the fields on the entity that have been annotated with JsonProperty will be available in the resultant RestEntities properties map.Any fields referenced by the entity that have the RestEnrichable annotation will also be converted to RestEntities.
Fields annotated with JsonProperty that implement Iterable will have their contents converted to RestEntities if the content class has the RestEnrichable annotation. Likewise Maps will have their values converted.
- Specified by:
create
in interfaceRestEntityFactory
- Parameters:
entity
- The entity to wrapgraphql
- True to include fields with the {@see GraphQLName} annotation- Returns:
- a RestEntity that wraps the entity exposing it fields in the properties map
-
-