Returns a list with the names of all tenants.

@param tenantService the service that retrieves the {@link org.craftercms.profile.api.Tenant}s.

@return the list of tenant names
979437
public static List<String> getTenantNames(TenantService tenantService) throws ProfileException {
        List<Tenant> tenants = tenantService.getAllTenants();
        List<String> tenantNames = new ArrayList<>(tenants.size());

        if (CollectionUtils.isNotEmpty(tenants)) {
            for (Tenant tenant : tenants) {
                tenantNames.add(tenant.getName());
            }
        }

        return tenantNames;
    }
1060774
@Override
    public Set<Span> getChildren(String tenant, String id) {
        if (id == null) {
            throw new NullPointerException("Id should not be null!");
        }

        Set<Span> children = childrenCache.get(id);

        return children == null ? null : Collections.unmodifiableSet(children);
    }
758460
public static List<String> getAllNameSpaces() throws ApiException {
    V1NamespaceList listNamespace =
        COREV1_API.listNamespace(
            null, "true", null, null, null, 0, null, Integer.MAX_VALUE, Boolean.FALSE);
    List<String> list =
        listNamespace
            .getItems()
            .stream()
            .map(v1Namespace -> v1Namespace.getMetadata().getName())
            .collect(Collectors.toList());
    return list;
  }
400915
public Observable<Page<TenantIdDescriptionInner>> listAsync() {
        return listWithServiceResponseAsync()
            .map(new Func1<ServiceResponse<Page<TenantIdDescriptionInner>>, Page<TenantIdDescriptionInner>>() {
                @Override
                public Page<TenantIdDescriptionInner> call(ServiceResponse<Page<TenantIdDescriptionInner>> response) {
                    return response.body();
                }
            });
    }
739716
public TenantDefinition defineTenant(TenantDefinition tenantDef) {
        checkServiceState();
        String tenantName = tenantDef.getName();
        if (getTenantDef(tenantName) != null) {
            throw new DuplicateException("Tenant already exists: " + tenantName);
        }
        defineNewTenant(tenantDef);
        TenantDefinition updatedTenantDef = getTenantDef(tenantName);
        if (updatedTenantDef == null) {
            throw new RuntimeException("Tenant definition could not be retrieved after creation: " + tenantName);
        }
        removeUserHashes(updatedTenantDef);
        return updatedTenantDef;
    }
485957
def list(self, **params):
        
        # This is to ensure tenant_id key is not populated
        # if tenant_id=None is specified.
        tenant_id = params.pop('tenant_id', self.request.user.tenant_id)
        if tenant_id:
            params['tenant_id'] = tenant_id
        return self._list(**params)
433514
private void getAllServices() {
        try {
            List<ModelServiceInstance> instances = new DirectoryServiceRestfulClient().getAllInstances();
            for (ModelServiceInstance instance :instances){
                printServiceInstance(ServiceInstanceUtils.toServiceInstance(instance));
            }
        } catch (ServiceException e) {
            e.printStackTrace();
            fail(e.getServiceDirectoryError().getErrorMessage());
        }
    }
580948
public java.util.List<String> getServiceNames() {
        if (serviceNames == null) {
            serviceNames = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return serviceNames;
    }
127438
public void listRunningServices() {
        try {
            final List<String> formatedOutput =
                SecurityContext.executeWithSystemPermissions(new Callable<List<String>>() {
                    @Override
                    public List<String> call() throws Exception {
                        List<String> tmp = new ArrayList<String>();

                        List<ServiceReference<Domain>> listServiceReferences =
                            osgiUtilsService.listServiceReferences(Domain.class);
                        for (ServiceReference<Domain> ref : listServiceReferences) {
                            Domain service = bundleContext.getService(ref);
                            tmp.add(OutputStreamFormater.formatValues(
                                ref.getProperty(org.osgi.framework.Constants.SERVICE_PID).toString(), service
                                    .getAliveState().toString()));
                        }
                        return tmp;
                    }
                });
            for (String s : formatedOutput) {
                OutputStreamFormater.printValue(s);
            }
        } catch (ExecutionException ex) {
            ex.printStackTrace();
            System.err.println("Could not get services");
        }
    }
290698
public List<ServiceRefType<WebAppDescriptor>> getAllServiceRef()
   {
      List<ServiceRefType<WebAppDescriptor>> list = new ArrayList<ServiceRefType<WebAppDescriptor>>();
      List<Node> nodeList = model.get("service-ref");
      for(Node node: nodeList)
      {
         ServiceRefType<WebAppDescriptor>  type = new ServiceRefTypeImpl<WebAppDescriptor>(this, "service-ref", model, node);
         list.add(type);
      }
      return list;
   }
340807
private Dictionary<String, Object> getServiceProperties(ServiceReference<ResourceFactory> ref) {
        String[] keys = ref.getPropertyKeys();
        Dictionary<String, Object> properties = new Hashtable<String, Object>(keys.length);
        for (String key : keys) {
            if (!key.equals(ResourceFactory.JNDI_NAME) &&
                !key.equals(ResourceFactory.CREATES_OBJECT_CLASS)) {
                properties.put(key, ref.getProperty(key));
            }
        }

        properties.put(ResourceFactory.class.getName(), "true");
        properties.put(JNDI_SERVICENAME, ref.getProperty(ResourceFactory.JNDI_NAME));

        return properties;
    }
717126
@SuppressWarnings("unchecked")
    public Set<String> getServiceHandlerNames() {
        Map<String, Object> serviceHandlers = getServiceHandlers(false);
        if (serviceHandlers == null) {
            return Collections.EMPTY_SET;
        }
        return serviceHandlers.keySet();
    }
104532
public Dictionary<String, ?> getServiceProperties() {
        Dictionary<String, String> props = new Hashtable<>();
        props.put("name", name());
        props.put("fullName", fullName());
        props.put("mimetype", mimetype());
        props.put("engine", engine());
        return props;
    }
1215718
@Exported(name = "property", inline = true)
    public List<UserProperty> getAllProperties() {
        if (hasPermission(Jenkins.ADMINISTER)) {
            return Collections.unmodifiableList(properties);
        }

        return Collections.emptyList();
    }
1121166
public Map<String, Permission> getPermissions(String tenant) {
        if (!permissions.containsKey(tenant)) {
            return new HashMap<>();
        }
        return permissions.get(tenant);
    }
1336186
public java.util.List<String> getServiceArns() {
        if (serviceArns == null) {
            serviceArns = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return serviceArns;
    }
1050583
public java.util.List<String> getServiceIds() {
        if (serviceIds == null) {
            serviceIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return serviceIds;
    }