Class AdminNavigationServiceImpl
java.lang.Object
org.broadleafcommerce.openadmin.server.security.service.navigation.AdminNavigationServiceImpl
- All Implemented Interfaces:
AdminNavigationService
@Service("blAdminNavigationService")
public class AdminNavigationServiceImpl
extends Object
implements AdminNavigationService
This service is used to build the left hand navigation for the admin
- Author:
- elbertbautista
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<SectionAuthorization>protected AdminNavigationDaoprotected AdminNavigationServiceExtensionManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<AdminSection>buildAuthorizedSectionsList(AdminUser adminUser, AdminModule module) booleancheckPermissions(Set<String> authorizedPermissionNames, String permissionName) findAdminSectionByClassAndSectionId(Class<?> clazz, String sectionId) In some cases, a single class is served by more than one section.findAdminSectionByClassAndSectionId(String className, String sectionId) In some cases, a single class is served by more than one section.findAdminSectionBySectionKey(String sectionKey) Gets all of theAdminSections in the system, sorted by theAdminSection.getDisplayOrder()getClassNameForSection(String sectionKey) Gets the fully qualified ceiling entity classname for this section.getSectionCrumbs(String crumbList) Utility method for parsing a delimitted section crumb list (usually the "sectionCrumbs" parameter on the HttpServletRequest).protected StringguessClassFromInterfaces(String clazz) booleanisUserAuthorizedToViewModule(AdminUser adminUser, AdminModule module) booleanisUserAuthorizedToViewSection(AdminUser adminUser, AdminSection section) protected StringparseForAllPermission(String currentPermission) protected voidpopulateAdminMenu(AdminUser adminUser, AdminMenu adminMenu, List<AdminModule> modules) voidremove(AdminSection adminSection) save(AdminSection adminSection) voidsetAdditionalSectionAuthorizations(List<SectionAuthorization> additionalSectionAuthorizations)
-
Field Details
-
additionalSectionAuthorizations
-
extensionManager
-
Constructor Details
-
AdminNavigationServiceImpl
public AdminNavigationServiceImpl()
-
-
Method Details
-
save
- Specified by:
savein interfaceAdminNavigationService
-
remove
- Specified by:
removein interfaceAdminNavigationService
-
buildMenu
- Specified by:
buildMenuin interfaceAdminNavigationService
-
isUserAuthorizedToViewModule
- Specified by:
isUserAuthorizedToViewModulein interfaceAdminNavigationService
-
findAdminSectionByURI
- Specified by:
findAdminSectionByURIin interfaceAdminNavigationService
-
findAdminSectionByClassAndSectionId
Description copied from interface:AdminNavigationServiceIn some cases, a single class is served by more than one section.- Specified by:
findAdminSectionByClassAndSectionIdin interfaceAdminNavigationService- Returns:
-
findAdminSectionByClassAndSectionId
Description copied from interface:AdminNavigationServiceIn some cases, a single class is served by more than one section.- Specified by:
findAdminSectionByClassAndSectionIdin interfaceAdminNavigationService- Returns:
-
findAdminSectionBySectionKey
- Specified by:
findAdminSectionBySectionKeyin interfaceAdminNavigationService
-
findBaseAdminSectionByClass
- Specified by:
findBaseAdminSectionByClassin interfaceAdminNavigationService
-
guessClassFromInterfaces
-
isUserAuthorizedToViewSection
- Specified by:
isUserAuthorizedToViewSectionin interfaceAdminNavigationService
-
findAllAdminSections
Description copied from interface:AdminNavigationServiceGets all of theAdminSections in the system, sorted by theAdminSection.getDisplayOrder()- Specified by:
findAllAdminSectionsin interfaceAdminNavigationService- Returns:
- the list of all
AdminSections sorted byAdminSection.getDisplayOrder()
-
checkPermissions
- Specified by:
checkPermissionsin interfaceAdminNavigationService
-
getAdditionalSectionAuthorizations
-
setAdditionalSectionAuthorizations
public void setAdditionalSectionAuthorizations(List<SectionAuthorization> additionalSectionAuthorizations) -
getClassNameForSection
Description copied from interface:AdminNavigationServiceGets the fully qualified ceiling entity classname for this section. If this section is not explicitly defined in the database, will return the value passed into this function. For example, if there is a mapping from "/myentity" to "com.mycompany.myentity", both "http://localhost/myentity" and "http://localhost/com.mycompany.myentity" are valid request paths.- Specified by:
getClassNameForSectionin interfaceAdminNavigationService- Returns:
- the className for this sectionKey if found in the database or the sectionKey if not
-
getSectionCrumbs
Description copied from interface:AdminNavigationServiceUtility method for parsing a delimitted section crumb list (usually the "sectionCrumbs" parameter on the HttpServletRequest). Should return a list ofSectionCrumbinstances used to identify the different, currently active admin sections.- Specified by:
getSectionCrumbsin interfaceAdminNavigationService- Parameters:
crumbList- delimitted string of section identifiers- Returns:
- currently active admin sections in the order specified in the crumbList param
-
parseForAllPermission
-
populateAdminMenu
protected void populateAdminMenu(AdminUser adminUser, AdminMenu adminMenu, List<AdminModule> modules) -
buildAuthorizedSectionsList
-