public class SecondLevelPageFactory extends AbstractOdfPageFactory implements AmetysObjectFactory<SecondLevelPage>
AmetysObjectFactory
handling SecondLevelPage
._ametysObjectFactoryEP, _manager, _odfPageHandler, _pageCache, _pageDataTypeExtensionPoint, _resolver, _serviceExtensionPoint
Constructor and Description |
---|
SecondLevelPageFactory() |
Modifier and Type | Method and Description |
---|---|
private String[] |
_extractLevels(String id) |
private Page |
_extractRoot(String id) |
private Optional<Map.Entry<String,String>> |
_findSecondLevelValueEntry(Map<String,String> secondLevelValues,
String levelCode) |
private Optional<Map.Entry<String,String>> |
_findSecondLevelValueEntry(Page rootPage,
String levelCode) |
private boolean |
_hasSecondLevelValue(Page rootPage,
String level2Code) |
private SecondLevelPage |
_toSecondLevelPage(Page rootPage,
String level1Code,
Map.Entry<String,String> secondLevelValueEntry) |
SecondLevelPage |
getAmetysObjectById(String id)
|
String |
getScheme()
Returns the protocol of this factory, used to construct unique ids.
|
boolean |
hasAmetysObjectForId(String id)
Return true if the specified id correspond to an existing
AmetysObject . |
getCoursePageFactory, getFirstLevelPageFactory, getODFPageCache, getODFPageHandler, getPageDataTypeEP, getProgramPageFactory, getResolver, getSecondLevelPageFactory, getServiceEP, getZoneDataTypeEP, getZoneItemDataTypeEP, service
getLogger, setLogger
public SecondLevelPageFactory()
public SecondLevelPage getAmetysObjectById(String id) throws AmetysRepositoryException
AmetysObjectFactory
getAmetysObjectById
in interface AmetysObjectFactory<SecondLevelPage>
id
- the identifier.AmetysObject
.AmetysRepositoryException
- if an error occurs.private Page _extractRoot(String id)
private String[] _extractLevels(String id)
private Optional<Map.Entry<String,String>> _findSecondLevelValueEntry(Page rootPage, String levelCode)
private Optional<Map.Entry<String,String>> _findSecondLevelValueEntry(Map<String,String> secondLevelValues, String levelCode)
private SecondLevelPage _toSecondLevelPage(Page rootPage, String level1Code, Map.Entry<String,String> secondLevelValueEntry)
public String getScheme()
AmetysObjectFactory
getScheme
in interface AmetysObjectFactory<SecondLevelPage>
public boolean hasAmetysObjectForId(String id) throws AmetysRepositoryException
AmetysObjectFactory
AmetysObject
.
Id are like <protocol>://<protocol-specific-part>
.hasAmetysObjectForId
in interface AmetysObjectFactory<SecondLevelPage>
id
- the identifier.AmetysObject
.AmetysRepositoryException
- if an error occurs.private boolean _hasSecondLevelValue(Page rootPage, String level2Code) throws AmetysRepositoryException
AmetysRepositoryException