Package lumis.doui.control.htmleditor
Class HtmlBlockMetaInfo
- java.lang.Object
-
- lumis.doui.control.htmleditor.HtmlBlockMetaInfo
-
public class HtmlBlockMetaInfo extends java.lang.Object
POJO that contains the HTML block meta information.- Since:
- 14.1.0
- Version:
- $Revision: 25809 $ $Date: 2023-07-04 15:23:22 -0300 (Tue, 04 Jul 2023) $
-
-
Constructor Summary
Constructors Constructor Description HtmlBlockMetaInfo(java.lang.String metainfoString)
Creates a new HtmlBlockMetaInfo based on the meta information string stored in the LUM-BLOCK comment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluateConditions(HttpServletRequest request)
Evaluates this block's conditions to check if they allow it to be rendered in the given request.java.lang.String
getExperimentId()
Returns the experimentId.java.lang.String
getId()
Returns the id.java.lang.String
getName()
Returns the name.java.util.Collection<java.lang.String>
getReferencedPrincipalIds()
Returns the identifier of principals referenced by the meta information in this block.lumis.doui.control.htmleditor.HtmlBlockType
getType()
Returns the type.java.util.List<java.lang.String>
validate()
Validates if this block meta information is properly set.
-
-
-
Constructor Detail
-
HtmlBlockMetaInfo
public HtmlBlockMetaInfo(java.lang.String metainfoString)
Creates a new HtmlBlockMetaInfo based on the meta information string stored in the LUM-BLOCK comment.- Parameters:
metainfo
- the block meta information. It is the string in the LUM_BLOCK comment, after "<!-- LUM-BLOCK:
" and before "-->
".- Since:
- 14.1.0
-
-
Method Detail
-
getId
public java.lang.String getId()
Returns the id.- Returns:
- the id
- Since:
- 14.1.0
-
getType
public lumis.doui.control.htmleditor.HtmlBlockType getType()
Returns the type.- Returns:
- the type
- Since:
- 14.1.0
-
getName
public java.lang.String getName()
Returns the name.- Returns:
- the name
- Since:
- 14.1.0
-
getExperimentId
public java.lang.String getExperimentId()
Returns the experimentId.- Returns:
- the experimentId
- Since:
- 16.0.0
-
validate
public java.util.List<java.lang.String> validate()
Validates if this block meta information is properly set.- Returns:
- a list with error messages according to problems detected by this validation, or an empty list if no problems were detected.
- Since:
- 16.0.0
-
evaluateConditions
public boolean evaluateConditions(HttpServletRequest request) throws PortalException
Evaluates this block's conditions to check if they allow it to be rendered in the given request.- Parameters:
request
- the request.- Returns:
true
if this block is to be rendered for the given request,false
otherwise.- Throws:
PortalException
- Since:
- 16.0.0
-
getReferencedPrincipalIds
public java.util.Collection<java.lang.String> getReferencedPrincipalIds()
Returns the identifier of principals referenced by the meta information in this block.- Returns:
- a Set with the principals identifiers. An empty Set is returned if no principal is referenced.
- Since:
- 16.0.0
-
-