Class UserDirectoryPageResolver
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.userdirectory.page.UserDirectoryPageResolver
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
public class UserDirectoryPageResolver extends AbstractLogEnabled implements Component, Serviceable
Resolves an user directory page path from the associated user content.
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver
_ametysResolver
The ametys object resolver.protected UserDirectoryPageHandler
_pageHandler
The user directory page handlerstatic String
ROLE
The avalon role.
-
Constructor Summary
Constructors Constructor Description UserDirectoryPageResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String
_getUserPath(Page userDirectoryRootPage, Content userContent)
Get the path of a user contentUserPage
getUserPage(Content userContent, String siteName, String sitemapName, String contentTypeId)
Return the user pageUserPage
getUserPage(Page userDirectoryRootPage, Content userContent)
Return the user pageString
getUserPageId(Page userDirectoryRootPage, Content userContent)
Return the user page identifiervoid
service(ServiceManager serviceManager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_ametysResolver
protected AmetysObjectResolver _ametysResolver
The ametys object resolver.
-
_pageHandler
protected UserDirectoryPageHandler _pageHandler
The user directory page handler
-
-
Constructor Detail
-
UserDirectoryPageResolver
public UserDirectoryPageResolver()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getUserPage
public UserPage getUserPage(Content userContent, String siteName, String sitemapName, String contentTypeId)
Return the user page- Parameters:
userContent
- the user page contentsiteName
- The current site name.sitemapName
- The current sitemap name.contentTypeId
- the content type id- Returns:
- the user page or null
-
getUserPage
public UserPage getUserPage(Page userDirectoryRootPage, Content userContent)
Return the user page- Parameters:
userDirectoryRootPage
- the user directory root pageuserContent
- the user content- Returns:
- the user page or null
-
getUserPageId
public String getUserPageId(Page userDirectoryRootPage, Content userContent)
Return the user page identifier- Parameters:
userDirectoryRootPage
- the user directory root pageuserContent
- the user content- Returns:
- the user page or
null
if the user page does not exist
-
_getUserPath
private String _getUserPath(Page userDirectoryRootPage, Content userContent)
Get the path of a user content- Parameters:
userDirectoryRootPage
- The user directory root page where to look intouserContent
- The user content- Returns:
- The path or
null
if the user page does not exist
-
-