/** * Return the store relative URL of this domain. * * @return the store relative URL of this domain. */ @SuppressFBWarnings(value = "NP_NULL_PARAM_DEREF", justification = "isGlobal() check implies that domain.getName() is null") public String getUrl() { return isGlobal() ? "domain/_/" : "domain/" + Util.rawEncode(name) + "/"; }
/** * Return the store relative URL of this domain. * * @return the store relative URL of this domain. */ @SuppressFBWarnings(value = "NP_NULL_PARAM_DEREF", justification = "isGlobal() check implies that domain.getName() is null") public String getUrl() { return isGlobal() ? "domain/_/" : "domain/" + Util.rawEncode(name) + "/"; }
stdout.println(StringUtils.rightPad("Domain", maxIdLen) + " " + (domain.isGlobal() ? "(global)" : domain.getName()));
stdout.println(StringUtils.rightPad("Domain", maxIdLen) + " " + (domain.isGlobal() ? "(global)" : domain.getName()));
/** * Returns the map of {@link DomainWrapper} instances. * * @return the map of {@link DomainWrapper} instances. */ @Exported @NonNull public Map<String, DomainWrapper> getDomains() { Map<String, DomainWrapper> result = new TreeMap<String, DomainWrapper>(); for (Domain d : getStore().getDomains()) { String name; if (d.isGlobal()) { name = "_"; } else { name = d.getName(); } result.put(name, new DomainWrapper(this, d)); } return result; }
/** * Returns the map of {@link DomainWrapper} instances. * * @return the map of {@link DomainWrapper} instances. */ @Exported @NonNull public Map<String, DomainWrapper> getDomains() { Map<String, DomainWrapper> result = new TreeMap<String, DomainWrapper>(); for (Domain d : getStore().getDomains()) { String name; if (d.isGlobal()) { name = "_"; } else { name = d.getName(); } result.put(name, new DomainWrapper(this, d)); } return result; }
/** * Creates the children context menu with the supplied prefix to all URLs. * * @param prefix the prefix to prepend to relative urls. * @return the {@link ContextMenu} or {@code null} * @since 2.0 */ @CheckForNull public ContextMenu getChildrenContextMenu(String prefix) { ContextMenu menu = new ContextMenu(); for (Domain d : getStore().getDomains()) { MenuItem item = new MenuItem(d.getUrl(), getMenuItemIconUrlByClassSpec("icon-credentials-domain icon-md"), d.isGlobal() ? Messages.CredentialsStoreAction_GlobalDomainDisplayName() : d.getName() ); item.subMenu = new DomainWrapper(this, d).getContextMenu(ContextMenuIconUtils.buildUrl(prefix, d.getUrl())); menu.add(item); } return menu.items.isEmpty() ? null : menu; }
/** * Creates the children context menu with the supplied prefix to all URLs. * * @param prefix the prefix to prepend to relative urls. * @return the {@link ContextMenu} or {@code null} * @since 2.0 */ @CheckForNull public ContextMenu getChildrenContextMenu(String prefix) { ContextMenu menu = new ContextMenu(); for (Domain d : getStore().getDomains()) { MenuItem item = new MenuItem(d.getUrl(), getMenuItemIconUrlByClassSpec("icon-credentials-domain icon-md"), d.isGlobal() ? Messages.CredentialsStoreAction_GlobalDomainDisplayName() : d.getName() ); item.subMenu = new DomainWrapper(this, d).getContextMenu(ContextMenuIconUtils.buildUrl(prefix, d.getUrl())); menu.add(item); } return menu.items.isEmpty() ? null : menu; }
if (getStore().hasPermission(CREATE) || (getStore().hasPermission(MANAGE_DOMAINS) && !domain.isGlobal())) { ContextMenu result = new ContextMenu(); if (getStore().hasPermission(CREATE)) { )); if (getStore().hasPermission(MANAGE_DOMAINS) && !domain.isGlobal()) { result.add(new MenuItem(ContextMenuIconUtils.buildUrl(prefix, "configure"), getMenuItemIconUrlByClassSpec("icon-setting icon-md"),
if (getStore().hasPermission(CREATE) || (getStore().hasPermission(MANAGE_DOMAINS) && !domain.isGlobal())) { ContextMenu result = new ContextMenu(); if (getStore().hasPermission(CREATE)) { )); if (getStore().hasPermission(MANAGE_DOMAINS) && !domain.isGlobal()) { result.add(new MenuItem(ContextMenuIconUtils.buildUrl(prefix, "configure"), getMenuItemIconUrlByClassSpec("icon-setting icon-md"),