Registers a Custom Resource Definition Kind
973238
public static void registerCustomKind(String apiVersion, String kind, Class<? extends KubernetesResource> clazz) {
        MAP.put(getKey(apiVersion, kind), clazz);
    }
948148
def register(cls, key, filename):
        """"""

        if key in cls._stock:
            logger.info('Warning, replacing resource ' + str(key))
        cls._stock[key] = {'type': 'custom', 'filename': filename}
        logger.info('%s registered as %s' % (filename, key))
425721
public void registerType(String typeName, Class<?> clazz) {
        typeToName.put(typeName.toLowerCase(), clazz);
    }
1254338
def resource_type(self, rt):
        
        if not isinstance(rt, str):
            rt = str(rt)
        self._attributes["rt"] = rt
376678
def instantiate(params)
      instance = Instance.new( *interpolate(params), @parent )
      instance.apply_resource_type
      instance
    end
1191322
public static void registerResource(final InternalResource resource) {
		String resourceName = resource.getResourceName();

		if (!RESOURCES.containsKey(resourceName)) {
			RESOURCES.put(resourceName, resource);
			RESOURCE_CACHE_KEYS.put(resourceName, computeHash(resource));
		}
	}
810132
def add_resource(type, rsrc, name = nil)
            if name.nil?
                rsrc_name = self.resources(type).key(rsrc)
                return rsrc_name if rsrc_name
            end

            name ||= new_id(type)
            target = self.is_a?(Resources) ? self : (self.Resources ||= Resources.new)

            rsrc_dict = (target[type] and target[type].solve) || (target[type] = Dictionary.new)
            rsrc_dict[name.to_sym] = rsrc

            name
        end
553193
def insert(self, context):
	
		
		
		status_code, msg = self.__endpoint.post(
			"/resources/custom-resource",
			data={
				"id": self.__name,
				"restype": self.__restype,
				"factoryclass": self.__factclass,
				"property": props_value(self.__props)
			}
		)
		self.__available = True
1076321
public void registerContentDefinition(CmsContentDefinition definition) {

        getWidgetService().addConfigurations(definition.getConfigurations());
        CmsType baseType = definition.getTypes().get(definition.getEntityTypeName());
        m_entityBackend.registerTypes(baseType, definition.getTypes());
        for (CmsEntity entity : definition.getEntities().values()) {
            CmsEntity previousValue = m_entityBackend.getEntity(entity.getId());
            if (previousValue != null) {
                m_entityBackend.changeEntityContentValues(previousValue, entity);
            } else {
                m_entityBackend.registerEntity(entity);
                m_registeredEntities.add(entity.getId());
            }
        }
        for (Map.Entry<String, CmsComplexWidgetData> entry : definition.getComplexWidgetData().entrySet()) {
            String attrName = entry.getKey();
            CmsComplexWidgetData widgetData = entry.getValue();
            getWidgetService().registerComplexWidgetAttribute(
                attrName,
                widgetData.getRendererName(),
                widgetData.getConfiguration());
        }
    }
1017411
def register_type (type, suffixes, base_type = None, os = []):
    
    assert isinstance(type, basestring)
    assert is_iterable_typed(suffixes, basestring)
    assert isinstance(base_type, basestring) or base_type is None
    assert is_iterable_typed(os, basestring)
    if registered (type):
        return

    if not os or os_name () in os:
        register (type, suffixes, base_type)
432239
def register(self, provider):
        ''''''
        if isinstance(provider,type):
            provider = provider()
        self[provider.code] = provider
479966
private void setupResourceType() {

        IndexedContainer resTypes = CmsVaadinUtils.getResourceTypesContainer();
        resTypes.addContainerFilter(CmsVaadinUtils.FILTER_NO_FOLDERS);
        m_resType.setContainerDataSource(resTypes);
        m_resType.setItemCaptionPropertyId(PropertyId.caption);
        m_resType.setItemIconPropertyId(PropertyId.icon);
    }
1297264
public static void register(String type, String local, String alias) {
        instance.get(type).register(local, alias);
    }
531195
def register(resource, options = {}, &block)
      ns = options.fetch(:namespace) { default_namespace }
      namespace(ns).register resource, options, &block
    end
101966
private void doCreateResource(Request request) throws ResourceAlreadyExistsException {
        typeSystem.createEntity(resourceDefinition, request);
        taxonomyAutoInitializationChecked = true;
    }
245950
def resource_type_type(loader):
    

    def impl(string):
        t_resources = loader.get_models('common.models#ResourceTypes')
        if set(string) - set("sco"):
            raise ValueError
        return t_resources(_str=''.join(set(string)))

    return impl
220221
def register_quantity(quantity, name):
    """"""
    x = TypeDefinition(name, (quantity.__class__,), ())
    Validator.types_mapping[name] = x