public class ContentMetaDataController extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ContentMetaDataController.MetaDataPersistenceResult
Stores the result of updating or adding a content.
|
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_ID_ATTRIBUTE
Attribute name used by default content process action handlers to store
the content identifier of the data added or updated.
|
static String |
CONTENT_VERSION_ID_ATTRIBUTE
Attribute name used by default content process action handlers to store
the content version identifier of the data added or updated.
|
static String |
CONTENTID_PARAMETER_SUFIX |
static String |
DOUI_EDITING_VERSION_PARAMETER_NAME
Doui editing version parameter name.
|
static String |
IS_DEFAULT_LOCALE_PARAMETER_SUFIX |
static String |
LANGUAGE_ID_PARAMETER_SUFIX |
protected String |
languageParameterPrefix |
static String |
NEW_VERSION_PRIMARY_KEY_PARAMETER |
protected IParameters |
parameters |
protected ContentTableSource |
source |
protected ITransaction |
transaction |
Constructor and Description |
---|
ContentMetaDataController(IParameters parameters,
ContentTableSource source,
ITransaction transaction)
Creates a new controller for the specified source and parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
contentDeleted(Collection<String> itemIds)
Delete meta data associated to the deleted contents.
|
ContentMetaDataController.MetaDataPersistenceResult |
contentInserted(String primaryKey)
Handles meta data manipulating necessary after inserting a content.
|
ContentMetaDataController.MetaDataPersistenceResult |
contentUpdated(String originalItemId,
String newVersionItemId)
Do the necessary changes in a content's metadata due to its update.
|
protected ContentVersion |
getActiveVersionEquivalentOfItemId(String itemId)
Returns
active version based on given item id . |
protected String |
getNewDataContentId()
Returns the identifier of the content to use for new data.
|
protected boolean |
getNewDataDefaultLocale()
Returns whether the new data should be the default locale.
|
protected Locale |
getNewDataLocale(Locale defaultLocale)
Returns the new
Locale value to use for new data. |
protected boolean |
hasNewDataContentId()
Returns whether the identifier of the content to use for new data was set.
|
protected boolean |
hasNewDataDefaultLocale()
Returns whether the default locale value was set in parameters.
|
protected ContentVersion |
insertMetaData(String primaryKey)
Creates the meta data information for a new content.
|
void |
selectMetaData(QuerySelect querySelect)
Modifies querySelect so it will include all necessary meta data
information and restrictions filtering, such as service instance
isolation, publishing to principals filtering, active version filtering
and special treatment when on preview or details interface.
|
protected ContentVersion |
updateMetaData(String originalItemId,
String newVersionItemId)
Updates the content's metadata.
|
public static final String DOUI_EDITING_VERSION_PARAMETER_NAME
public static final String LANGUAGE_ID_PARAMETER_SUFIX
public static final String CONTENTID_PARAMETER_SUFIX
public static final String IS_DEFAULT_LOCALE_PARAMETER_SUFIX
public static final String NEW_VERSION_PRIMARY_KEY_PARAMETER
public static final String CONTENT_VERSION_ID_ATTRIBUTE
public static final String CONTENT_ID_ATTRIBUTE
protected final String languageParameterPrefix
protected final ContentTableSource source
protected final IParameters parameters
protected final ITransaction transaction
public ContentMetaDataController(IParameters parameters, ContentTableSource source, ITransaction transaction) throws PortalException
parameters
- the parameters for the operation to be performed.source
- the source where the operation is being performed.transaction
- the transaction for persistence access.PortalException
public ContentMetaDataController.MetaDataPersistenceResult contentInserted(String primaryKey) throws PortalException
primaryKey
- the content's primary key.PortalException
protected ContentVersion insertMetaData(String primaryKey) throws PortalException
primaryKey
- the content's primary key.PortalException
protected Locale getNewDataLocale(Locale defaultLocale) throws PortalException
Locale
value to use for new data.defaultLocale
- the default locale value to return if no locale was specified in parameters.PortalException
protected String getNewDataContentId()
hasNewDataContentId()
to differ a
explicit null
value from non-existent value.hasNewDataContentId()
protected boolean hasNewDataContentId()
true
if it was set, false
otherwise.protected boolean getNewDataDefaultLocale()
Use hasNewDataDefaultLocale()
to check if default locale value was set in parameters.
true
if new data is to be the default locale, false
otherwise.hasNewDataDefaultLocale()
protected boolean hasNewDataDefaultLocale()
true
if it was set, false
otherwise.public ContentMetaDataController.MetaDataPersistenceResult contentUpdated(String originalItemId, String newVersionItemId) throws PortalException
originalItemId
- the item identifier of the item that is being updated.newVersionItemId
- the item identifier of the item after the update. This is only used for contents with
versioning and will be the item identifier for the version added for the update.PortalException
protected ContentVersion updateMetaData(String originalItemId, String newVersionItemId) throws PortalException
originalItemId
- the item identifier of the item that is being updated.newVersionItemId
- the item identifier of the item after the update. This is only used for contents with
versioning and will be the item identifier for the version added for the update.PortalException
public void contentDeleted(Collection<String> itemIds) throws PortalException
itemIds
- the identifiers of the items being deleted.PortalException
public void selectMetaData(QuerySelect querySelect) throws PortalException
querySelect
- PortalException
protected ContentVersion getActiveVersionEquivalentOfItemId(String itemId) throws PortalException
active version
based on given item id
.itemId
- the item id
.PortalException
LumisXP 12.1.0.191010 - Copyright © 2006–2019 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.