Package org.ametys.plugins.userdirectory
Class OrganisationChartPageHandler
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.userdirectory.OrganisationChartPageHandler
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
public class OrganisationChartPageHandler
extends AbstractLogEnabled
implements Component, Serviceable
Component providing methods to retrieve organization chart virtual pages, such as the organization chart root and orgUnit page.
-
Field Summary
Modifier and TypeFieldDescriptionprotected AmetysObjectResolver
The ametys object resolver.static final String
The orgUnit child attribute namestatic final String
The attribute name for orgUnit user in repeaterstatic final String
The attribute name for orgUnit user role in repeaterstatic final String
The attribute name for orgUnit users repeaterstatic final String
The orgUnit parent attribute namestatic final String
The avalon role. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetChildContents
(Content parentContent) Get child orgUnit contents from parentContentgetChildFromPath
(Content parentContent, String path) Get the child content.getContentsForRootPage
(Page rootPage) Get orgUnit contents from rootPageGet orgUnit contentsgetOrganisationChartRootPages
(String siteName, String sitemapName) Get the organization chart root page.getParentContent
(Content childContent) Get parent orgUnit content from childContentgetUserContents
(Content content) Get users contents from contentboolean
True if the page is the organization chart root pagevoid
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The avalon role. -
PARENT_ORGUNIT_ATTRIBUTE_NAME
The orgUnit parent attribute name- See Also:
-
CHILD_ORGUNIT_ATTRIBUTE_NAME
The orgUnit child attribute name- See Also:
-
ORGUNIT_USERS_ATTRIBUTE_NAME
The attribute name for orgUnit users repeater- See Also:
-
ORGUNIT_USER_ATTRIBUTE_NAME
The attribute name for orgUnit user in repeater- See Also:
-
ORGUNIT_USER_ROLE_ATTRIBUTE_NAME
The attribute name for orgUnit user role in repeater- See Also:
-
_resolver
The ametys object resolver.
-
-
Constructor Details
-
OrganisationChartPageHandler
public OrganisationChartPageHandler()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getContentsForRootPage
Get orgUnit contents from rootPage- Parameters:
rootPage
- the root page- Returns:
- the list of orgUnit contents
-
getFirstLevelOfContents
Get orgUnit contents- Parameters:
lang
- the language- Returns:
- the list of orgUnit contents at the first level
-
isOrganisationChartRootPage
True if the page is the organization chart root page- Parameters:
jcrPage
- the page- Returns:
- true if the page is the organization chart root page
-
getChildContents
Get child orgUnit contents from parentContent- Parameters:
parentContent
- the parent content- Returns:
- the list of child orgUnit contents
-
getParentContent
Get parent orgUnit content from childContent- Parameters:
childContent
- the child content- Returns:
- the parent orgUnit content
-
getUserContents
Get users contents from content- Parameters:
content
- the content- Returns:
- the list of user contents
-
getChildFromPath
Get the child content. Return null if it not exist- Parameters:
parentContent
- the parent contentpath
- the path from the parent content- Returns:
- the child content.
-
getOrganisationChartRootPages
public Page getOrganisationChartRootPages(String siteName, String sitemapName) throws AmetysRepositoryException Get the organization chart root page.- Parameters:
siteName
- the current site.sitemapName
- the sitemap name.- Returns:
- the organization chart root page
- Throws:
AmetysRepositoryException
- if an error occurred.
-