Package lumis.content.source.field.type
Class CategorizationDataType.Data
- java.lang.Object
-
- lumis.content.source.field.type.CategorizationDataType.Data
-
- All Implemented Interfaces:
IRenderable
- Enclosing class:
- CategorizationDataType
public static class CategorizationDataType.Data extends Object implements IRenderable
Categorization data of a given content.- Since:
- 9.0.0
- Version:
- $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
-
-
Constructor Summary
Constructors Constructor Description Data(Collection<String> termIds, Locale locale)
Creates a new categorization data of the given categorization content identifiers.Data(ContentVersion contentVersion, Locale locale)
Creates a new categorization data of the categorization related to the given content version.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
buildRestJSONMap()
Returns the Rest JSON map representation of this data.String
getDisplayString(IRenderer renderer)
Returns the string to be displayed for representing this instance, when a short display is required.Map<String,CategorizationDataType.CategorizationGroupData>
getGroups()
Returns the categorization grouped by each categorization service instance identifier.String
getRenderData(IRenderer renderer)
Returns the data of this object in a standard xml format.String
getXmlString()
Returns the XML string of this data.CategorizationDataType.Data
hydrateTermsTree()
Hydrate this data by adding all existing direct association terms' sub-trees.
-
-
-
Constructor Detail
-
Data
public Data(ContentVersion contentVersion, Locale locale) throws PortalException
Creates a new categorization data of the categorization related to the given content version.- Parameters:
contentVersion
- the content version.locale
- the locale to be used when determining the terms names.- Throws:
PortalException
- Since:
- 9.0.0
-
Data
public Data(Collection<String> termIds, Locale locale) throws PortalException
Creates a new categorization data of the given categorization content identifiers. All terms passed as parameters will be marked as direct association. Other (their ancestors) won't be marked as direct association.- Parameters:
termIds
- the terms content identifiers.locale
- the locale to be used to get appropriate strings.- Throws:
PortalException
- Since:
- 9.0.0
-
-
Method Detail
-
hydrateTermsTree
public CategorizationDataType.Data hydrateTermsTree()
Hydrate this data by adding all existing direct association terms' sub-trees. The added terms will be marked as direct association as well.- Returns:
- this data.
- Since:
- 9.0.0
-
getGroups
public Map<String,CategorizationDataType.CategorizationGroupData> getGroups()
Returns the categorization grouped by each categorization service instance identifier.- Returns:
- the categorization grouped by each categorization service instance identifier.
- Since:
- 9.0.0
-
getXmlString
public String getXmlString() throws PortalException
Returns the XML string of this data.- Returns:
- the XML string of this data.
- Throws:
PortalException
- Since:
- 9.0.0
-
buildRestJSONMap
public Map<String,Object> buildRestJSONMap()
Returns the Rest JSON map representation of this data.- Returns:
- the Rest JSON map representation of this data.
- Since:
- 9.0.0
-
getRenderData
public String getRenderData(IRenderer renderer) throws PortalException
Description copied from interface:IRenderable
Returns the data of this object in a standard xml format.- Specified by:
getRenderData
in interfaceIRenderable
- Parameters:
renderer
- the renderer object that will use the returned render data.- Returns:
- the xml data for this object.
- Throws:
PortalException
-
getDisplayString
public String getDisplayString(IRenderer renderer) throws PortalException
Description copied from interface:IRenderable
Returns the string to be displayed for representing this instance, when a short display is required.- Specified by:
getDisplayString
in interfaceIRenderable
- Parameters:
renderer
- the renderer object that will use the returned render data.- Returns:
- the string to be used to friendly display this instance.
- Throws:
PortalException
-
-