Return the count of the ResourceType
@param resourceType
@return Count of the resource type
329876
public Integer getCount(ResourceType resourceType) {
    Integer count = typeToCountMap.get(resourceType);
    if (count == null) {
      return 0;
    } else {
      return count;
    }
  }
190214
public Map<PoolInfo, PoolInfoMetrics> getPoolInfoMetrics(ResourceType type) {
    return schedulersForTypes.get(type).getPoolInfoMetrics();
  }
138196
public function visitResourceType(ResourceType $type)
    {
        $attributes = '';
        if (null !== $type->ofType()) {
            $attributes =
                sprintf('{ofType:%s}', var_export($type->ofType(), true));
        }

        return 'resource' . $attributes;
    }
470640
protected int getResourceTypeId() {

        if (CmsStringUtil.isNotEmpty(getResourceType())) {
            try {
                return OpenCms.getResourceManager().getResourceType(getResourceType()).getTypeId();
            } catch (CmsException e) {
                // ignore, no valid resource type ID found
            }
        }
        return -1;
    }
1164230
public function hasMenuAction(ResourceType $type)
    {
        $menuActions = $this->menuRepo->findBy(
            array('resourceType' => $type)
        );

        return count($menuActions) > 0;
    }
268136
public Set<ResourceType<L>> getChildren(ResourceType<L> resourceType) {
        Set<ResourceType<L>> directChildren = index.successorsOf(resourceType);
        return Collections.unmodifiableSet(directChildren);
    }
825478
public static @Nullable String getExistingResourceType(@NotNull ResourceResolver resourceResolver, @NotNull String @NotNull... resourceTypes) {
    for (String path : resourceTypes) {
      if (resourceResolver.getResource(path) != null) {
        return path;
      }
    }
    return null;
  }
1019381
public function getByWorkspaceAndResourceType(
        Workspace $workspace,
        ResourceType $resourceType
    )
    {
        return $this->resourceNodeRepo->findBy(
            array('workspace' => $workspace, 'resourceType' => $resourceType),
            array('name' => 'ASC')
        );
    }
949093
public function setResourceType(ResourceType $resourceType)
    {
        $this->iteratorName = '$' . $resourceType->getName();
        $this->resourceType = $resourceType;
    }
30913
private Map<ResourceType, MetricsIntValue> createTypeToCountMap(
      Collection<ResourceType> resourceTypes, String actionType) {
    Map<ResourceType, MetricsIntValue> m =
        new HashMap<ResourceType, MetricsIntValue>();
    for (ResourceType t : resourceTypes) {
      String name = (actionType + "_" + t).toLowerCase();
      MetricsIntValue value = new MetricsIntValue(name, registry);
      m.put(t, value);
    }
    return m;
  }
401336
private String getProviderName(String resourceType) {

        CmsDebugLog.consoleLog("getProviderName for " + resourceType);
        for (CmsResourceTypeBean typeBean : m_dialogBean.getTypes()) {
            if (typeBean.getType().equals(resourceType)) {
                return typeBean.getPreviewProviderName();
            }
        }
        return null;
    }
463282
public function visitResourceType(ResourceType $type)
    {
        $difference = $this->comparePrimaryType($type);

        if (0 !== $difference) {
            return $difference;
        }

        return $this->compareAttribute($this->type->ofType(), $type->ofType());
    }
1264183
public void setResourceTypes(java.util.Collection<String> resourceTypes) {
        if (resourceTypes == null) {
            this.resourceTypes = null;
            return;
        }

        this.resourceTypes = new java.util.ArrayList<String>(resourceTypes);
    }
6326
public Map<PoolInfo, Long> getTypePoolInfoAveFirstWaitMs(ResourceType type) {
    Map<PoolInfo, WaitCount> poolInfoWaitCount =
        new HashMap<PoolInfo, WaitCount>();
    for (Session session : sessions.values()) {
      synchronized (session) {
        if (!session.isDeleted()) {
          Long wait = session.getTypeFirstWaitMs(type);
          if (wait == null) {
            continue;
          }

          WaitCount waitCount = poolInfoWaitCount.get(session.getPoolInfo());
          if (waitCount == null) {
            poolInfoWaitCount.put(session.getPoolInfo(),
                                  new WaitCount(wait));
          } else {
            waitCount.addWaitMsecs(wait);
          }
        }
      }
    }
    Map<PoolInfo, Long> poolInfoWaitMs =
        new HashMap<PoolInfo, Long>(poolInfoWaitCount.size());
    for (Map.Entry<PoolInfo, WaitCount> entry : poolInfoWaitCount.entrySet()) {
      poolInfoWaitMs.put(entry.getKey(), entry.getValue().getAverageWait());
    }
    return poolInfoWaitMs;
  }
1271092
private ResourceType getResourceType(String resourceTag) {
        if (resourceTag == null || !resourceTag.endsWith("-resource")) {
            return ResourceType.unknown;
        }

        try {
            return ResourceType.valueOf(resourceTag.substring(0, resourceTag.length() - 9));
        } catch (Exception e) {
            return ResourceType.unknown;
        }
    }
1128589
public static boolean isResourcesOfResource(JavaType type) {

		return
			CollectionModel.class.isAssignableFrom(type.getRawClass())
			&&
			EntityModel.class.isAssignableFrom(type.containedType(0).getRawClass());
	}
863683
public ResourceRequestInfo getPendingRequestOnHost(
    String host, ResourceType type) {
    Context c = getContext(type);
    List<ResourceRequestInfo> hostReqs = c.hostToPendingRequests.get(host);
    if (hostReqs != null) {
      // Returning the first element in the list makes the subsequent
      // call to Utilities.removeReference() very fast.
      return hostReqs.get(0);
    }
    return null;
  }