Search in sources :

Example 6 with StringOption

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);
}
Also used : StringOption(util.StringOption) AuthnProviderRestRep(com.emc.storageos.model.auth.AuthnProviderRestRep)

Example 7 with StringOption

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);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) StringOption(util.StringOption) FilePolicyRestRep(com.emc.storageos.model.file.policy.FilePolicyRestRep) NamedRelatedResourceRep(com.emc.storageos.model.NamedRelatedResourceRep)

Example 8 with StringOption

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;
}
Also used : StringOption(util.StringOption) DataObjectRestRep(com.emc.storageos.model.DataObjectRestRep)

Example 9 with StringOption

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;
}
Also used : StorageSystemTypeRestRep(com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep) StringOption(util.StringOption) ArrayList(java.util.ArrayList) StorageSystemTypeList(com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)

Example 10 with StringOption

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;
}
Also used : StorageSystemTypeRestRep(com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep) StringOption(util.StringOption) ArrayList(java.util.ArrayList) StorageSystemTypeList(com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)

Aggregations

StringOption (util.StringOption)44 ArrayList (java.util.ArrayList)26 StorageSystemTypeRestRep (com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep)20 StorageSystemTypeList (com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)19 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)4 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)3 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)3 FlashException (controllers.util.FlashException)3 ComputeImageServerRestRep (com.emc.storageos.model.compute.ComputeImageServerRestRep)2 ComputeSystemRestRep (com.emc.storageos.model.compute.ComputeSystemRestRep)2 StorageSystemRestRep (com.emc.storageos.model.systems.StorageSystemRestRep)2 URI (java.net.URI)2 DataObjectRestRep (com.emc.storageos.model.DataObjectRestRep)1 AuthnProviderRestRep (com.emc.storageos.model.auth.AuthnProviderRestRep)1 CustomServicesPrimitiveResourceList (com.emc.storageos.model.customservices.CustomServicesPrimitiveResourceList)1 FilePolicyRestRep (com.emc.storageos.model.file.policy.FilePolicyRestRep)1 BucketRestRep (com.emc.storageos.model.object.BucketRestRep)1 ProjectRestRep (com.emc.storageos.model.project.ProjectRestRep)1 ComputeVirtualPoolRestRep (com.emc.storageos.model.vpool.ComputeVirtualPoolRestRep)1 TruststoreSettings (com.emc.vipr.model.keystore.TruststoreSettings)1