public class OrganisationChartPageHandler extends AbstractLogEnabled implements Component, Serviceable
Modifier and Type | Field and Description |
---|---|
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
static String |
METADATA_CHILD_ORGUNIT
The orgUnit child metadata
|
static String |
METADATA_PARENT_ORGUNIT
The orgUnit parent metadata
|
static String |
ORGUNIT_CONTENT_TYPE
The orgUnit content type
|
static String |
ROLE
The avalon role.
|
Constructor and Description |
---|
OrganisationChartPageHandler() |
Modifier and Type | Method and Description |
---|---|
List<Content> |
getChildContents(Content parentContent)
Get child orgUnit contents from parentContent
|
Content |
getChildFromPath(Content parentContent,
String path)
Get the child content.
|
AmetysObjectIterable<Content> |
getContentsForRootPage(Page rootPage)
Get orgUnit contents from rootPage
|
AmetysObjectIterable<Content> |
getFirstLevelOfContents(String lang)
Get orgUnit contents
|
Page |
getOrganisationChartRootPages(String siteName,
String sitemapName)
Get the organization chart root page.
|
Content |
getParentContent(Content childContent)
Get parent orgUnit content from childContent
|
boolean |
isOrganisationChartRootPage(JCRAmetysObject jcrPage)
True if the page is the organization chart root page
|
boolean |
isReferencedOrgUnit(Content content)
True if the orgUnit is referenced
|
void |
service(ServiceManager manager) |
getLogger, setLogger
public static final String ORGUNIT_CONTENT_TYPE
public static final String METADATA_PARENT_ORGUNIT
public static final String METADATA_CHILD_ORGUNIT
protected AmetysObjectResolver _resolver
public OrganisationChartPageHandler()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public AmetysObjectIterable<Content> getContentsForRootPage(Page rootPage)
rootPage
- the root pagepublic AmetysObjectIterable<Content> getFirstLevelOfContents(String lang)
lang
- the languagepublic boolean isOrganisationChartRootPage(JCRAmetysObject jcrPage)
jcrPage
- the pagepublic List<Content> getChildContents(Content parentContent)
parentContent
- the parent contentpublic Content getParentContent(Content childContent)
childContent
- the child contentpublic Content getChildFromPath(Content parentContent, String path)
parentContent
- the parent contentpath
- the path from the parent contentpublic Page getOrganisationChartRootPages(String siteName, String sitemapName) throws AmetysRepositoryException
siteName
- the current site.sitemapName
- the sitemap name.AmetysRepositoryException
- if an error occurred.public boolean isReferencedOrgUnit(Content content)
content
- the orgUnit content