|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.content.core.ContentManager
public class ContentManager
Content manager implementation.
Constructor Summary | |
---|---|
ContentManager()
|
Method Summary | |
---|---|
void |
addContent(Content content)
Adds a content to persistence. |
void |
deleteContent(Content content)
Deletes a content from persistence. |
String |
getActiveVersionItemIdByItemId(String itemId)
Try to find the item id of the
active version of the
ContentLocale that the ContentVersion with the given item
id belongs to. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentManager()
Method Detail |
---|
public void addContent(Content content) throws PortalException
IContentManager
addContent
in interface IContentManager
content
- the transient content instance to be persisted.
PortalException
public void deleteContent(Content content) throws PortalException
IContentManager
deleteContent
in interface IContentManager
content
- the persistent content instance to be deleted.
PortalException
public Content getContent(String contentId) throws PortalException
IContentManager
getContent
in interface IContentManager
contentId
- the content's identifier.
PortalObjectNotFoundException
- if no content with such id was found.
PortalException
public Content getContentByItemId(String itemId) throws PortalException
IContentManager
getContentByItemId
in interface IContentManager
itemId
- the business data identifier.
PortalObjectNotFoundException
- if no content for such itemId was found.
PortalException
public void scheduleReindex(Content content) throws PortalException
IContentManager
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.
scheduleReindex
in interface IContentManager
content
- the content.
PortalException
public ContentLocale getContentLocale(String contentLocaleId) throws PortalException
IContentManager
getContentLocale
in interface IContentManager
contentLocaleId
- the content locale identifier.
PortalObjectNotFoundException
- if no content locale with the
given identifier was found.
PortalException
public ContentVersion getContentVersionByItemId(String itemId) throws PortalException
IContentManager
getContentVersionByItemId
in interface IContentManager
itemId
- the item identifier.
PortalObjectNotFoundException
- if no such content version was found.
PortalException
public ContentVersion getContentVersion(String contentVersionId) throws PortalException
IContentManager
getContentVersion
in interface IContentManager
contentVersionId
- the content version identifier.
PortalObjectNotFoundException
- if no content version with the
given identifier was found.
PortalException
public ContentVersion getPublishedContentVersion(String contentId, String serviceInstanceId) throws PortalException
IContentManager
getPublishedContentVersion
in interface IContentManager
contentId
- the content identifier.serviceInstanceId
- the service instance identifier where the
version is published to. This is an optional argument, if null
,
the publication to service instance is not used to filter the version
query.
PortalObjectNotFoundException
- if no version published to the
user and service instance, in the appropriated locale, was found.
PortalException
public void lock(String contentLocaleId, LockType lockType) throws ContentLocaleAlreadyLockedException, PortalException
IContentManager
lock
in interface IContentManager
contentLocaleId
- the id of the content-locale to change its lock.lockType
- defines what type of lock that the content-locale should have. See LockType
.
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
public void releaseLock(String contentLocaleId) throws PortalException
IContentManager
releaseLock
in interface IContentManager
contentLocaleId
- the id of the content-locale to release its lock.
AccessDeniedException
- if the current user does not have permission to release the lock on the content locale.
PortalException
public String getActiveVersionItemIdByItemId(String itemId) throws NoActiveVersionPossibleMappingException, PortalException
item id
of the
active version
of the
ContentLocale
that the ContentVersion
with the given item
id belongs to.
itemId
- the item id.
NoActiveVersionPossibleMappingException
- if no mapping could be done.
PortalException
- if any other problem occur.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |