Package org.ametys.plugins.linkdirectory
Class LinkDirectoryXSLTHelper
java.lang.Object
org.ametys.core.util.AmetysXSLTHelper
org.ametys.cms.transformation.xslt.AmetysXSLTHelper
org.ametys.web.transformation.xslt.AmetysXSLTHelper
org.ametys.plugins.linkdirectory.LinkDirectoryXSLTHelper
- All Implemented Interfaces:
Contextualizable,LogEnabled,Serviceable
XSLT Helper with link directory specificity
-
Field Summary
Fields inherited from class org.ametys.cms.transformation.xslt.AmetysXSLTHelper
_ametysObjectResolver, _contentHelper, _context, _cTypeExtensionPoint, _logger, _richTextHelper, _tagProviderExtPtFields inherited from class org.ametys.core.util.AmetysXSLTHelper
_currentUserProvider, _groupManager, _i18nUtils, _jsonUtils, _LOGGER, _rightManager, _sourceResolver, _userHelper, _userManager, _versionHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MapElementGet all the colors for the current sitestatic MapElementGet all the colors for a sitestatic StringGet the default color index for the current sitestatic StringgetDefaultColorIndex(String siteName) Get the default color index for a sitestatic NodeListGet the links that belong to a given theme.static NodeListgetLinksForCurrentUser(String siteName, String lang, String themeName) Get the links that belong to a given theme for a given user.
Only user access is check.voidservice(ServiceManager manager) Methods inherited from class org.ametys.web.transformation.xslt.AmetysXSLTHelper
absoluteSiteUriPrefix, absoluteSiteUriPrefix, absoluteUriPrefix, accessibleReferencedPages, breadcrumb, breadcrumb, contentViewParameter, contentViewParameters, findContentsIdsByTag, findContentsIdsByTag, findPagesIdsByTag, findPagesIdsByTag, findPagesIdsByTag, findPagesIdsByTag, hasReadAccessOnPage, hasRightOnPage, hasRightOnPage, isCacheable, isCaptchaRequired, isCaptchaRequired, isEditionMode, lang, lang, pageExists, pageHasRestrictedAccess, pageHasRestrictedAccess, pageId, pageIsVisible, pageIsVisible, pageLongTitle, pageLongTitle, pageMetadata, pageMetadata, pagePath, pagePath, pageSiteName, pageTitle, pageTitle, pageType, pageUrl, pageUrlType, pagination, pluginResourceURL, referencedPages, renderingContext, resourceByPath, resourcesById, resourcesByPath, serviceParameter, serviceParameter, serviceParameters, serviceViewParameter, serviceViewParameters, site, site, siteLanguages, siteLanguages, sitemap, sitemap, sitemap, sitemap, sitemap, sitemap, sitemap, sitemap, siteParameter, siteParameter, siteUriPrefix, skin, skinBoundedImageURL, skinImageBase64, skinImageBase64, skinImageURL, skinResources, skinURL, template, templateParameter, templateParameter, templateParameters, templateURL, uriPrefix, urlPreview, userByMail, zone, zoneItemId, zoneItemParameter, zoneItemParameter, zoneItemParameters, zoneItemParameters, zoneItemPosition, zoneParameter, zoneParameter, zoneParameter, zoneParameters, zoneParametersMethods inherited from class org.ametys.cms.transformation.xslt.AmetysXSLTHelper
_contentTags, _getNodeValues, _getNodeValues, contentAttachments, contentAttachments, contentAttribute, contentAttribute, contentExcerpt, contentMetadata, contentMetadata, contentMixinTypes, contentTags, contentTags, contentTypes, contentTypeTags, contextualize, enableLogging, getContentView, getContentView, getContentView, getContentView, getContentView, hasValue, isReferenceTableContent, setCurrentContent, setCurrentContent, tagColor, tagDescription, tagLabel, tagParent, tagPath, tagVisibilityMethods inherited from class org.ametys.core.util.AmetysXSLTHelper
_getResourceBase64, absoluteUriPrefix, config, escapeJS, escapeURLforCSS, getAbsoluteUriPrefix, getUriPrefix, getValueFromJsonObject, getWorkspaceName, getWorkspacePrefix, groups, groups, groups, hasRight, isDeveloperMode, isPluginEnabled, pluginImageBase64, requestParameter, splitText, splitText, translate, translate, translate, uriPrefix, user, user, user, userByMail, versions, workspaceName, workspacePrefix, workspaceTheme, workspaceThemeURL
-
Constructor Details
-
LinkDirectoryXSLTHelper
public LinkDirectoryXSLTHelper()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAmetysXSLTHelper- Throws:
ServiceException
-
getColors
Get all the colors for the current site- Returns:
- all colors available for the current site
-
getColors
Get all the colors for a site- Parameters:
siteName- site to check- Returns:
- all colors available for this site
-
getDefaultColorIndex
Get the default color index for the current site- Returns:
- the default color index for the current site
-
getDefaultColorIndex
Get the default color index for a site- Parameters:
siteName- site to check- Returns:
- the default color index for this site
-
getLinks
Get the links that belong to a given theme. Only links allowed to anonymous access are returned !- Parameters:
siteName- the site namelang- the languagethemeName- the key of the theme- Returns:
- the links as a
Node.
-
getLinksForCurrentUser
Get the links that belong to a given theme for a given user.
Only user access is check. The user personal links are not retrieved and none user preferences is take into account to order or hide links ! DO NOT CALL THIS METHOD ON A CACHEABLE PAGE !- Parameters:
siteName- the site namelang- the languagethemeName- the key of the theme- Returns:
- the links as a
Node.
-