Package lumis.content.core
Class ContentUtilInternal
- java.lang.Object
-
- lumis.content.core.ContentUtilInternal
-
public class ContentUtilInternal extends Object
Content utilities.- Since:
- 10.2.0
- Version:
- $Revision: 24684 $ $Date: 2021-08-23 18:58:35 -0300 (Mon, 23 Aug 2021) $
-
-
Constructor Summary
Constructors Constructor Description ContentUtilInternal()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<ContentUniqueSlug>
findAlternativeSlug(ContentUniqueSlug uniqueSlug)
Returns an optional alternative unique slug.static Optional<Tuple2<String,Locale>>
findContentLocaleByUniqueSlug(ContentUniqueSlug uniqueSlug)
Returns an optional Tuple ofof the content that refer to the given unique slug. static String
getContentId(String id)
Returns thecontent identifier
based on the given identifier ornull
if none could be inferred.static String
getItemId(String id, String localeId)
Returns theitem identifier
based on the given identifier ornull
if none could be inferred.static boolean
isContentPublished(String contentId)
Returns whether the content with the given identifier exists and it is published.
-
-
-
Method Detail
-
isContentPublished
public static boolean isContentPublished(String contentId) throws PortalException
Returns whether the content with the given identifier exists and it is published.- Parameters:
contentId
- the content identifier.- Returns:
- whether the content with the given identifier exists and it is published.
- Throws:
PortalException
- Since:
- 10.2.0
-
getItemId
public static String getItemId(String id, String localeId) throws PortalException
Returns theitem identifier
based on the given identifier ornull
if none could be inferred. Tries to use the given identifier as item id or contentId.- Parameters:
id
- the identifier.localeId
- the desired locale.- Returns:
- the
item identifier
based on the given identifier ornull
if none could be inferred - Throws:
PortalException
- Since:
- 11.1.0
-
getContentId
public static String getContentId(String id) throws PortalException
Returns thecontent identifier
based on the given identifier ornull
if none could be inferred. Tries to use the given identifier as item id or contentId.- Parameters:
id
- the identifier.- Returns:
- the
item identifier
based on the given identifier ornull
if none could be inferred - Throws:
PortalException
- Since:
- 11.1.0
-
findContentLocaleByUniqueSlug
public static Optional<Tuple2<String,Locale>> findContentLocaleByUniqueSlug(ContentUniqueSlug uniqueSlug) throws PortalException
Returns an optional Tuple ofof the content that refer to the given unique slug. - Parameters:
uniqueSlug
- the unique slug- Returns:
- an optional Tuple of
of the content that refer to the given unique slug. - Throws:
PortalException
- Since:
- 14.1.0
-
findAlternativeSlug
public static Optional<ContentUniqueSlug> findAlternativeSlug(ContentUniqueSlug uniqueSlug) throws PortalException
Returns an optional alternative unique slug.- Parameters:
uniqueSlug
- the unique slug- Returns:
- an optional alternative unique slug.
- Throws:
PortalException
- Since:
- 14.1.0
-
-