Class VirtualUserDirectoryPageFactory
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.userdirectory.page.VirtualUserDirectoryPageFactory
-
- All Implemented Interfaces:
AmetysObjectFactory<Page>,VirtualAmetysObjectFactory<Page>,LogEnabled,Component,Serviceable
public class VirtualUserDirectoryPageFactory extends AbstractLogEnabled implements VirtualAmetysObjectFactory<Page>, Serviceable
AmetysObjectFactoryfor handling "virtual" user directory page
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver_resolverThe ametys object resolverprotected UserDirectoryPageHandler_userDirectoryPageHandlerThe user directory root page handler.
-
Constructor Summary
Constructors Constructor Description VirtualUserDirectoryPageFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PagegetAmetysObjectById(String id)PagegetChild(JCRAmetysObject parent, String childName)Returns a namedAmetysObject.AmetysObjectIterable<Page>getChildren(JCRAmetysObject parent)Returns the "root" objects of this virtual factory, hosted in the Ametys hierarchy under aTraversableAmetysObject, which is backed by a concrete JCR Node.StringgetScheme()Returns the protocol of this factory, used to construct unique ids.booleanhasAmetysObjectForId(String id)Return true if the specified id correspond to an existingAmetysObject.booleanhasChild(JCRAmetysObject parent, String childName)Returns true if the namedAmetysObjectexists.voidservice(ServiceManager manager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_userDirectoryPageHandler
protected UserDirectoryPageHandler _userDirectoryPageHandler
The user directory root page handler.
-
_resolver
protected AmetysObjectResolver _resolver
The ametys object resolver
-
-
Constructor Detail
-
VirtualUserDirectoryPageFactory
public VirtualUserDirectoryPageFactory()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getAmetysObjectById
public Page getAmetysObjectById(String id) throws AmetysRepositoryException
Description copied from interface:AmetysObjectFactory- Specified by:
getAmetysObjectByIdin interfaceAmetysObjectFactory<Page>- Parameters:
id- the identifier.- Returns:
- the corresponding
AmetysObject. - Throws:
AmetysRepositoryException- if an error occurs.
-
hasAmetysObjectForId
public boolean hasAmetysObjectForId(String id) throws AmetysRepositoryException
Description copied from interface:AmetysObjectFactoryReturn true if the specified id correspond to an existingAmetysObject. Id are like<protocol>://<protocol-specific-part>.- Specified by:
hasAmetysObjectForIdin interfaceAmetysObjectFactory<Page>- Parameters:
id- the identifier.- Returns:
- true if the specified id correspond to an existing
AmetysObject. - Throws:
AmetysRepositoryException- if an error occurs.
-
getScheme
public String getScheme()
Description copied from interface:AmetysObjectFactoryReturns the protocol of this factory, used to construct unique ids.- Specified by:
getSchemein interfaceAmetysObjectFactory<Page>- Returns:
- the protocol of this factory.
-
getChildren
public AmetysObjectIterable<Page> getChildren(JCRAmetysObject parent)
Description copied from interface:VirtualAmetysObjectFactoryReturns the "root" objects of this virtual factory, hosted in the Ametys hierarchy under aTraversableAmetysObject, which is backed by a concrete JCR Node.- Specified by:
getChildrenin interfaceVirtualAmetysObjectFactory<Page>- Parameters:
parent- theJCRAmetysObject"hosting" this factory.- Returns:
- the root objects of this virtual factory.
-
getChild
public Page getChild(JCRAmetysObject parent, String childName)
Description copied from interface:VirtualAmetysObjectFactoryReturns a namedAmetysObject.- Specified by:
getChildin interfaceVirtualAmetysObjectFactory<Page>- Parameters:
parent- theJCRAmetysObject"hosting" this factory.childName- the name of the virtual child.- Returns:
- the corresponding
AmetysObject.
-
hasChild
public boolean hasChild(JCRAmetysObject parent, String childName)
Description copied from interface:VirtualAmetysObjectFactoryReturns true if the namedAmetysObjectexists.- Specified by:
hasChildin interfaceVirtualAmetysObjectFactory<Page>- Parameters:
parent- theJCRAmetysObject"hosting" this factory.childName- the name of the virtual child.- Returns:
- true if the named
AmetysObjectexists.
-
-