Package org.javlo.navigation
Class MenuElement
- java.lang.Object
-
- org.javlo.navigation.MenuElement
-
- All Implemented Interfaces:
Serializable
,IRestItem
,ITaxonomyContainer
,IPrintInfo
- Direct Known Subclasses:
RootMenuElement
public class MenuElement extends Object implements Serializable, IPrintInfo, IRestItem, ITaxonomyContainer
- Author:
- pvanderm
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MenuElement.SmartPageDescription
-
Field Summary
Fields Modifier and Type Field Description static int
INSTANCE
static String
LAYOUTS_PREFIX
static Logger
logger
static MenuElement
NOT_FOUND_PAGE
static String
NULL_STRING
static String
PAGE_TYPE_DEFAULT
protected boolean
releaseCache
static int
SEO_HEIGHT_HIGHT
static int
SEO_HEIGHT_INHERITED
static int
SEO_HEIGHT_LOW
static int
SEO_HEIGHT_NORMAL
static int
SEO_HEIGHT_NULL
static double
VOTES_MULTIPLY
-
Constructor Summary
Constructors Modifier Constructor Description protected
MenuElement()
-
Method Summary
-
-
-
Field Detail
-
NOT_FOUND_PAGE
public static MenuElement NOT_FOUND_PAGE
-
NULL_STRING
public static final String NULL_STRING
- See Also:
- Constant Field Values
-
INSTANCE
public static int INSTANCE
-
PAGE_TYPE_DEFAULT
public static final String PAGE_TYPE_DEFAULT
- See Also:
- Constant Field Values
-
VOTES_MULTIPLY
public static final double VOTES_MULTIPLY
- See Also:
- Constant Field Values
-
SEO_HEIGHT_INHERITED
public static final int SEO_HEIGHT_INHERITED
- See Also:
- Constant Field Values
-
SEO_HEIGHT_NULL
public static final int SEO_HEIGHT_NULL
- See Also:
- Constant Field Values
-
SEO_HEIGHT_LOW
public static final int SEO_HEIGHT_LOW
- See Also:
- Constant Field Values
-
SEO_HEIGHT_NORMAL
public static final int SEO_HEIGHT_NORMAL
- See Also:
- Constant Field Values
-
SEO_HEIGHT_HIGHT
public static final int SEO_HEIGHT_HIGHT
- See Also:
- Constant Field Values
-
LAYOUTS_PREFIX
public static final String LAYOUTS_PREFIX
- See Also:
- Constant Field Values
-
releaseCache
protected boolean releaseCache
-
logger
public static Logger logger
-
-
Method Detail
-
getPageDescription
protected PageDescription getPageDescription(ContentContext ctx) throws Exception
- Throws:
Exception
-
getMainContentLabel
public String getMainContentLabel(ContentContext ctx)
-
isActive
public boolean isActive(ContentContext ctx)
-
getSmartPageDescription
public PageDescription getSmartPageDescription(ContentContext ctx)
-
getInstance
public static MenuElement getInstance(ContentContext ctx)
-
searchChild
public static MenuElement searchChild(MenuElement elem, ContentContext ctx, String path, Collection<MenuElement> pastNode) throws Exception
- Throws:
Exception
-
getPageCached
protected MenuElement getPageCached(String key)
-
setPageCached
protected void setPageCached(String key, MenuElement page)
-
finalize
protected void finalize() throws Throwable
-
addAccess
public void addAccess(ContentContext ctx)
-
addChildMenuElement
public void addChildMenuElement(MenuElement menuElement)
-
addChildMenuElementAutoPriority
public void addChildMenuElementAutoPriority(MenuElement menuElement)
-
addChildMenuElementOnTop
public void addChildMenuElementOnTop(MenuElement menuElement)
-
addChildMenuElementOnBottom
public void addChildMenuElementOnBottom(MenuElement menuElement)
-
addCompToDelete
public void addCompToDelete(String id)
-
addContent
public void addContent(String parentId, ComponentBean bean)
-
addContent
public void addContent(String parentId, ComponentBean bean, boolean realeaseCache)
-
addEditorRole
public void addEditorRole(String group)
-
addEditorRoles
public void addEditorRoles(Collection<String> groups)
-
addVirtualParent
public void addVirtualParent(String menuId)
-
clearEditorGroups
public void clearEditorGroups()
-
getContentElementListMap
public Map<String,ContentElementList> getContentElementListMap()
-
clearVirtualParent
public void clearVirtualParent()
-
countComponentInCtx
public int countComponentInCtx(ContentContext ctx, String inComponentType) throws Exception
count the component of a specific type on the current page.- Parameters:
ctx
- the current context.inComponentType
- the type of the component- Returns:
- a count of component.
- Throws:
Exception
-
deleteCompList
public boolean deleteCompList(ContentContext ctx)
-
endRendering
public void endRendering(ContentContext ctx)
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classObject
- See Also:
Object.equals(java.lang.Object)
-
getAccess
public int getAccess(ContentContext ctx, Date date)
-
_getAllChildren
public MenuElement[] _getAllChildren() throws Exception
- Throws:
Exception
-
getAllChildrenList
public List<MenuElement> getAllChildrenList() throws Exception
- Throws:
Exception
-
getAllChildrenWithComponentType
public List<MenuElement> getAllChildrenWithComponentType(ContentContext ctx, String type) throws Exception
- Throws:
Exception
-
getAllContent
public ContentElementList getAllContent(ContentContext ctx) throws Exception
- Throws:
Exception
-
getAllLocalContentBean
public ComponentBean[] getAllLocalContentBean() throws Exception
- Throws:
Exception
-
getAllResources
public Collection<Resource> getAllResources(ContentContext ctx) throws Exception
- Throws:
Exception
-
getAllVirtualPath
public List<String> getAllVirtualPath()
return the page of this page- Returns:
- a path.
-
getBestLanguageContent
public ContentElementList getBestLanguageContent(ContentContext ctx) throws Exception
get the content in current language and in default languages order if not exist.- Throws:
Exception
-
getBlocker
public String getBlocker()
-
getCacheKey
protected String getCacheKey(ContentContext ctx, String subkey)
-
getCategory
public String getCategory(ContentContext ctx) throws Exception
get the category of the page (category component)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getFont
public String getFont(ContentContext ctx) throws Exception
get the font of the page (category component)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getForward
public String getForward(ContentContext ctx) throws Exception
get the category of the page (category component)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getSlogan
public String getSlogan(ContentContext ctx) throws Exception
get the slogan of the page (slogan component)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getColor
public ExtendedColor getColor(ContentContext ctx) throws Exception
get the color of the page- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getBackgroundColor
public ExtendedColor getBackgroundColor(ContentContext ctx) throws Exception
get the background color- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getChildMenuElements
public List<MenuElement> getChildMenuElements()
get the child list of the current element.- Returns:
- a array of children.
-
getChildPosition
public int getChildPosition(MenuElement child)
-
getPosition
public int getPosition()
return the position on the page in the children list of her parent- Returns:
-
getChildMenuElements
public List<MenuElement> getChildMenuElements(ContentContext ctx, boolean visible) throws Exception
- Throws:
Exception
-
getChildMenuElementsList
public List<MenuElement> getChildMenuElementsList()
get the child list of the current element.- Returns:
- a list of children.
-
getChildMenuElementsList
public List<MenuElement> getChildMenuElementsList(ContentContext ctx, boolean visible) throws Exception
- Throws:
Exception
-
getChildMenuElementsWithVirtual
public List<MenuElement> getChildMenuElementsWithVirtual(ContentContext ctx, boolean onlyVisible, boolean virtualBefore) throws Exception
- Throws:
Exception
-
getChildMenuElementsWithVirtualList
public List<MenuElement> getChildMenuElementsWithVirtualList(ContentContext ctx, boolean visible, boolean virtualBefore) throws Exception
- Throws:
Exception
-
getContent
public ComponentBean[] getContent()
-
getContentAsText
public String getContentAsText(ContentContext ctx) throws Exception
- Throws:
Exception
-
getContentAsList
public List<ComponentBean> getContentAsList()
-
getContent
public ContentElementList getContent(ContentContext ctx) throws Exception
get content of the current area- Parameters:
ctx
- the content context- Returns:
- a list of component
- Throws:
Exception
-
getContentByDate
public Map<Date,List<IContentVisualComponent>> getContentByDate(ContentContext ctx) throws Exception
return the content separed on the date component.- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getContentByType
public List<IContentVisualComponent> getContentByType(ContentContext ctx, String type) throws Exception
- Throws:
Exception
-
getAllLanguageContent
public List<IContentVisualComponent> getAllLanguageContent(ContentContext ctx) throws Exception
- Throws:
Exception
-
getContentByImplementation
public List<IContentVisualComponent> getContentByImplementation(ContentContext ctx, Class clazz) throws Exception
- Throws:
Exception
-
getContentContextWithContent
public ContentContext getContentContextWithContent(ContentContext ctx) throws Exception
return a language with content. If there are content in current language, it is returned.- Returns:
- a ContentContext with content or current context if there are no content in any language.
- Throws:
Exception
-
getContentDate
public Date getContentDate(ContentContext ctx) throws Exception
get the date found in the content.- Returns:
- Throws:
Exception
-
getToTheTopLevel
public int getToTheTopLevel(ContentContext ctx) throws Exception
- Throws:
Exception
-
getContentDateComponent
public Date getContentDateComponent(ContentContext ctx) throws Exception
- Throws:
Exception
-
getContentDateNeverNull
public Date getContentDateNeverNull(ContentContext ctx) throws Exception
return content Date and modification data if no content date.- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getCreationDate
public Date getCreationDate()
-
getCreator
public String getCreator()
-
getDepth
public int getDepth()
return the depth of the current element- Returns:
- a depth
-
getDescription
public HtmlPart getDescription(ContentContext ctx) throws Exception
get description of the page (description component)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getDescriptionAsText
public String getDescriptionAsText(ContentContext ctx) throws Exception
get description of the page (description component)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getXHTMLDescription
public String getXHTMLDescription(ContentContext ctx) throws Exception
get description of the page (description component)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getReactionSize
public int getReactionSize(ContentContext ctx) throws Exception
get number of reactions of the page (description component)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
setEditRoles
public void setEditRoles(MenuElement page)
-
getFollowers
public List<String> getFollowers(ContentContext ctx)
-
addFollowers
public void addFollowers(ContentContext ctx, String userName)
-
getLocalFollowers
public List<String> getLocalFollowers(ContentContext ctx)
-
removeFollowers
public void removeFollowers(ContentContext ctx, String userName)
-
getExternalResources
public Collection<String> getExternalResources(ContentContext ctx) throws Exception
- Throws:
Exception
-
getExternalModules
public Collection<String> getExternalModules(ContentContext ctx) throws Exception
- Throws:
Exception
-
getFieldValue
public String getFieldValue(ContentContext ctx, String componentType, String fieldName, String defaultValue) throws Exception
return the field value of the first component match with the component type- Parameters:
ctx
-componentType
-fieldName
-defaultValue
- value if component or field not found- Returns:
- Throws:
Exception
-
getFieldValues
public Set<String> getFieldValues(ContentContext ctx, String componentType, String fieldName) throws Exception
return the field values of all components match with the component type- Parameters:
ctx
-componentType
-fieldName
-defaultValue
- value if component or field not found- Returns:
- a set of values, empty set if not found.
- Throws:
Exception
-
getFullLabel
public String getFullLabel(ContentContext ctx) throws Exception
- Throws:
Exception
-
getFullName
public String getFullName()
-
getGlobalTitle
public String getGlobalTitle(ContentContext ctx) throws Exception
- Throws:
Exception
-
getGroupID
public List<String> getGroupID(ContentContext ctx) throws Exception
- Throws:
Exception
-
getChildrenCategories
public List<String> getChildrenCategories(ContentContext ctx) throws Exception
- Throws:
Exception
-
getHeaderContent
public String getHeaderContent(ContentContext ctx) throws Exception
- Throws:
Exception
-
getHTMLChildList
public String getHTMLChildList(String startTag, String endTag) throws Exception
generate a list of navigation element. replace #id with the page id.- Parameters:
startTag
- insert before path sample :endTag
- insert after path :- Returns:
- a string with XHTML code
- Throws:
Exception
-
getId
public String getId()
- Returns:
-
getImageBackground
public IImageTitle getImageBackground(ContentContext ctx) throws Exception
- Throws:
Exception
-
getImageBackgroundForArea
public Map<String,ImageTitleBean> getImageBackgroundForArea(ContentContext ctx) throws Exception
- Throws:
Exception
-
getImageBean
public ImageBean getImageBean(ContentContext ctx) throws Exception
- Throws:
Exception
-
getImage
public IImageTitle getImage(ContentContext ctx) throws Exception
- Throws:
Exception
-
getImages
public List<IImageTitle> getImages(ContentContext ctx) throws Exception
- Throws:
Exception
-
getStaticResources
public Collection<Link> getStaticResources(ContentContext ctx) throws Exception
- Throws:
Exception
-
getKeywords
public String getKeywords(ContentContext ctx) throws Exception
- Throws:
Exception
-
getLabel
public String getLabel(ContentContext ctx) throws Exception
- Throws:
Exception
-
getLastAccess
public int getLastAccess(ContentContext ctx) throws ServiceException
- Throws:
ServiceException
-
getLatestEditor
public String getLatestEditor()
-
getLinkedURL
public String getLinkedURL()
-
getLinkOn
public String getLinkOn(ContentContext ctx) throws Exception
get the first link on the page.- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
isLinkRealContent
public boolean isLinkRealContent(ContentContext ctx) throws Exception
- Throws:
Exception
-
getLocalContentCopy
public ContentElementList getLocalContentCopy(ContentContext ctx) throws Exception
- Throws:
Exception
-
getLocation
public String getLocation(ContentContext ctx) throws Exception
get description of the page (description component)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getManualModificationDate
public Date getManualModificationDate()
-
getMetaHead
public String getMetaHead(ContentContext ctx) throws Exception
get the metaHead for meta tag (if no meta description defined return the description)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getMetaDescription
public String getMetaDescription(ContentContext ctx) throws Exception
get the description for meta tag (if no meta description defined return the description)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getModificationDate
public Date getModificationDate() throws ParseException, Exception
- Throws:
ParseException
Exception
-
getModificationDate
public Date getModificationDate(ContentContext ctx) throws ParseException, Exception
- Throws:
ParseException
Exception
-
getName
public String getName()
reutrn the name, formated as "file name", without space and special char.- Returns:
-
getHumanName
public String getHumanName()
return the name, as create by user.- Returns:
-
getNextBrother
public MenuElement getNextBrother()
get the next menu element in the child list- Returns:
- a MenuElement with the same depth, null if current is the first element.
-
getNoErrorFreeCurrentPage
public MenuElement getNoErrorFreeCurrentPage(ContentContext ctx) throws Exception
- Throws:
Exception
-
getNoRepeatContentByType
public List<IContentVisualComponent> getNoRepeatContentByType(ContentContext ctx, String type) throws Exception
- Throws:
Exception
-
getCache
protected ICache getCache(ContentContext ctx)
-
clearPageBean
public void clearPageBean(ContentContext ctx)
-
getPageBean
public PageBean getPageBean(ContentContext ctx) throws Exception
- Throws:
Exception
-
getIndex
public int getIndex()
get index of the page in the children list of the her parent page- Returns:
-
getPageRank
public double getPageRank(ContentContext ctx) throws Exception
get the page rank (define with content)- Returns:
- a page rank between 0 and 1
- Throws:
Exception
-
getForcedPageTitle
public String getForcedPageTitle(ContentContext ctx) throws Exception
get the title of the page define in the content, empty string if no title defined.- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getPageTitle
public String getPageTitle(ContentContext ctx) throws Exception
- Throws:
Exception
-
getParent
public MenuElement getParent()
- Returns:
- Returns the parent.
-
isRoot
public boolean isRoot()
-
isLikeRoot
public boolean isLikeRoot(ContentContext ctx) throws Exception
- Throws:
Exception
-
isChildOf
public boolean isChildOf(String page)
check if the current page is a child of a page with id or name give in parameter.- Parameters:
page
- name, id of a page or path of the page.- Returns:
-
_getPath
public String _getPath()
return the page of this page- Returns:
- a path.
-
getPath
public String getPath()
return the page of this page- Returns:
- a path.
-
getPreviousBrother
public MenuElement getPreviousBrother()
get the previous menu element in the child list- Returns:
- a MenuElement with the same depth, null if current is the first element.
-
getPriority
public int getPriority()
-
getRealModificationDate
public Date getRealModificationDate(ContentContext ctx) throws ParseException, Exception
- Throws:
ParseException
Exception
-
getReversedLink
public String getReversedLink()
-
getRoot
public MenuElement getRoot()
-
getSelectedDepth
public int getSelectedDepth(ContentContext ctx) throws Exception
return the depth of the selection. sample: if the first selected element have children and sedond not the depth is 2.- Returns:
- a depth
- Throws:
Exception
-
getSiteMapPriority
public double getSiteMapPriority(ContentContext ctx)
-
getSubTitle
public String getSubTitle(ContentContext ctx) throws Exception
- Throws:
Exception
-
getSubTitles
public List<String> getSubTitles(ContentContext ctx, int level) throws Exception
- Throws:
Exception
-
getLinkLabel
public String getLinkLabel(ContentContext ctx) throws Exception
label of the link to page.- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getSubTitleLevel
public int getSubTitleLevel(ContentContext ctx) throws Exception
- Throws:
Exception
-
getTags
public List<String> getTags(ContentContext ctx) throws Exception
- Throws:
Exception
-
getLayouts
public List<String> getLayouts(ContentContext ctx) throws Exception
- Throws:
Exception
-
getProduct
public Product.ProductBean getProduct(ContentContext ctx) throws Exception
- Throws:
Exception
-
getTemplateId
public String getTemplateId()
-
getTemplateIdOnInherited
public String getTemplateIdOnInherited(ContentContext ctx)
-
getTemplates
public Collection<MenuElement> getTemplates()
-
getTimeRange
public TimeRange getTimeRange(ContentContext ctx) throws Exception
get the time range found in the content.- Returns:
- Throws:
Exception
-
getContentTitle
public String getContentTitle(ContentContext ctx) throws Exception
get the real content title.- Parameters:
ctx
-- Returns:
- null if no title found in content.
- Throws:
Exception
-
isTitle
public boolean isTitle(ContentContext ctx) throws Exception
- Throws:
Exception
-
getTitle
public String getTitle(ContentContext ctx) throws Exception
- Throws:
Exception
-
getTechnicalTitle
public String getTechnicalTitle(ContentContext ctx)
create a title without space and special character with the title of the page in the default language.- Parameters:
ctx
-- Returns:
-
getLocalTitle
public String getLocalTitle(ContentContext ctx) throws Exception
get title withtout repeat content- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
isReadAccess
public boolean isReadAccess(ContentContext ctx, User user)
-
isEditAccess
public boolean isEditAccess(ContentContext ctx) throws Exception
- Throws:
Exception
-
getValidater
public String getValidater()
-
getValidationDate
public Date getValidationDate()
-
getVirtualChild
public List<MenuElement> getVirtualChild(ContentContext ctx, boolean onlyVisible) throws Exception
- Throws:
Exception
-
getVirtualParent
public List<MenuElement> getVirtualParent()
-
getVirtualPath
public String getVirtualPath(ContentContext ctx)
return the page of this page- Returns:
- a path.
-
getVisibleChildMenuElements
public List<MenuElement> getVisibleChildMenuElements(ContentContext ctx) throws Exception
get the child list of the current element.- Returns:
- a array of children.
- Throws:
Exception
-
getVisibleChildMenuElementsList
public List<MenuElement> getVisibleChildMenuElementsList(ContentContext ctx) throws Exception
- Throws:
Exception
-
getXHTMLTitle
public String getXHTMLTitle(ContentContext ctx) throws Exception
- Throws:
Exception
-
isBlocked
public boolean isBlocked()
-
isChildOf
public boolean isChildOf(MenuElement parent)
check if a page is parent or parent of a parent.- Parameters:
parent
- a page of the navigation.- Returns:
- true if page found in paternity
-
isChildrenEquals
public boolean isChildrenEquals(MenuElement elem)
-
isContentDateVisible
public boolean isContentDateVisible(ContentContext ctx) throws Exception
- Throws:
Exception
-
isContentEquals
public boolean isContentEquals(MenuElement elem)
-
isEmpty
public boolean isEmpty(ContentContext ctx) throws Exception
- Throws:
Exception
-
isNoComponent
public boolean isNoComponent(ContentContext ctx) throws Exception
- Throws:
Exception
-
isNoComponent
public boolean isNoComponent(ContentContext ctx, String area) throws Exception
- Throws:
Exception
-
isEmpty
public boolean isEmpty(ContentContext ctx, String area) throws Exception
- Throws:
Exception
-
isLocalEmpty
public boolean isLocalEmpty(ContentContext ctx, String area) throws Exception
- Throws:
Exception
-
isEmpty
public boolean isEmpty(ContentContext ctx, String area, boolean withRepeat) throws Exception
- Throws:
Exception
-
isHaveChild
public boolean isHaveChild()
- Returns:
-
isHaveVisibleChild
public boolean isHaveVisibleChild(ContentContext ctx) throws Exception
- Throws:
Exception
-
isHttps
public boolean isHttps()
-
isLastSelected
public boolean isLastSelected(ContentContext ctx)
-
isMetadataEquals
public boolean isMetadataEquals(MenuElement elem)
-
isRealContentAuto
public boolean isRealContentAuto(ContentContext ctx) throws Exception
- Throws:
Exception
-
isRealContent
public boolean isRealContent(ContentContext ctx) throws Exception
- Throws:
Exception
-
isRealContentAnyLanguage
public boolean isRealContentAnyLanguage(ContentContext ctx) throws Exception
- Throws:
Exception
-
getRealContentLanguage
public String getRealContentLanguage(ContentContext ctx) throws Exception
- Throws:
Exception
-
isRemote
public boolean isRemote()
-
isSelected
public boolean isSelected(ContentContext ctx) throws Exception
- Throws:
Exception
-
isValid
public boolean isValid()
-
isActive
public boolean isActive()
-
isPageActive
public boolean isPageActive()
-
setActive
public void setActive(boolean active)
-
isVisible
public boolean isVisible(ContentContext ctx) throws Exception
- Returns:
- Throws:
Exception
-
moveToParent
public void moveToParent(MenuElement parent)
move the current page under other parent
-
prepareAddContent
public final String prepareAddContent(String lg, String parentCompId, String contentType, String style, String value, User authors) throws Exception
prepare a content to be added at the end of the rendering- Parameters:
ctx
- the current content contextpage
- the page when the content must be inseredparentComp
- the parent componentcontentType
- the type of the componentvalue
- the value of the component- Returns:
- the if of the new component
- Throws:
Exception
-
releaseCache
public void releaseCache()
-
removeChild
public void removeChild(MenuElement elem)
-
removeContent
public String removeContent(ContentContext ctx, String id)
remove a component on the page- Returns:
- the type of the component, null if not found
-
removeContent
public String removeContent(ContentContext ctx, String id, boolean releaseCache)
remove a component on the page- Parameters:
releaseCache
- true if you want release the page cache after deleted component- Returns:
- the type of the component, null if not found
-
removeEditorRoles
public void removeEditorRoles(String group)
-
searchChild
public MenuElement searchChild(ContentContext ctx) throws Exception
- Throws:
Exception
-
searchChild
public MenuElement searchChild(ContentContext ctx, String path) throws Exception
- Throws:
Exception
-
searchChildFromId
public MenuElement searchChildFromId(String id)
- Parameters:
id
-- Returns:
-
searchChildFromName
public MenuElement searchChildFromName(String... names)
- Parameters:
names
- list of possible name- Returns:
-
searchRealChild
public MenuElement searchRealChild(ContentContext ctx, String path) throws Exception
- Throws:
Exception
-
setBlocked
public void setBlocked(boolean blocked)
-
setBlocker
public void setBlocker(String blocker)
-
setContent
public void setContent(ComponentBean[] newContent)
-
setContentStayCache
public void setContentStayCache(ComponentBean[] newContent)
-
setCreationDate
public void setCreationDate(Date createDate)
-
setCreator
public void setCreator(String creator)
-
setHttps
public void setHttps(boolean https)
-
setId
public void setId(String string)
- Parameters:
string
-
-
setLatestEditor
public void setLatestEditor(String latestEditor)
-
setLinkedURL
public void setLinkedURL(String linkedURL)
-
setManualModificationDate
public void setManualModificationDate(Date manualModificationDate)
-
setModificationDate
public void setModificationDate(Date modificationDate)
-
setName
public void setName(String name)
-
setParent
public void setParent(MenuElement parent)
- Parameters:
parent
- The parent to set.
-
setPriority
public void setPriority(int newPriority)
-
setPriorityNoSort
public void setPriorityNoSort(int newPriority)
-
setRemote
public void setRemote(boolean readOnly)
-
setReversedLink
public void setReversedLink(String reversedLink)
-
setTemplateId
public void setTemplateId(String inTemplate)
-
setValid
public void setValid(boolean valid)
-
setValidater
public void setValidater(String validater)
-
setValidationDate
public void setValidationDate(Date validationDate)
-
setVirtualParent
public void setVirtualParent(List<MenuElement> newVirtualParent)
-
setVisible
public void setVisible(boolean b)
- Parameters:
b
-
-
updateLinkedData
public void updateLinkedData(ContentContext ctx)
-
notInSearch
public boolean notInSearch(ContentContext ctx) throws Exception
- Throws:
Exception
-
getI18n
public Map<String,String> getI18n(ContentContext ctx) throws Exception
get local i18n data- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getContact
public ContactBean getContact(ContentContext ctx) throws Exception
get local i18n data- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
isCacheable
public boolean isCacheable(ContentContext ctx) throws Exception
check if the page is cacheable (static content)- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getNotCacheableComponent
public IContentVisualComponent getNotCacheableComponent(ContentContext ctx) throws Exception
- Throws:
Exception
-
getRealContentComponent
public IContentVisualComponent getRealContentComponent(ContentContext ctx) throws Exception
- Throws:
Exception
-
getReferenceLanguage
public String getReferenceLanguage()
-
setReferenceLanguage
public void setReferenceLanguage(String referenceLanguage)
-
isBreakRepeat
public boolean isBreakRepeat()
-
setBreakRepeat
public void setBreakRepeat(boolean breakRepeat)
-
isShortURL
public boolean isShortURL()
-
getShortURL
public String getShortURL()
-
getShortURL
public String getShortURL(ContentContext ctx) throws Exception
- Throws:
Exception
-
getShortURL
public String getShortURL(ContentContext ctx, boolean releaseCache) throws Exception
- Throws:
Exception
-
getShortLanguageURL
public String getShortLanguageURL(ContentContext ctx) throws Exception
- Throws:
Exception
-
setShortURL
public void setShortURL(String shortURL)
-
getStartPublishDate
public Date getStartPublishDate()
-
setStartPublishDate
public void setStartPublishDate(Date startPublishDate)
-
getEndPublishDate
public Date getEndPublishDate()
-
setEndPublishDate
public void setEndPublishDate(Date endPublishDate)
-
isTimeRange
public boolean isTimeRange()
return true if time range can modify the status of the page in the future.- Returns:
-
getType
public String getType()
-
setType
public void setType(String type)
-
getSharedName
public String getSharedName()
-
setSharedName
public void setSharedName(String sharedName)
-
isChildrenAssociation
public boolean isChildrenAssociation()
-
isRootChildrenAssociation
public boolean isRootChildrenAssociation()
-
isChildrenOfAssociation
public boolean isChildrenOfAssociation()
check if this page is a part of page association- Returns:
-
isDirectChildrenOfAssociation
public boolean isDirectChildrenOfAssociation()
check if this page is a direct children of page association- Returns:
-
getChildrenAssociationPage
public MenuElement getChildrenAssociationPage()
get the children association page of the current page.- Returns:
-
getRootOfChildrenAssociation
public MenuElement getRootOfChildrenAssociation()
get the root (parent) of the children association page- Returns:
-
getMainChildrenAssociation
public MenuElement getMainChildrenAssociation()
get the page marked as children association- Returns:
-
setChildrenAssociation
public void setChildrenAssociation(boolean childrenAssociation)
-
getFirstChild
public MenuElement getFirstChild()
-
equals
public boolean equals(ContentContext ctx, MenuElement page)
-
equals
public boolean equals(ContentContext ctx, MenuElement page, boolean withChildren)
-
copyChildren
public void copyChildren(MenuElement page)
-
printInfo
public void printInfo(ContentContext ctx, PrintStream out)
- Specified by:
printInfo
in interfaceIPrintInfo
-
getUrlNumber
public int getUrlNumber()
in case of same URL, this value in incremented. all URL factory (implementation of @IURLFactory) can use this number for create different URL.- Returns:
-
setUrlNumber
public void setUrlNumber(int urlNumber)
-
getEvent
public Event getEvent(ContentContext ctx) throws Exception
get event if menu element contains event info.- Parameters:
ctx
-- Returns:
- a event, null if this page does'nt contains event information
- Throws:
Exception
-
getAreaClass
public String getAreaClass(ContentContext ctx, String area) throws Exception
- Throws:
Exception
-
getEvents
public List<Event> getEvents(ContentContext ctx) throws Exception
get event if menu element contains event info.- Parameters:
ctx
-- Returns:
- a event, null if this page does'nt contains event information
- Throws:
Exception
-
isEditabled
public boolean isEditabled(ContentContext ctx) throws Exception
- Throws:
Exception
-
isReference
public boolean isReference(ContentContext ctx) throws Exception
is a page with reference to other page, like page reference of children link- Parameters:
ctx
-- Returns:
- Throws:
Exception
-
getContentAsMap
public Map<String,Object> getContentAsMap(ContentContext ctx) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, Exception
- Specified by:
getContentAsMap
in interfaceIRestItem
- Throws:
IllegalArgumentException
IllegalAccessException
InvocationTargetException
Exception
-
isRestWidthChildren
public boolean isRestWidthChildren()
-
setRestWidthChildren
public void setRestWidthChildren(boolean restWidthChildren)
-
getSavedParent
public String getSavedParent()
-
setSavedParent
public void setSavedParent(String freeData)
-
isTrash
public boolean isTrash()
-
isInTrash
public boolean isInTrash()
-
isLayout
public boolean isLayout()
-
getFinalSeoWeight
public int getFinalSeoWeight()
-
isNoIndex
public boolean isNoIndex()
-
getSeoWeight
public int getSeoWeight()
-
setSeoWeight
public void setSeoWeight(int searchEngineWeight)
-
needTemplate
public boolean needTemplate(ContentContext ctx, String templateId) throws Exception
check if page need a specific template.- Parameters:
templateId
-- Returns:
- Throws:
Exception
-
isModel
public boolean isModel()
-
setModel
public void setModel(boolean model)
-
isAdmin
public boolean isAdmin()
-
setAdmin
public void setAdmin(boolean admin)
-
getIpSecurityErrorPageName
public String getIpSecurityErrorPageName()
-
setIpSecurityErrorPageName
public void setIpSecurityErrorPageName(String ipSecurity)
-
isNeedValidation
public boolean isNeedValidation()
-
setNeedValidation
public void setNeedValidation(boolean needValidation)
-
isNoValidation
public boolean isNoValidation()
-
setNoValidation
public void setNoValidation(boolean noValidation)
-
getComponentTypes
public Map<String,List<String>> getComponentTypes(ContentContext ctx) throws Exception
get list of component type by area- Parameters:
ctx
-- Returns:
- map of list with area as key
- Throws:
Exception
-
getTaxonomy
public Set<String> getTaxonomy()
- Specified by:
getTaxonomy
in interfaceITaxonomyContainer
-
isPublic
public boolean isPublic(ContentContext ctx)
-
getComponent
public IContentVisualComponent getComponent(ContentContext ctx, String id) throws Exception
- Throws:
Exception
-
getHtmlId
public String getHtmlId(ContentContext ctx)
-
getHtmlSectionId
public String getHtmlSectionId(ContentContext ctx)
-
getPDFLayout
public String getPDFLayout(ContentContext ctx) throws Exception
- Throws:
Exception
-
getCss
public String getCss(ContentContext ctx) throws Exception
- Throws:
Exception
-
getContentLanguage
public String getContentLanguage()
the content of this page is only for this language (use for import data only)- Returns:
- a language code
-
setContentLanguage
public void setContentLanguage(String contentLanguage)
-
deleteComponent
public void deleteComponent(String lang)
delete components- Parameters:
lang
- the lang to be deleted (null if all lang)
-
-