@Override protected String asString (final Locale aObject) { return aDisplayTextProvider.getDisplayText (aObject, aDisplayLocale); } };
@Nullable public String getDisplayText (@Nonnull final Locale aContentLocale) { return m_aText.getDisplayText (aContentLocale); }
@Nonnull public static <T extends IHasDisplayName & IHasID <String>> HCA createCopyLink (@Nonnull final ILayoutExecutionContext aLEC, @Nonnull final T aCurObject) { final Locale aDisplayLocale = aLEC.getDisplayLocale (); return createCopyLink (aLEC, aCurObject, EWebPageText.OBJECT_COPY.getDisplayTextWithArgs (aDisplayLocale, aCurObject.getDisplayName ())); }
aAssignedUserGroups.getSortedInline (IHasName.getComparatorCollating (aDisplayLocale)) .forEach (aUserGroup -> aUserGroupUI.addChild (new HCDiv ().addChild (new HCA (createViewURL (aWPEC, BootstrapPagesMenuConfigurator.MENU_ADMIN_SECURITY_USER_GROUP, aAllUsersHavingThisRole.add (aUserMgr.getUserOfID (sUserID)); aAllUsersHavingThisRole.getSortedInline (IHasDisplayName.getComparatorCollating (aDisplayLocale)) .forEach (aUser -> aUserUI.addChild (new HCDiv ().addChild (new HCA (createViewURL (aWPEC, BootstrapPagesMenuConfigurator.MENU_ADMIN_SECURITY_USER,
public HCSMLSelect (@Nonnull final RequestField aRF, @Nonnull final Locale aDisplayLocale, @Nullable final Predicate <? super ISMLInfo> aFilter) { super (aRF); SMPMetaManager.getSMLInfoMgr () .getAllSMLInfos () .getSortedInline (IHasDisplayName.getComparatorCollating (aDisplayLocale)) .findAll (aFilter, x -> addOption (x.getID (), getDisplayName (x))); addOptionPleaseSelect (aDisplayLocale); } }
public HCRoleForUserGroupSelect (@Nonnull final RequestField aRF, @Nonnull final Locale aSortLocale, @Nullable final Collection <String> aSelectedRoles) { super (aRF); setMultiple (true); final Collection <? extends IRole> aAllRoles = AccessManager.getInstance ().getAllRoles (); setSize (Math.min (10, aAllRoles.size ())); for (final IRole aRole : CollectionHelper.getSorted (aAllRoles, new ComparatorHasName <IRole> (aSortLocale))) { final HCOption aOption = addOption (aRole.getID (), aRole.getName ()); if (aSelectedRoles != null && aSelectedRoles.contains (aRole.getID ())) aOption.setSelected (true); } } }
@Override protected void fillContent (@Nonnull final WPECTYPE aWPEC) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); aNodeList.addChild (HCH4.create (EText.MSG_TPM_HEADER.getDisplayText (aDisplayLocale))); // Third party modules final Set <IThirdPartyModule> aModules = ThirdPartyModuleRegistry.getInstance () .getAllRegisteredThirdPartyModules (); final HCUL aUL = aNodeList.addAndReturnChild (new HCUL ()); // Show all required modules, sorted by name for (final IThirdPartyModule aModule : CollectionHelper.getSorted (aModules, new ComparatorHasDisplayName <IHasDisplayName> (aDisplayLocale))) if (!aModule.isOptional ()) aUL.addItem (_getModuleHCNode (aModule, aDisplayLocale)); } }
aAssignedUserGroups.getSortedInline (IHasName.getComparatorCollating (aDisplayLocale)) .forEach (aUserGroup -> aUserGroupUI.addChild (new HCDiv ().addChild (new HCA (createViewURL (aWPEC, BootstrapPagesMenuConfigurator.MENU_ADMIN_SECURITY_USER_GROUP, aAllUsersHavingThisRole.add (aUserMgr.getUserOfID (sUserID)); aAllUsersHavingThisRole.getSortedInline (IHasDisplayName.getComparatorCollating (aDisplayLocale)) .forEach (aUser -> aUserUI.addChild (new HCDiv ().addChild (new HCA (createViewURL (aWPEC, BootstrapPagesMenuConfigurator.MENU_ADMIN_SECURITY_USER,
public HCSMLSelect (@Nonnull final RequestField aRF, @Nonnull final Locale aDisplayLocale, @Nullable final Predicate <? super ISMLInfo> aFilter) { super (aRF); SMPMetaManager.getSMLInfoMgr () .getAllSMLInfos () .getSortedInline (IHasDisplayName.getComparatorCollating (aDisplayLocale)) .findAll (aFilter, x -> addOption (x.getID (), getDisplayName (x))); addOptionPleaseSelect (aDisplayLocale); } }
@Nonnull public static <T extends IHasDisplayText & IHasID <String>> HCA createCopyLink (@Nonnull final ILayoutExecutionContext aLEC, @Nonnull final T aCurObject) { final Locale aDisplayLocale = aLEC.getDisplayLocale (); return createCopyLink (aLEC, aCurObject, EWebPageText.OBJECT_COPY.getDisplayTextWithArgs (aDisplayLocale, aCurObject.getDisplayText (aDisplayLocale))); }
@Nonnull public static <T extends IHasDisplayName & IHasID <String>> HCA createDeleteLink (@Nonnull final ILayoutExecutionContext aLEC, @Nonnull final T aCurObject) { final Locale aDisplayLocale = aLEC.getDisplayLocale (); return createDeleteLink (aLEC, aCurObject, EWebPageText.OBJECT_DELETE.getDisplayTextWithArgs (aDisplayLocale, aCurObject.getDisplayName ())); }
final String sDisplayCountry = aDisplayTextProvider != null ? aDisplayTextProvider.getDisplayText (aCountry, aDisplayLocale) : aCountry.getDisplayCountry (aDisplayLocale);
public HCUserGroupForUserSelect (@Nonnull final RequestField aRF, @Nonnull final Locale aSortLocale, @Nullable final Collection <String> aSelectedUserGroups) { super (aRF); setMultiple (true); final Collection <? extends IUserGroup> aAllUserGroups = AccessManager.getInstance ().getAllUserGroups (); setSize (Math.min (10, aAllUserGroups.size ())); for (final IUserGroup aUserGroup : CollectionHelper.getSorted (aAllUserGroups, new ComparatorHasName <IUserGroup> (aSortLocale))) { final HCOption aOption = addOption (aUserGroup.getID (), aUserGroup.getName ()); if (aSelectedUserGroups != null && aSelectedUserGroups.contains (aUserGroup.getID ())) aOption.setSelected (true); } } }
aAssignedUsers.getSortedInline (IHasDisplayName.getComparatorCollating (aDisplayLocale)) .forEach (aUser -> aUserUI.addChild (new HCDiv ().addChild (new HCA (createViewURL (aWPEC, BootstrapPagesMenuConfigurator.MENU_ADMIN_SECURITY_USER, aAssignedRoles.getSortedInline (IHasName.getComparatorCollating (aDisplayLocale)) .forEach (aRole -> aRoleUI.addChild (new HCDiv ().addChild (new HCA (createViewURL (aWPEC, BootstrapPagesMenuConfigurator.MENU_ADMIN_SECURITY_ROLE,
protected final void logThirdpartyModules () { // List all third party modules for later evaluation final ICommonsSet <IThirdPartyModule> aModules = ThirdPartyModuleRegistry.getInstance () .getAllRegisteredThirdPartyModules (); if (!aModules.isEmpty ()) { LOGGER.info ("Using the following third party modules:"); for (final IThirdPartyModule aModule : aModules.getSorted (IHasDisplayName.getComparatorCollating (SystemHelper.getSystemLocale ()))) if (!aModule.isOptional ()) { String sMsg = " " + aModule.getDisplayName (); if (aModule.getVersion () != null) sMsg += ' ' + aModule.getVersion ().getAsString (true); sMsg += " licensed under " + aModule.getLicense ().getDisplayName (); if (aModule.getLicense ().getVersion () != null) sMsg += ' ' + aModule.getLicense ().getVersion ().getAsString (); LOGGER.info (sMsg); } } }
@Nonnull public static <T extends IHasDisplayText & IHasID <String>> HCA createDeleteLink (@Nonnull final ILayoutExecutionContext aLEC, @Nonnull final T aCurObject) { final Locale aDisplayLocale = aLEC.getDisplayLocale (); return createDeleteLink (aLEC, aCurObject, EWebPageText.OBJECT_DELETE.getDisplayTextWithArgs (aDisplayLocale, aCurObject.getDisplayText (aDisplayLocale))); }
@Nonnull public static <T extends IHasDisplayName & IHasID <String>> HCA createEditLink (@Nonnull final ILayoutExecutionContext aLEC, @Nonnull final T aCurObject, @Nullable final Map <String, String> aParams) { final Locale aDisplayLocale = aLEC.getDisplayLocale (); return createEditLink (aLEC, aCurObject, EWebPageText.OBJECT_EDIT.getDisplayTextWithArgs (aDisplayLocale, aCurObject.getDisplayName ()), aParams); }
@Override protected void fillContent (@Nonnull final WPECTYPE aWPEC) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); aNodeList.addChild (new HCH4 ().addChild (EText.MSG_TPM_HEADER.getDisplayText (aDisplayLocale))); // Third party modules final Set <IThirdPartyModule> aModules = ThirdPartyModuleRegistry.getInstance () .getAllRegisteredThirdPartyModules (); final HCUL aUL = aNodeList.addAndReturnChild (new HCUL ()); // Show all required modules, sorted by name for (final IThirdPartyModule aModule : CollectionHelper.getSorted (aModules, IHasDisplayName.getComparatorCollating (aDisplayLocale))) if (!aModule.isOptional ()) aUL.addItem (_getModuleHCNode (aModule, aDisplayLocale)); } }
@Nonnull public static <T extends IHasDisplayText & IHasID <String>> HCA createEditLink (@Nonnull final ILayoutExecutionContext aLEC, @Nonnull final T aCurObject, @Nullable final Map <String, String> aParams) { final Locale aDisplayLocale = aLEC.getDisplayLocale (); return createEditLink (aLEC, aCurObject, EWebPageText.OBJECT_EDIT.getDisplayTextWithArgs (aDisplayLocale, aCurObject.getDisplayText (aDisplayLocale)), aParams); }
@Override protected void fillContent (@Nonnull final WPECTYPE aWPEC) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); aNodeList.addChild (new HCH4 ().addChild (EText.MSG_TPM_HEADER.getDisplayText (aDisplayLocale))); // Third party modules final Set <IThirdPartyModule> aModules = ThirdPartyModuleRegistry.getInstance () .getAllRegisteredThirdPartyModules (); final HCUL aUL = aNodeList.addAndReturnChild (new HCUL ()); // Show all required modules, sorted by name for (final IThirdPartyModule aModule : CollectionHelper.getSorted (aModules, IHasDisplayName.getComparatorCollating (aDisplayLocale))) if (!aModule.isOptional ()) aUL.addItem (_getModuleHCNode (aModule, aDisplayLocale)); } }