public class DocumentationUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DocumentationUtil.Bag<T1,T2> |
static interface |
DocumentationUtil.DocumentationRunnable<T> |
Modifier and Type | Field and Description |
---|---|
static String |
DOC_PREFIX
The prefix for documentation localization strings
|
static String |
DOC_STR_PREFIX
The documentation localization string added with the STR_ prefix
|
static String |
DOC_STR_SECTION_PREFIX
The document localization prefix for sections
|
Constructor and Description |
---|
DocumentationUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addPermissionToSection(IPermission permission,
IDocumentationTemplate.DocumentationSection permissionsSection,
IResource resource,
Locale locale)
Generates a permission section.
|
static IDocumentationTemplate.DocumentationSectionEntry |
documentationGetTemplateSectionField(IResource resource,
Locale locale,
Node fieldNode)
Returns a single documentation section entry representing a field.
|
static boolean |
isDocumentationDebugModeEnabled()
Returns the documentationDebugModeEnabled.
|
static Optional<String> |
localizeTargetString(String fullId,
Locale locale,
IResource resource)
Attempt to localize a given target id by running thru all possible localization string names, prioritizing the
complete names over the relative ones.
|
static void |
processDocumentationSectionHeaderAndFooter(IDocumentationTemplate.DocumentationSection documentationSection,
String qualifiedId,
IResource resource,
Locale locale) |
static void |
setDocumentationDebugModeEnabled(boolean documentationDebugModeEnabled)
Sets the documentationDebugModeEnabled.
|
static <T> T |
withTransaction(DocumentationUtil.DocumentationRunnable<T> runnable) |
public static final String DOC_PREFIX
public static final String DOC_STR_PREFIX
public static final String DOC_STR_SECTION_PREFIX
public static boolean isDocumentationDebugModeEnabled()
public static void setDocumentationDebugModeEnabled(boolean documentationDebugModeEnabled)
documentationDebugModeEnabled
- the documentationDebugModeEnabled value to set.public static <T> T withTransaction(DocumentationUtil.DocumentationRunnable<T> runnable) throws PortalException
PortalException
public static void processDocumentationSectionHeaderAndFooter(IDocumentationTemplate.DocumentationSection documentationSection, String qualifiedId, IResource resource, Locale locale) throws PortalException
PortalException
public static void addPermissionToSection(IPermission permission, IDocumentationTemplate.DocumentationSection permissionsSection, IResource resource, Locale locale) throws PortalException
permission
- the permission for which documentation should be generatedpermissionsSection
- the documentation section to which permission should be insertedresource
- used to translate strings.locale
- the locale in which the documentation should be generated.PortalException
public static IDocumentationTemplate.DocumentationSectionEntry documentationGetTemplateSectionField(IResource resource, Locale locale, Node fieldNode) throws PortalException
resource
- used to translate strings.locale
- the locale in which the documentation should be generated.fieldNode
- the field node used to generate the documentation section entry.PortalException
public static Optional<String> localizeTargetString(String fullId, Locale locale, IResource resource) throws PortalException
PortalException
Lumisportal 9.0.0.160603 - Copyright © 2006–2016 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.