use of util.StringOption in project coprhd-controller by CoprHD.
the class UserGroup method addReferenceData.
//
// Add reference data so that they can be reference in html template
//
private static void addReferenceData() {
List<StringOption> domains = Lists.newArrayList();
for (AuthnProviderRestRep authProvider : AuthnProviderUtils.getAuthnProviders()) {
if (!authProvider.getDisable()) {
for (String domain : authProvider.getDomains()) {
StringOption domainOption = new StringOption(domain, StringOption.getDisplayValue(domain, "Domains"));
domains.add(domainOption);
}
}
}
renderArgs.put("domainsJson", domains);
}
use of util.StringOption in project coprhd-controller by CoprHD.
the class FileSystems method getScheculePolicies.
public static void getScheculePolicies() {
ViPRCoreClient client = BourneUtil.getViprClient();
List<NamedRelatedResourceRep> filePolicies = client.fileProtectionPolicies().listFilePolicies().getFilePolicies();
List<StringOption> policyOptions = Lists.newArrayList();
for (NamedRelatedResourceRep filePolicy : filePolicies) {
FilePolicyRestRep policyRestRep = client.fileProtectionPolicies().get(filePolicy.getId());
if (policyRestRep != null && "file_system".equalsIgnoreCase(policyRestRep.getAppliedAt())) {
policyOptions.add(new StringOption(policyRestRep.getId().toString(), filePolicy.getName()));
}
}
renderJSON(policyOptions);
}
use of util.StringOption in project coprhd-controller by CoprHD.
the class ViprResourceController method dataObjectOptions.
protected static List<StringOption> dataObjectOptions(Collection<? extends DataObjectRestRep> values, boolean sorted, boolean escaped) {
List<StringOption> options = Lists.newArrayList();
if (values != null) {
for (DataObjectRestRep value : values) {
String name = (escaped ? StringEscapeUtils.escapeHtml(name(value)) : name(value));
options.add(new StringOption(stringId(value), name));
}
}
if (sorted) {
Collections.sort(options);
}
return options;
}
use of util.StringOption in project coprhd-controller by CoprHD.
the class StorageProviderTypes method getProvidersWithMDM.
public static List<StringOption> getProvidersWithMDM() {
List<StringOption> allproviders = new ArrayList<StringOption>();
StorageSystemTypeList storagetypelist = StorageSystemTypeUtils.getAllStorageSystemTypes(ALL_TYPE);
for (StorageSystemTypeRestRep storagetypeRest : storagetypelist.getStorageSystemTypes()) {
if (storagetypeRest.getIsDefaultMDM()) {
allproviders.add(new StringOption(storagetypeRest.getStorageTypeName(), storagetypeRest.getStorageTypeDispName()));
}
}
return allproviders;
}
use of util.StringOption in project coprhd-controller by CoprHD.
the class StorageProviderTypes method getProvidersWithoutSSL.
public static List<StringOption> getProvidersWithoutSSL() {
List<StringOption> allproviders = new ArrayList<StringOption>();
StorageSystemTypeList storagetypelist = StorageSystemTypeUtils.getAllStorageSystemTypes(ALL_TYPE);
for (StorageSystemTypeRestRep storagetypeRest : storagetypelist.getStorageSystemTypes()) {
if (!storagetypeRest.getIsDefaultSsl()) {
allproviders.add(new StringOption(storagetypeRest.getStorageTypeName(), storagetypeRest.getStorageTypeDispName()));
}
}
return allproviders;
}
Aggregations