Package lumis.portal.metatag
Class MetaTagManager
- java.lang.Object
-
- lumis.portal.metatag.MetaTagManager
-
- All Implemented Interfaces:
IMetaTagManager
,IMetaTagManagerSPI
public class MetaTagManager extends Object implements IMetaTagManagerSPI
Implementation for the Meta Tag Manager- Since:
- 4.0.11
- Version:
- $Revision: 15517 $ $Date: 2013-06-25 13:45:19 -0300 (Tue, 25 Jun 2013) $
-
-
Constructor Summary
Constructors Constructor Description MetaTagManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
add(SessionConfig sessionConfig, MetaTagConfig metaTagConfig, ITransaction transaction)
Adds a meta-tagvoid
addOrUpdate(SessionConfig sessionConfig, MetaTagConfig metaTagConfig, ITransaction transaction)
Update a meta-tag.void
delete(SessionConfig sessionConfig, String id, ITransaction transaction)
Delete a meta-tag.void
deserializeMetaTags(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node metaTagsNodes, ChannelConfig parentChannel, ITransaction transaction)
Deserialize meta-tags into a channel.void
deserializeMetaTags(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node metaTagsNodes, PageConfig parentPage, ITransaction transaction)
Deserialize meta-tags into a page.MetaTagConfig
get(SessionConfig sessionConfig, String id, ITransaction transaction)
Get a meta-tag objectList<String>
getIdsByParentId(SessionConfig sessionConfig, String parentId, ITransaction transaction)
Get a list of meta-tag ids given the parent channelId or pageIdList<MetaTagConfig>
getMetaTagsByParentId(SessionConfig sessionConfig, String parentId, ITransaction transaction)
Get a list of meta-tag object given the parent pageIdvoid
serializeMetaTags(SessionConfig sessionConfig, String parentId, StringBuilder output, ITransaction transaction)
Serializes the meta-tags belonging to the specified parent.void
update(SessionConfig sessionConfig, MetaTagConfig metaTagConfig, ITransaction transaction)
Update a meta-tag configuration.
-
-
-
Method Detail
-
add
public String add(SessionConfig sessionConfig, MetaTagConfig metaTagConfig, ITransaction transaction) throws PortalException
Description copied from interface:IMetaTagManager
Adds a meta-tag- Specified by:
add
in interfaceIMetaTagManager
- Returns:
- Throws:
PortalException
-
addOrUpdate
public void addOrUpdate(SessionConfig sessionConfig, MetaTagConfig metaTagConfig, ITransaction transaction) throws PortalException
Description copied from interface:IMetaTagManager
Update a meta-tag. If the meta-tag don't exist, it is added.- Specified by:
addOrUpdate
in interfaceIMetaTagManager
- Throws:
PortalException
-
delete
public void delete(SessionConfig sessionConfig, String id, ITransaction transaction) throws PortalException
Description copied from interface:IMetaTagManager
Delete a meta-tag.- Specified by:
delete
in interfaceIMetaTagManager
- Throws:
PortalException
-
get
public MetaTagConfig get(SessionConfig sessionConfig, String id, ITransaction transaction) throws PortalException
Description copied from interface:IMetaTagManager
Get a meta-tag object- Specified by:
get
in interfaceIMetaTagManager
- Returns:
- Throws:
PortalException
-
getIdsByParentId
public List<String> getIdsByParentId(SessionConfig sessionConfig, String parentId, ITransaction transaction) throws PortalException
Description copied from interface:IMetaTagManager
Get a list of meta-tag ids given the parent channelId or pageId- Specified by:
getIdsByParentId
in interfaceIMetaTagManager
- Returns:
- Throws:
PortalException
-
update
public void update(SessionConfig sessionConfig, MetaTagConfig metaTagConfig, ITransaction transaction) throws PortalException
Description copied from interface:IMetaTagManager
Update a meta-tag configuration.- Specified by:
update
in interfaceIMetaTagManager
- Throws:
PortalException
-
getMetaTagsByParentId
public List<MetaTagConfig> getMetaTagsByParentId(SessionConfig sessionConfig, String parentId, ITransaction transaction) throws PortalException
Description copied from interface:IMetaTagManagerSPI
Get a list of meta-tag object given the parent pageId- Specified by:
getMetaTagsByParentId
in interfaceIMetaTagManagerSPI
- Parameters:
sessionConfig
- current user's session.parentId
- id of the meta tag's parent (e.g.: page or channel id).transaction
- transaction persistence to the database.- Returns:
- a list with the meta tags. Returns an empty list if no meta tag was found.
- Throws:
PortalException
-
serializeMetaTags
public void serializeMetaTags(SessionConfig sessionConfig, String parentId, StringBuilder output, ITransaction transaction) throws PortalException
Description copied from interface:IMetaTagManagerSPI
Serializes the meta-tags belonging to the specified parent.- Specified by:
serializeMetaTags
in interfaceIMetaTagManagerSPI
- Parameters:
sessionConfig
- current user's session.parentId
- id of the meta tag's parent (e.g.: page or channel id).output
- string to append the parameters xml to.transaction
- transaction persistence to the database.- Throws:
PortalException
-
deserializeMetaTags
public void deserializeMetaTags(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node metaTagsNodes, PageConfig parentPage, ITransaction transaction) throws PortalException
Description copied from interface:IMetaTagManagerSPI
Deserialize meta-tags into a page.- Specified by:
deserializeMetaTags
in interfaceIMetaTagManagerSPI
- Parameters:
sessionConfig
- current user's session.deserializationConfig
- deserialization configuration.metaTagsNodes
- node that contains a set of meta-tags.parentPage
- the page where the meta-tags will be deserialized into.transaction
- transaction persistence to the database.- Throws:
PortalException
-
deserializeMetaTags
public void deserializeMetaTags(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node metaTagsNodes, ChannelConfig parentChannel, ITransaction transaction) throws PortalException
Description copied from interface:IMetaTagManagerSPI
Deserialize meta-tags into a channel.- Specified by:
deserializeMetaTags
in interfaceIMetaTagManagerSPI
- Parameters:
sessionConfig
- current user's session.deserializationConfig
- deserialization configuration.metaTagsNodes
- node that contains a set of meta-tags.parentChannel
- the channel where the meta-tags will be deserialized into.transaction
- transaction persistence to the database.- Throws:
PortalException
-
-