Class SecondLevelPageFactory
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.odfweb.repository.AbstractOdfPageFactory
-
- org.ametys.plugins.odfweb.repository.SecondLevelPageFactory
-
- All Implemented Interfaces:
AmetysObjectFactory<SecondLevelPage>,LogEnabled,Component,Serviceable
public class SecondLevelPageFactory extends AbstractOdfPageFactory implements AmetysObjectFactory<SecondLevelPage>
AmetysObjectFactoryhandlingSecondLevelPage.
-
-
Field Summary
-
Fields inherited from class org.ametys.plugins.odfweb.repository.AbstractOdfPageFactory
_ametysObjectFactoryEP, _manager, _odfPageHandler, _pageCache, _pageDataTypeExtensionPoint, _resolver, _serviceExtensionPoint
-
-
Constructor Summary
Constructors Constructor Description SecondLevelPageFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String[]_extractLevels(String id)private Page_extractRoot(String id)private Optional<Map.Entry<String,OdfClassificationHandler.LevelValue>>_findSecondLevelValueEntry(Map<String,OdfClassificationHandler.LevelValue> secondLevelValues, String levelCode)private Optional<Map.Entry<String,OdfClassificationHandler.LevelValue>>_findSecondLevelValueEntry(Page rootPage, String levelCode)private boolean_hasSecondLevelValue(Page rootPage, String level2Code)private SecondLevelPage_toSecondLevelPage(Page rootPage, String level1Code, Map.Entry<String,OdfClassificationHandler.LevelValue> secondLevelValueEntry)SecondLevelPagegetAmetysObjectById(String id)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.-
Methods inherited from class org.ametys.plugins.odfweb.repository.AbstractOdfPageFactory
getCoursePageFactory, getFirstLevelPageFactory, getODFPageCache, getODFPageHandler, getPageDataTypeEP, getProgramPageFactory, getResolver, getSecondLevelPageFactory, getServiceEP, getZoneDataTypeEP, getZoneItemDataTypeEP, service
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
SecondLevelPageFactory
public SecondLevelPageFactory()
-
-
Method Detail
-
getAmetysObjectById
public SecondLevelPage getAmetysObjectById(String id) throws AmetysRepositoryException
Description copied from interface:AmetysObjectFactory- Specified by:
getAmetysObjectByIdin interfaceAmetysObjectFactory<SecondLevelPage>- Parameters:
id- the identifier.- Returns:
- the corresponding
AmetysObject. - Throws:
AmetysRepositoryException- if an error occurs.
-
_extractRoot
private Page _extractRoot(String id)
-
_extractLevels
private String[] _extractLevels(String id)
-
_findSecondLevelValueEntry
private Optional<Map.Entry<String,OdfClassificationHandler.LevelValue>> _findSecondLevelValueEntry(Page rootPage, String levelCode)
-
_findSecondLevelValueEntry
private Optional<Map.Entry<String,OdfClassificationHandler.LevelValue>> _findSecondLevelValueEntry(Map<String,OdfClassificationHandler.LevelValue> secondLevelValues, String levelCode)
-
_toSecondLevelPage
private SecondLevelPage _toSecondLevelPage(Page rootPage, String level1Code, Map.Entry<String,OdfClassificationHandler.LevelValue> secondLevelValueEntry)
-
getScheme
public String getScheme()
Description copied from interface:AmetysObjectFactoryReturns the protocol of this factory, used to construct unique ids.- Specified by:
getSchemein interfaceAmetysObjectFactory<SecondLevelPage>- Returns:
- the protocol of this factory.
-
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<SecondLevelPage>- Parameters:
id- the identifier.- Returns:
- true if the specified id correspond to an existing
AmetysObject. - Throws:
AmetysRepositoryException- if an error occurs.
-
_hasSecondLevelValue
private boolean _hasSecondLevelValue(Page rootPage, String level2Code) throws AmetysRepositoryException
- Throws:
AmetysRepositoryException
-
-