Returns the condition definition for the given resource type that is triggered before opening the editor.<p>

@param resourceType the resource type

@return the condition definition for the given resource type class name or null if none is found
979616
public I_CmsPreEditorActionDefinition getPreEditorConditionDefinition(I_CmsResourceType resourceType) {

        Iterator<I_CmsPreEditorActionDefinition> i = m_preEditorConditionDefinitions.iterator();
        I_CmsPreEditorActionDefinition result = null;
        int matchResult = -1;
        while (i.hasNext()) {
            I_CmsPreEditorActionDefinition currentDefinition = i.next();
            if (resourceType.getClass().isInstance(currentDefinition.getResourceType())) {
                // now determine the match count...
                int matchDistance = 0;
                Class<?> superClass = resourceType.getClass();
                while (true) {
                    // check if a super class is present
                    if (superClass == null) {
                        break;
                    }
                    if (superClass.getName().equals(currentDefinition.getResourceType().getClass().getName())) {
                        break;
                    }
                    matchDistance += 1;
                    superClass = superClass.getSuperclass();
                }
                if (matchResult != -1) {
                    if (matchDistance < matchResult) {
                        matchResult = matchDistance;
                        result = currentDefinition;
                    }
                } else {
                    matchResult = matchDistance;
                    result = currentDefinition;
                }
            }
        }
        return result;
    }
1342060
public CloseableProvider<ResourceModelSource> getCloseableSourceForConfiguration(
        final String type,
        final Properties configuration
    ) throws ExecutionServiceException
    {
        return closeableProviderOfType(type).convert(factoryConverter(configuration));
    }
1224135
@SuppressWarnings("deprecation")
    CmsResourceInfo formatResourceType(I_CmsResourceType type) {

        CmsExplorerTypeSettings settings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(type.getTypeName());
        Resource icon;
        String title;
        String subtitle;
        if (settings != null) {
            icon = CmsResourceUtil.getBigIconResource(settings, null);
            title = CmsVaadinUtils.getMessageText(settings.getKey());
            if (title.startsWith("???")) {
                title = type.getTypeName();
            }
            subtitle = type.getTypeName()
                + " (ID: "
                + type.getTypeId()
                + (settings.getReference() != null ? (", " + settings.getReference()) : "")
                + ")";
        } else {
            icon = CmsResourceUtil.getBigIconResource(
                OpenCms.getWorkplaceManager().getExplorerTypeSetting("unknown"),
                null);
            title = type.getTypeName();
            subtitle = type.getTypeName() + " (ID: " + type.getTypeId() + ")";
        }
        CmsResourceInfo info = new CmsResourceInfo(title, subtitle, icon);
        return info;
    }
755157
public List<ResourceHandle> getChildrenByResourceType(final String resourceType) {
        final ArrayList<ResourceHandle> children = new ArrayList<>();
        if (this.isValid()) {
            for (final Resource child : this.resource.getChildren()) {
                ResourceHandle handle = ResourceHandle.use(child);
                if (handle.isResourceType(resourceType)) {
                    children.add(handle);
                }
            }
        }
        return children;
    }
425983
public int getAllocatedCpuForType(ResourceType type) {
    int total = 0;

    for (ClusterNode node: nameToNode.values()) {
      synchronized (node) {
        if (node.deleted) {
          continue;
        }
        total += node.getAllocatedCpuForType(type);
      }
    }
    return total;
  }
337168
public String getResourceType(Class<?> clazz) {
		RegistryEntry entry = getEntry(clazz, true);
		if (entry == null) {
			return null;
		}
		ResourceInformation resourceInformation = entry.getResourceInformation();
		if (resourceInformation == null) {
			return null;
		}
		return resourceInformation.getResourceType();
	}
976910
public void removeType(String resourceType) {

        m_searchObject.removeType(resourceType);
        m_searchObjectChanged = true;
        ValueChangeEvent.fire(this, m_searchObject);
    }
1128589
public static boolean isResourcesOfResource(JavaType type) {

		return
			CollectionModel.class.isAssignableFrom(type.getRawClass())
			&&
			EntityModel.class.isAssignableFrom(type.containedType(0).getRawClass());
	}
307066
public V get(ResourceType type, PoolInfo poolInfo) {
    Map<PoolInfo, V> poolInfoMap = typePoolInfoMap.get(type);
    if (poolInfoMap == null) {
      return null;
    }
    return poolInfoMap.get(poolInfo);
  }
435612
@Override
    public String getResourceId() {
        Preconditions.checkArgument(
                this.urlType == UrlType.RESOURCE,
                "UrlType must be %s but was %s",
                UrlType.RESOURCE,
                this.urlType);
        return this.resourceId;
    }
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;
	}
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();
    }
1176451
public static IndexedContainer getResourceTypesContainer() {

        IndexedContainer types = new IndexedContainer();
        types.addContainerProperty(PropertyId.caption, String.class, null);
        types.addContainerProperty(PropertyId.icon, Resource.class, null);
        types.addContainerProperty(PropertyId.isFolder, Boolean.class, null);
        types.addContainerProperty(PropertyId.isXmlContent, Boolean.class, null);
        for (I_CmsResourceType type : getResourceTypes()) {
            CmsExplorerTypeSettings typeSetting = OpenCms.getWorkplaceManager().getExplorerTypeSetting(
                type.getTypeName());
            Item typeItem = types.addItem(type);
            typeItem.getItemProperty(PropertyId.caption).setValue(CmsVaadinUtils.getMessageText(typeSetting.getKey()));
            typeItem.getItemProperty(PropertyId.icon).setValue(CmsResourceUtil.getSmallIconResource(typeSetting, null));
            typeItem.getItemProperty(PropertyId.isXmlContent).setValue(
                Boolean.valueOf(type instanceof CmsResourceTypeXmlContent));
            typeItem.getItemProperty(PropertyId.isFolder).setValue(
                Boolean.valueOf(type instanceof A_CmsResourceTypeFolderBase));
        }

        return types;
    }
1265767
protected Context getContext(ResourceType type) {
    Context c = typeToContext.get(type);
    if (c == null) {
      c = new Context();
      typeToContext.put(type, c);
    }
    return c;
  }
129507
public <T> T resolve(Class<T> resourceType, @Nullable String version) {
    Preconditions.checkArgument(hasEndpoint(), "Resource name must have an endpoint.");
    return resourceNameResolver.resolve(resourceType, this, version);
  }
357744
public static boolean existsEditor(CmsResource resource) {

        int plainId;
        try {
            plainId = OpenCms.getResourceManager().getResourceType(
                CmsResourceTypePlain.getStaticTypeName()).getTypeId();
        } catch (CmsLoaderException e) {
            // this should really never happen
            plainId = CmsResourceTypePlain.getStaticTypeId();
        }
        if ((CmsResourceTypeJsp.isJsp(resource))
            || (resource.getTypeId() == plainId)
            || CmsResourceTypeXmlPage.isXmlPage(resource)) {
            return true;
        }
        return false;
    }
376681
@com.fasterxml.jackson.annotation.JsonProperty("ResourceType")
    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }