Interface VirtualAmetysObjectFactory<A extends AmetysObject>
-
- Type Parameters:
A
- the actual type ofAmetysObject
s
- All Superinterfaces:
AmetysObjectFactory<A>
,Component
- All Known Implementing Classes:
BlogRootPageFactory
,FirstLevelPageFactory
,VirtualOrganisationChartPageFactory
,VirtualUGCPageFactory
,VirtualUserDirectoryPageFactory
public interface VirtualAmetysObjectFactory<A extends AmetysObject> extends AmetysObjectFactory<A>
AmetysObjectFactory
for handling "virtual" objects, in that they did not rely directly to the JCR storage.
Such factory is bounded to an object through a particular property in the JCR tree.
VirtualAmetysObject
handled by aVirtualAmetysObjectFactory
are considered as children of theJCRAmetysObject
corresponding to the JCR Node holding that property.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description A
getChild(JCRAmetysObject parent, String childName)
Returns a namedAmetysObject
.AmetysObjectIterable<A>
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.boolean
hasChild(JCRAmetysObject parent, String childName)
Returns true if the namedAmetysObject
exists.-
Methods inherited from interface org.ametys.plugins.repository.AmetysObjectFactory
getAmetysObjectById, getScheme, hasAmetysObjectForId
-
-
-
-
Method Detail
-
getChildren
AmetysObjectIterable<A> 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.- Parameters:
parent
- theJCRAmetysObject
"hosting" this factory.- Returns:
- the root objects of this virtual factory.
-
getChild
A getChild(JCRAmetysObject parent, String childName)
Returns a namedAmetysObject
.- Parameters:
parent
- theJCRAmetysObject
"hosting" this factory.childName
- the name of the virtual child.- Returns:
- the corresponding
AmetysObject
.
-
hasChild
boolean hasChild(JCRAmetysObject parent, String childName)
Returns true if the namedAmetysObject
exists.- Parameters:
parent
- theJCRAmetysObject
"hosting" this factory.childName
- the name of the virtual child.- Returns:
- true if the named
AmetysObject
exists.
-
-