Package lumis.content.core
Interface IContentManager
-
- All Known Implementing Classes:
ContentManager
@StableMinor(version="14.1", sinceVersion="4.2") public interface IContentManager
Provides content management operations.- Since:
- 4.2.0
- Version:
- $Revision: 24684 $ $Date: 2021-08-23 18:58:35 -0300 (Mon, 23 Aug 2021) $
- See Also:
lumis.content.core
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addContent(Content content)
Adds a content to persistence.void
deleteContent(Content content)
Deletes a content from persistence.Content
getContent(String contentId)
Returns a persistent content instance.Content
getContentByItemId(String itemId)
Returns the content related with the specified business data.ContentLocale
getContentLocale(String contentLocaleId)
Returns the a content locale by its identifier.ContentVersion
getContentVersion(String contentVersionId)
Returns the a content version by its identifier.ContentVersion
getContentVersionByItemId(String itemId)
Returns the a content version that refers the given itemId.ContentVersion
getPublishedContentVersion(String contentId, String serviceInstanceId)
Returns the published version more appropriated to the current user for the specified content and service instance.void
lock(String contentLocaleId, LockType lockType)
Locks contentlocale acording to lockType.void
releaseLock(String contentLocaleId)
Releases the lock for the contentLocale.void
scheduleReindex(Content content)
Schedules the re-indexing of a content after the current transaction commits.
-
-
-
Method Detail
-
addContent
void addContent(Content content) throws PortalException
Adds a content to persistence.- Parameters:
content
- the transient content instance to be persisted.- Throws:
PortalException
- Since:
- 4.2.0
-
getContent
Content getContent(String contentId) throws PortalException
Returns a persistent content instance.- Parameters:
contentId
- the content's identifier.- Returns:
- a persistent content instance.
- Throws:
PortalObjectNotFoundException
- if no content with such id was found.PortalException
- Since:
- 4.2.0
-
deleteContent
void deleteContent(Content content) throws PortalException
Deletes a content from persistence.- Parameters:
content
- the persistent content instance to be deleted.- Throws:
PortalException
- Since:
- 4.2.0
-
getContentByItemId
Content getContentByItemId(String itemId) throws PortalException
Returns the content related with the specified business data.- Parameters:
itemId
- the business data identifier.- Returns:
- a persistent content instance.
- Throws:
PortalObjectNotFoundException
- if no content for such itemId was found.PortalException
- Since:
- 4.2.0
-
scheduleReindex
void scheduleReindex(Content content) throws PortalException
Schedules the re-indexing of a content after the current transaction commits.Re-indexing of contents occurs automatically when a content's metadata is affected, so this method normally is not needed to be used directly. But this may be used in case of a customized change of content's data that doesn't trigger the re-indexing automatically.
- Parameters:
content
- the content.- Throws:
PortalException
- Since:
- 4.2.0
-
getContentLocale
ContentLocale getContentLocale(String contentLocaleId) throws PortalException
Returns the a content locale by its identifier.- Parameters:
contentLocaleId
- the content locale identifier.- Returns:
- the content locale.
- Throws:
PortalObjectNotFoundException
- if no content locale with the given identifier was found.PortalException
- Since:
- 4.2.0
-
getContentVersion
ContentVersion getContentVersion(String contentVersionId) throws PortalException
Returns the a content version by its identifier.- Parameters:
contentVersionId
- the content version identifier.- Returns:
- the content version.
- Throws:
PortalObjectNotFoundException
- if no content version with the given identifier was found.PortalException
- Since:
- 4.2.0
-
getContentVersionByItemId
ContentVersion getContentVersionByItemId(String itemId) throws PortalException
Returns the a content version that refers the given itemId.- Parameters:
itemId
- the item identifier.- Returns:
- the content version.
- Throws:
PortalObjectNotFoundException
- if no such content version was found.PortalException
- Since:
- 4.2.0
-
getPublishedContentVersion
ContentVersion getPublishedContentVersion(String contentId, String serviceInstanceId) throws PortalException
Returns the published version more appropriated to the current user for the specified content and service instance.- Parameters:
contentId
- the content identifier.serviceInstanceId
- the service instance identifier where the version is published to. This is an optional argument, ifnull
, the publication to service instance is not used to filter the version query.- Returns:
- the content version.
- Throws:
PortalObjectNotFoundException
- if no version published to the user and service instance, in the appropriated locale, was found.PortalException
- Since:
- 4.2.0
-
lock
void lock(String contentLocaleId, LockType lockType) throws PortalException, ContentLocaleAlreadyLockedException
Locks contentlocale acording to lockType. If lock metadata is not available for the content, this method does nothing and does not throw exception regarding metadata not configured for this content. It creates a new transaction to execute the update.- Parameters:
contentLocaleId
- the id of the content-locale to change its lock.lockType
- defines what type of lock that the content-locale should have. SeeLockType
.- Throws:
ContentLocaleAlreadyLockedException
- when there already is a lock on the content-locale and the person trying to lock is not the current lock owner.AccessDeniedException
- if the current user does not have permission to lock the content locale.PortalException
- Since:
- 6.0.0
-
releaseLock
void releaseLock(String contentLocaleId) throws PortalException
Releases the lock for the contentLocale. If lock metadata is not available for the content, this method does nothing and does not throw exception regarding metadata not configured this content.. It creates a new transaction to execute the update.- Parameters:
contentLocaleId
- the id of the content-locale to release its lock.- Throws:
AccessDeniedException
- if the current user does not have permission to release the lock on the content locale.PortalException
- Since:
- 6.0.0
-
-