public class AmetysXSLTHelper extends AmetysXSLTHelper implements LogEnabled
Modifier and Type | Field and Description |
---|---|
protected static AmetysObjectResolver |
_ametysObjectResolver
The Ametys object resolver
|
protected static ContentHelper |
_contentHelper
Helper for content
|
protected static Context |
_context
The avalon context
|
protected static ContentTypeExtensionPoint |
_cTypeExtensionPoint
The content types extension point
|
protected static Logger |
_logger
The logger
|
protected static TagProviderExtensionPoint |
_tagProviderExtPt
The tags provider
|
_currentUserProvider, _groupManager, _i18nUtils, _jsonUtils, _LOGGER, _rightManager, _userHelper, _versionHandler
Constructor and Description |
---|
AmetysXSLTHelper() |
Modifier and Type | Method and Description |
---|---|
protected static NodeList |
_contentTags(Content content)
Returns all tags of the given content
|
private static String |
_getMetadata(CompositeMetadata cm,
String metadataName,
Locale locale) |
static Node |
contentAttachments()
|
private static Node |
contentAttachments(Content content)
|
static Node |
contentAttachments(String contentId)
|
static String |
contentMetadata(String contentId,
String metadataName)
Get the metadata of a content
|
static String |
contentMetadata(String contentId,
String metadataName,
String lang)
Get the metadata of a content
|
static NodeList |
contentMixinTypes(String contentId)
Get the mixins of a content
|
static NodeList |
contentTags()
Returns all tags of the current content.
|
static NodeList |
contentTags(String contentId)
Returns all tags of the given content
|
static NodeList |
contentTypes(String contentId)
Get the content types of a content
|
static NodeList |
contentTypeTags(String contentTypeId)
Returns all tags of a content type
|
void |
contextualize(Context context) |
void |
enableLogging(Logger logger) |
static boolean |
isReferenceTableContent(String contentId)
Determines if the content of given id is a entry of reference table
|
static String |
lang()
Returns the current language for rendering.
|
void |
service(ServiceManager manager) |
static void |
setCurrentContent(String contentId)
Set the content of given id in request attribute
|
static void |
setCurrentContent(String contentId,
String versionLabel)
Set the content of given id and version in request attribute
|
static String |
tagDescription(String siteName,
String tagName,
String lang)
Get the description of a tag
|
static String |
tagLabel(String siteName,
String tagName,
String lang)
Get the label of a tag
|
static String |
tagParent(String siteName,
String tagName)
Get the name of the parent of a tag.
|
static String |
tagPath(String siteName,
String tagName)
Get the path of a tag.
|
static String |
tagVisibility(String siteName,
String tagName)
Get the visibility of a tag
|
absoluteUriPrefix, absoluteUriPrefix, config, escapeJS, getAbsoluteUriPrefix, getUriPrefix, getValueFromJsonObject, getWorkspaceName, getWorkspacePrefix, groups, groups, groups, hasRight, isDeveloperMode, requestParameter, splitText, splitText, translate, translate, uriPrefix, uriPrefix, urlEncode, user, user, user, userByMail, versions, workspaceName, workspacePrefix, workspaceTheme, workspaceThemeURL
protected static AmetysObjectResolver _ametysObjectResolver
protected static ContentTypeExtensionPoint _cTypeExtensionPoint
protected static TagProviderExtensionPoint _tagProviderExtPt
protected static ContentHelper _contentHelper
public AmetysXSLTHelper()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
contextualize
in class AmetysXSLTHelper
ContextException
public void enableLogging(Logger logger)
enableLogging
in interface LogEnabled
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AmetysXSLTHelper
ServiceException
public static NodeList contentTypes(String contentId)
contentId
- The content idpublic static NodeList contentMixinTypes(String contentId)
contentId
- The content idpublic static boolean isReferenceTableContent(String contentId)
contentId
- the content idpublic static String lang()
public static String contentMetadata(String contentId, String metadataName, String lang)
contentId
- The content idmetadataName
- The metadata name (/ for composite)lang
- The language for localized metadata. Can be null to get the current language.public static String contentMetadata(String contentId, String metadataName)
contentId
- The content idmetadataName
- The metadata name (/ for composite)private static String _getMetadata(CompositeMetadata cm, String metadataName, Locale locale)
public static Node contentAttachments()
Resource
s.public static Node contentAttachments(String contentId)
contentId
- the content ID.Resource
s.private static Node contentAttachments(Content content)
content
- the content.Resource
s.public static void setCurrentContent(String contentId)
contentId
- the id of contentpublic static void setCurrentContent(String contentId, String versionLabel)
contentId
- the id of contentversionLabel
- The version labelpublic static NodeList contentTags()
public static NodeList contentTags(String contentId)
contentId
- The identifier of the contentprotected static NodeList _contentTags(Content content)
content
- The contentpublic static String tagParent(String siteName, String tagName)
siteName
- the site nametagName
- the tag's namepublic static String tagPath(String siteName, String tagName)
siteName
- The site nametagName
- The unique tag's namepublic static String tagLabel(String siteName, String tagName, String lang)
siteName
- the current sitetagName
- the name of the taglang
- the lang (if i18n tag)public static String tagDescription(String siteName, String tagName, String lang)
siteName
- the current sitetagName
- the name of the taglang
- the lang (if i18n tag)public static String tagVisibility(String siteName, String tagName)
siteName
- the current sitetagName
- the name of the tagpublic static NodeList contentTypeTags(String contentTypeId)
contentTypeId
- The id of the content type