Class UserDirectoryPageResolver
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.userdirectory.page.UserDirectoryPageResolver
- All Implemented Interfaces:
Initializable,Component,Contextualizable,LogEnabled,Serviceable
public class UserDirectoryPageResolver
extends AbstractLogEnabled
implements Component, Serviceable, Initializable, Contextualizable
Resolves an user directory page path from the associated user content.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AmetysObjectResolverThe ametys object resolver.protected static final StringThe key cache for empty siteprotected AbstractCacheManagerThe cache managerprotected ContextThe contextprotected LanguagesManagerThe languages managerprotected UserDirectoryPageHandlerThe user directory page handlerstatic final StringThe avalon role. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String_getUserPageId(Content userContent, String siteName, String language, String contentTypeId) Return the user page idvoidcontextualize(Context context) getUserPage(Content userContent, String siteName, String sitemapName) Return the user pagegetUserPage(Content userContent, String siteName, String sitemapName, String contentTypeId) Return the user pagegetUserPage(Page userDirectoryRootPage, Content userContent) Return the user pagegetUserPageId(Page userDirectoryRootPage, Content userContent) Return the user page identifiervoidvoidInvalidate the user page cache for one language.voidservice(ServiceManager serviceManager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
ROLE
The avalon role. -
_CACHE_KEY_EMPTY_SITE
The key cache for empty site- See Also:
-
_ametysResolver
The ametys object resolver. -
_pageHandler
The user directory page handler -
_cacheManager
The cache manager -
_context
The context -
_languagesManager
The languages manager
-
-
Constructor Details
-
UserDirectoryPageResolver
public UserDirectoryPageResolver()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
getUserPage
Return the user page- Parameters:
userContent- the user page contentsiteName- The current site name.sitemapName- The current sitemap name.- Returns:
- the user page or
nullif the user page does not exist
-
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
nullif the user page does not exist
-
_getUserPageId
protected String _getUserPageId(Content userContent, String siteName, String language, String contentTypeId) Return the user page id- Parameters:
userContent- the user contentsiteName- the site namelanguage- the given languagecontentTypeId- the content type id- Returns:
- the user page id or
nullif the user page does not exist
-
getUserPage
Return the user page- Parameters:
userDirectoryRootPage- the user directory root pageuserContent- the user content- Returns:
- the user page or
nullif the user page does not exist
-
getUserPageId
Return the user page identifier- Parameters:
userDirectoryRootPage- the user directory root pageuserContent- the user content- Returns:
- the user page or
nullif the user page does not exist
-
invalidateUserPageCache
Invalidate the user page cache for one language. If lang isnull, invalidate all- Parameters:
lang- the lang. Can benull
-