Class QueryRendererUtils
java.lang.Object
de.hybris.platform.cockpit.components.navigationarea.renderer.QueryRendererUtils
Auxiliary functionalities for QueryRenderer class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefinitions of Saved Query sharing modes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildGroupMenuLabel(String prefix, int totalUserCount) Build label for a group menu.buildGroupMenuLabel(String prefix, int checkedUserCount, int totalUserCount) Build label for a group menu.intgetCheckedUserCount(UserGroupModel model, List<PrincipalModel> readUsers) Get total number of users directly assigned to a group defined throughmodeland (users) participating inreadUsersat the same time.getGroupMenuItemTooltip(String groupName, int checkedUserCount, int totalUserCount, boolean allgroupMembersChecked) Create tooltip text for a group menu item.Get a label for delete operation based on sharing mode.Get a label for rename operation based on sharing mode.getSavedQuerySharingMode(UserModel user, CockpitSavedQueryModel query) Get saved query -querysharing mode foruser.intgetTotalUserCount(UserGroupModel model) Get total number of users directly assigned to a group defined throughmodel.booleanisUserExclusiveQuery(UserModel user, CockpitSavedQueryModel query) Verify whetheruserhas not shared thequery.booleanisUserReceivedSavedQuery(UserModel user, CockpitSavedQueryModel query) Verify whetheruserhas received thequery.
-
Constructor Details
-
QueryRendererUtils
public QueryRendererUtils()
-
-
Method Details
-
getTotalUserCount
Get total number of users directly assigned to a group defined through
model.- Parameters:
model- - group model- Returns:
- total number of users directly assigned to a group defined through
model
-
getCheckedUserCount
Get total number of users directly assigned to a group defined through
modeland (users) participating inreadUsersat the same time.- Parameters:
model- - group modelreadUsers- - users with read access- Returns:
- total number of users directly assigned to a group defined through
modeland (users) participating inreadUsersat the same time
-
buildGroupMenuLabel
Build label for a group menu.
Menu structure:
( / ) - Parameters:
prefix- - fixed prefix in labelcheckedUserCount- - number of checked users in menu (having read access) within current grouptotalUserCount- - total number of users directly assigned to a current group
-
buildGroupMenuLabel
Build label for a group menu.
Menu structure:
( ) - Parameters:
prefix- - fixed prefix in labeltotalUserCount- - total number of users directly assigned to a current group
-
getGroupMenuItemTooltip
public String getGroupMenuItemTooltip(String groupName, int checkedUserCount, int totalUserCount, boolean allgroupMembersChecked) Create tooltip text for a group menu item.
- Parameters:
groupName- - group namecheckedUserCount- - number of checked users in menu (having read access) within current grouptotalUserCount- - total number of users directly assigned to a current groupallgroupMembersChecked- - allgroupMembers is checked
-
isUserExclusiveQuery
Verify whether
userhas not shared thequery. Ifuseris the creator and has not shared thequerythentrueis returned,falseotherwise.- Parameters:
user- - a userquery- - a query to verify- Returns:
- information whether
userhas not shared thequery
-
isUserReceivedSavedQuery
Verify whether
userhas received thequery. Ifuseris not the creator and has received thequerythentrueis returned,falseotherwise.- Parameters:
user- - a userquery- - a query to verify- Returns:
- information whether
userhas received thequery
-
getSavedQuerySharingMode
public QueryRendererUtils.SavedQuerySharingMode getSavedQuerySharingMode(UserModel user, CockpitSavedQueryModel query) Get saved query -
querysharing mode foruser.- Parameters:
user- - a userquery- - a query- Returns:
- saved query sharing mode
-