Returns the mapping for the given resource type.<p>

@param resourceType the resource type name to check
@return the mapping or null, if no mapping is specified
487059
public String getMappingForResourceType(String resourceType) {

        String[] resourceTypeParams = getResourceTypes().get(resourceType);
        if (resourceTypeParams == null) {
            return null;
        } else {
            return resourceTypeParams[1];
        }
    }
504958
@Override
	@Description("Gets all of th resource types which have bound Component Bindings Providers")
	public String[] getLoadedResourceTypes() {
		Set<String> types = ((ComponentBindingsProviderFactoryImpl) componentBindingsProviderFactory)
				.getLoadedResourceTypes();
		return types.toArray(new String[types.size()]);
	}
607670
public <T extends Mapping> T getMapping(MappingType type)
    {
        return (T) mappings.get(type);
    }
45465
public static String getResourceType(Class<? extends BoxResource> clazz) {
        BoxResourceType resource = clazz.getAnnotation(BoxResourceType.class);
        if (resource == null) {
            throw new IllegalArgumentException("Provided BoxResource type does not have @BoxResourceType annotation.");
        }
        return resource.value();
    }
517878
public static Map<String, String> resourceType(String kind, Map<String, String> meta) {
        HashMap<String, String> authResource = new HashMap<String, String>();
        if (null != meta) {
            authResource.putAll(meta);
        }
        authResource.put(TYPE_FIELD, GENERIC_RESOURCE_TYPE_NAME);
        authResource.put(TYPE_KIND_FIELD, kind);
        return authResource;
    }
101244
public ResourceRepository<Resource, String> getRepositoryForPath(String resourceType) {
        init();

        ResourceInformation resourceInformation =
                new ResourceInformation(
                        moduleRegistry.getTypeParser()
                        , Resource.class
                        , resourceType
                        , null
                        , null
                        , PagingSpec.class
                );
        return (ResourceRepository<Resource, String>) decorate(new ResourceRepositoryStubImpl<>(this, Resource.class, resourceInformation, urlBuilder));
    }
372972
public float getRankingForResourceType(String resourceType) {

        String[] resourceTypeParams = getResourceTypes().get(resourceType);
        if (resourceTypeParams == null) {
            return -1.0f;
        } else {
            return Float.parseFloat(resourceTypeParams[0]);
        }
    }
348938
public JawrConfigManagerMBean getConfigMgr(String resourceType) {

		JawrConfigManagerMBean configMgr = null;
		if (resourceType.equals(JS_TYPE)) {
			configMgr = jsMBean;
		} else if (resourceType.equals(CSS_TYPE)) {
			configMgr = cssMBean;
		} else if (resourceType.equals(BINARY_TYPE)) {
			configMgr = binaryMBean;
		}

		return configMgr;
	}
1325880
private Map<String, CmsGalleryTypeInfo> readGalleryInfosByTypeBeans(List<CmsResourceTypeBean> resourceTypes) {

        Map<String, CmsGalleryTypeInfo> galleryTypeInfos = new HashMap<String, CmsGalleryTypeInfo>();
        for (CmsResourceTypeBean typeBean : resourceTypes) {
            try {
                if (!typeBean.isDeactivated()) {
                    addGalleriesForType(galleryTypeInfos, typeBean.getType());
                }
            } catch (CmsLoaderException e1) {
                logError(e1);
            }
        }
        return galleryTypeInfos;
    }
895750
@Override
   @SuppressWarnings("unchecked")
   public <E, T extends Resource<E>> T getChildOfType(final Class<T> type, final String name) throws ResourceException
   {
      T result;
      Resource<?> child = getChild(name);
      if (type.isAssignableFrom(child.getClass()))
      {
         result = (T) child;
      }
      else if (child.exists())
      {
         throw new ResourceException("Requested resource [" + name + "] was not of type [" + type.getName()
                  + "], but was instead [" + child.getClass().getName() + "]");
      }
      else
      {
         E underlyingResource = (E) child.getUnderlyingResourceObject();
         result = getResourceFactory().create(type, underlyingResource);
      }
      return result;
   }
1062841
private CmsPathMap<CmsResource> readPathMapForType(I_CmsResourceType type) {

        List<CmsResource> result = new ArrayList<CmsResource>();
        CmsResourceFilter filter = CmsResourceFilter.DEFAULT_FILES.addRequireType(type);
        try {
            List<CmsResource> siteFiles = m_guestCms.readResources(m_siteRoot, filter, true);
            result.addAll(siteFiles);
        } catch (CmsException e) {
            LOG.error("XML sitemap generator error: " + e.getLocalizedMessage(), e);
        }
        String shared = CmsFileUtil.removeTrailingSeparator(OpenCms.getSiteManager().getSharedFolder());
        if (shared != null) {
            try {
                List<CmsResource> sharedFiles = m_guestCms.readResources(shared, filter, true);
                result.addAll(sharedFiles);
            } catch (CmsException e) {
                LOG.error("XML sitemap generator error: " + e.getLocalizedMessage(), e);
            }
        }
        CmsPathMap<CmsResource> resultMap = new CmsPathMap<CmsResource>();
        for (CmsResource resource : result) {
            resultMap.add(resource.getRootPath(), resource);
        }
        return resultMap;
    }
422971
public void getNewElement(final String resourceType, final I_CmsSimpleCallback<CmsContainerElementData> callback) {

        CmsRpcAction<CmsContainerElementData> action = new CmsRpcAction<CmsContainerElementData>() {

            @Override
            public void execute() {

                getContainerpageService().getNewElementData(
                    getData().getRpcContext(),
                    getData().getDetailId(),
                    getRequestParams(),
                    resourceType,
                    getPageState(),
                    getLocale(),
                    this);
            }

            @Override
            protected void onResponse(CmsContainerElementData result) {

                m_elements.put(result.getClientId(), result);
                callback.execute(result);
            }
        };
        action.execute();
    }
827666
@Override
    public ICodeBaseEntry lookupResource(String resourceName) {
        if (!resourceName.equals(getResourceName())) {
            return null;
        }

        return new SingleFileCodeBaseEntry(this);
    }
809893
public void setResourceType(java.util.Collection<StringFilter> resourceType) {
        if (resourceType == null) {
            this.resourceType = null;
            return;
        }

        this.resourceType = new java.util.ArrayList<StringFilter>(resourceType);
    }
1264892
public void setResourceTypes(List<String> resourceTypes) {

        if ((resourceTypes != null) && !resourceTypes.isEmpty()) {
            addFilterQuery(CmsSearchField.FIELD_TYPE, resourceTypes, false, false);
        }
    }
1183969
public static List<Resource> getChildrenByResourceType(final Resource resource, String resourceType) {
        final ArrayList<Resource> children = new ArrayList<>();
        if (resource != null) {
            for (final Resource child : resource.getChildren()) {
                if (child.isResourceType(resourceType)) {
                    children.add(child);
                }
            }
        }
        return children;
    }
24100
public void incr(ResourceType resourceType) {
    Integer current = typeToCountMap.get(resourceType);
    if (current == null) {
      typeToCountMap.put(resourceType, new Integer(1));
    } else {
      typeToCountMap.put(resourceType, current + 1);
    }
  }