public class UGCPageHandler extends AbstractLogEnabled implements Component, Serviceable
Modifier and Type | Field and Description |
---|---|
protected ContentTypeExtensionPoint |
_cTypeEP
The content type extension point
|
protected I18nUtils |
_i18nUtils
The i18n utils
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver
|
static String |
ATTRIBUTE_TRANSITIONAL_PAGE_METADATA_VALUE
The attribute to get the name of transitional page
|
static String |
ATTRIBUTE_TRANSITIONAL_PAGE_TITLE
The attribute to get the title of transitional page
|
static String |
CLASSIFICATION_METADATA_METADATA_NAME
The metadata name for the classification metadata of the ugc
|
static String |
CONTENT_TYPE_METADATA_NAME
The metadata name for the content type of the ugc
|
static String |
ROLE
The avalon role.
|
Constructor and Description |
---|
UGCPageHandler() |
Modifier and Type | Method and Description |
---|---|
protected AmetysObjectIterable<Content> |
_getAllContents(Page rootPage,
String contentTypeId)
Get all content with the content type id
|
String |
getClassificationMetadata(Page rootPage)
Gets the name of the classification metadata
|
AmetysObjectIterable<Content> |
getContentsForRootPage(Page rootPage)
Get orgUnit contents from rootPage
|
AmetysObjectIterable<Content> |
getContentsForTransitionalPage(Page rootPage,
String metadataValue)
Get contents under transitional page
|
String |
getContentTypeId(Page rootPage)
Gets the content type id
|
Map<String,Map<String,String>> |
getTransitionalPage(Page rootPage)
Get the map of transitional page (name : (id, title))
|
Page |
getUGCRootPage(String siteName,
String sitemapName,
String contentTypeId)
Gets the ugc root pages from the given content type id.
|
Set<Page> |
getUGCRootPages(String siteName,
String sitemapName)
Get the ugc root pages
|
void |
service(ServiceManager manager) |
getLogger, setLogger
public static final String ATTRIBUTE_TRANSITIONAL_PAGE_METADATA_VALUE
public static final String ATTRIBUTE_TRANSITIONAL_PAGE_TITLE
public static final String CONTENT_TYPE_METADATA_NAME
public static final String CLASSIFICATION_METADATA_METADATA_NAME
protected AmetysObjectResolver _resolver
protected ContentTypeExtensionPoint _cTypeEP
protected I18nUtils _i18nUtils
public UGCPageHandler()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public String getClassificationMetadata(Page rootPage)
rootPage
- The ugc root pagepublic String getContentTypeId(Page rootPage)
rootPage
- The ugc root pagepublic Page getUGCRootPage(String siteName, String sitemapName, String contentTypeId) throws AmetysRepositoryException
siteName
- the site namesitemapName
- the sitemap namecontentTypeId
- The content type idAmetysRepositoryException
- if an error occured.public Set<Page> getUGCRootPages(String siteName, String sitemapName) throws AmetysRepositoryException
siteName
- the current site.sitemapName
- the sitemap name.AmetysRepositoryException
- if an error occured.public AmetysObjectIterable<Content> getContentsForRootPage(Page rootPage)
rootPage
- the root pagepublic Map<String,Map<String,String>> getTransitionalPage(Page rootPage)
rootPage
- the root pagepublic AmetysObjectIterable<Content> getContentsForTransitionalPage(Page rootPage, String metadataValue)
rootPage
- the root pagemetadataValue
- the metadata value (linked to the transitional page)protected AmetysObjectIterable<Content> _getAllContents(Page rootPage, String contentTypeId)
rootPage
- the root pagecontentTypeId
- the content type id