Initializes the body element name of the editor.<p>

This has to be called after the element language has been set with setParamBodylanguage().<p>

@param elementName the name of the element to initialize or null, if default element should be used
547871
protected void initBodyElementName(String elementName) {

        if ((elementName == null)
            || (m_page.hasValue(elementName, getElementLocale())
                && !m_page.isEnabled(elementName, getElementLocale()))) {
            // elementName not specified or given element is disabled, determine default element
            List<String> allElements = m_page.getNames(getElementLocale());
            int elementCount = allElements.size();
            List<String> elements = new ArrayList<String>(elementCount);
            for (int i = 0; i < elementCount; i++) {
                // filter disabled elements
                if (m_page.isEnabled(allElements.get(i), getElementLocale())) {
                    elements.add(allElements.get(i));
                }
            }

            // get the active page elements
            List<CmsDialogElement> elementList = getElementList();
            for (int i = 0; i < elementList.size(); i++) {
                CmsDialogElement checkElement = elementList.get(i);
                if (elements.contains(checkElement.getName())) {
                    // get the first active element from the element list
                    setParamElementname(checkElement.getName());
                    return;
                }
            }

            // no matching active element found
            if (elements.contains(CmsDefaultPageEditor.XML_BODY_ELEMENT)) {
                // default legacy element present, use it
                setParamElementname(CmsDefaultPageEditor.XML_BODY_ELEMENT);
            } else {
                // use the first element from the element list
                setParamElementname(elements.get(0));
            }
        } else {
            // elementName specified and element is enabled or not present, set to elementName
            setParamElementname(elementName);
        }
    }
954751
private void init(AnnotatedElement element) {
		Annotation[] declaredAnnotations = element.getDeclaredAnnotations();
		this.declaredAnnotationMap = new HashMap<>();
		parseDeclared(declaredAnnotations);
		
		Annotation[] annotations = element.getAnnotations();
		if(declaredAnnotations == annotations) {
			this.annotationMap = this.declaredAnnotationMap;
		}else {
			this.annotationMap = new HashMap<>();
			parse(annotations);
		}
	}
1316802
private void initialize(final Element element) {

		String _id = getAttribute(element, "rdf:about");
		if (_id != null) {

			setId(_id);
		}

		initializeRDFSLabels(element.getElementsByTagName("rdfs:label"));

		internalName = getValue(getFirstElement(getElement(), "krdf:internalName"));

		// detect inheritance
		for (final String inheritanceIdentifier : getInheritanceIdentifiers()) {

			initializeSuperclass(element.getElementsByTagName(inheritanceIdentifier));

			if (superclassId != null) {
				break;
			}
		}

		// extract and parse creation and modification dates
		createdAt  = getValue(getFirstElement(getElement(), "createdAt"));
		modifiedAt = getValue(getFirstElement(getElement(), "modifiedAt"));

		rdfReferenceId = getAttribute(getElement(), "rdf:ID");

	}
17752
protected void addNestedFormatter(String elementName, CmsXmlContentDefinition contentDefinition)
    throws CmsXmlException {

        if (contentDefinition.getSchemaType(elementName) == null) {
            throw new CmsXmlException(
                Messages.get().container(Messages.ERR_XMLCONTENT_INVALID_ELEM_MAPPING_1, elementName));
        }
        m_nestedFormatterElements.add(elementName);
    }
1031045
@SuppressWarnings("unchecked")
    private void initialize(Document document, String editorUri) {

        m_parameters.clear();

        // get the root element of the configuration
        Element rootElement = document.getRootElement();

        // set the label of the editor
        setEditorLabel(rootElement.elementText(N_LABEL));

        // set the widget editor class if available
        String widgetClass = rootElement.elementText(N_WIDGETEDITOR);
        if (CmsStringUtil.isNotEmpty(widgetClass)) {
            setWidgetEditor(widgetClass);
        }

        // set the URI of the editor
        setEditorUri(editorUri);

        // create the map of valid resource types
        Iterator<Element> i = rootElement.element(N_RESOURCETYPES).elementIterator(N_TYPE);
        Map<String, String[]> resTypes = new HashMap<String, String[]>();
        while (i.hasNext()) {
            Element currentType = i.next();
            float ranking;
            String name = currentType.elementText(N_NAME);
            if (CmsStringUtil.isEmpty(name)) {
                logConfigurationError(Messages.get().getBundle().key(Messages.ERR_INVALID_RESTYPE_NAME_0), null);
                continue;
            }
            try {
                ranking = Float.parseFloat(currentType.elementText(N_RANKING));
            } catch (Throwable t) {
                logConfigurationError(Messages.get().getBundle().key(Messages.ERR_INVALID_RESTYPE_RANKING_1, name), t);
                continue;
            }
            String mapTo = currentType.elementText(N_MAPTO);
            if (CmsStringUtil.isEmpty(mapTo)) {
                mapTo = null;
            }
            resTypes.put(name, new String[] {"" + ranking, mapTo});
        }
        // add the additional resource types
        i = rootElement.element(N_RESOURCETYPES).elementIterator(N_CLASS);
        while (i.hasNext()) {
            Element currentClass = i.next();
            String name = currentClass.elementText(N_NAME);
            List<String> assignedTypes = new ArrayList<String>();
            try {
                // get the editor type matcher class
                I_CmsEditorTypeMatcher matcher = (I_CmsEditorTypeMatcher)Class.forName(name).newInstance();
                assignedTypes = matcher.getAdditionalResourceTypes();
            } catch (Throwable t) {
                logConfigurationError(Messages.get().getBundle().key(Messages.ERR_INVALID_RESTYPE_CLASS_1, name), t);
                continue;
            }
            float ranking;
            try {
                ranking = Float.parseFloat(currentClass.elementText(N_RANKING));
            } catch (Throwable t) {
                logConfigurationError(Messages.get().getBundle().key(Messages.ERR_INVALID_RESTYPE_RANKING_1, name), t);
                continue;
            }
            String mapTo = currentClass.elementText(N_MAPTO);
            if ("".equals(mapTo)) {
                mapTo = null;
            }
            // now loop through all types found and add them
            Iterator<String> j = assignedTypes.iterator();
            while (j.hasNext()) {
                String typeName = j.next();
                resTypes.put(typeName, new String[] {"" + ranking, mapTo});
            }
        }

        setResourceTypes(resTypes);

        // create the list of user agents & compiled patterns for editor
        i = document.getRootElement().element(N_USERAGENTS).elementIterator(N_AGENT);
        List<Pattern> pattern = new ArrayList<Pattern>();
        List<String> userAgents = new ArrayList<String>();
        while (i.hasNext()) {
            Element currentAgent = i.next();
            String agentName = currentAgent.getText();
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(agentName)) {
                userAgents.add(agentName);
                try {
                    pattern.add(Pattern.compile(agentName));
                } catch (PatternSyntaxException e) {
                    logConfigurationError(
                        Messages.get().getBundle().key(Messages.ERR_COMPILE_EDITOR_REGEX_1, agentName),
                        e);
                }
            } else {
                logConfigurationError(Messages.get().getBundle().key(Messages.ERR_INVALID_USERAGENT_DEF_0), null);
            }
        }
        setBrowserPattern(pattern);
        setUserAgentsRegEx(userAgents);

        Element paramsElement = (Element)(document.getRootElement().selectSingleNode(N_PARAMS));
        if (paramsElement != null) {
            List<?> params = paramsElement.selectNodes(N_PARAM);
            for (Object paramObj : params) {
                Element paramElement = (Element)paramObj;
                String name = paramElement.attributeValue(A_NAME);
                String value = paramElement.getText();
                m_parameters.put(name, value);
            }
        }
    }
714014
public void add(IRenderingElement element) {
        if (element != null) {
            if (element.getClass().equals(ElementGroup.class))
                elements.addAll(((ElementGroup) element).elements);
            else
                elements.add(element);
        }
    }
1356687
public final void setCharsetName(String charsetName) {
		if (!Charset.isSupported(charsetName))
			throw new IllegalArgumentException(
					"The specified charset [" + charsetName + "] is not supported by the jvm.");
		this.charsetName = charsetName;
	}
1256529
function(element, options) {
        var that = this;
        that.name = NAME;
        that.$ = $(element);

        options = that.options = $.extend({}, $ComponentName$.DEFAULTS, this.$.data(), options);

        // Initialize here
    }
1255164
private void addToCreateElements(String elementName) {
        HashMap<String, String> elementAttributes = new HashMap<>();

        elementAttributes.put(XsdAbstractElement.NAME_TAG, elementName);

        if (!createdElements.containsKey(getCleanName(elementName))){
            createdElements.put(getCleanName(elementName), new XsdElement(null, elementAttributes));
        }
    }
350843
public void assignName(XAttributable element, String name) {
		if (name != null && name.trim().length() > 0) {
			XAttributeLiteral attr = (XAttributeLiteral) ATTR_NAME.clone();
			attr.setValue(name);
			element.getAttributes().put(KEY_NAME, attr);
		}
	}
504313
@Override
	public void setName(String name) {
		if (name == null) {
			super.setName(getFirstFreeBushaltName(getContainer()));
		} else {
			super.setName(name);
		}
	}
178083
private void setBindingName() // d681743
    throws InjectionException
    {
        Map<String, String> ejbRefBindings = ivNameSpaceConfig.getEJBRefBindings();
        if (ejbRefBindings != null)
        {
            ivBindingName = ejbRefBindings.get(getJndiName());

            if (ivBindingName != null && ivBindingName.equals(""))
            {
                ivBindingName = null;
                Tr.warning(tc, "EJB_BOUND_TO_EMPTY_STRING_CWNEN0025W");
                if (isValidationFailable()) // fail if enabled       F743-14449
                {
                    InjectionConfigurationException icex = new InjectionConfigurationException
                                    ("The " + getJndiName() + " EJB reference in the " + ivModule +
                                     " module of the " + ivApplication + " application has been" +
                                     " bound to the empty string in the global Java Naming and Directory Interface (JNDI) namespace.");
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                        Tr.exit(tc, "resolve : " + icex);
                    throw icex;
                }
            }
        }
    }
266069
public void setName(String name) {
		if (name == null || name.isEmpty()) {
			throw new IllegalContextNameException(
					IllegalContextNameException.Reason.EMPTY_NAME,
					"The context name must not be null nor empty.");
		}

		this.name = name;
	}
29048
public void setName(String name)
    {
        super.setName(name);
        for (int i = this.getComponentCount() - 1; i >= 0; i--)
        {
            JComponent component = (JComponent)this.getComponent(i);
            component.setName(name);
        }
    }
446948
public void setName(final String newName) {
        String oldName = this.name;
        this.name = newName;
        propertySupport.firePropertyChange("name", oldName, this.name);
    }
1190893
public void setElementView(String elementView) {

        m_elementView = elementView;
        if (LOG.isDebugEnabled()) {
            LOG.debug("Setting element view to " + elementView);

        }
    }
134320
protected void initEditHandler(Element handlerElement) {

        String editHandlerClass = handlerElement.attributeValue(APPINFO_ATTR_CLASS);
        Map<String, String> params = Maps.newHashMap();
        Element paramsElement = handlerElement.element(APPINFO_PARAMETERS);
        if (paramsElement != null) {
            for (Element paramElement : paramsElement.elements(APPINFO_PARAM)) {
                String name = paramElement.attributeValue(APPINFO_ATTR_NAME);
                String value = paramElement.getText();
                params.put(name, value);
            }
        }
        try {
            m_editHandler = (I_CmsEditHandler)Class.forName(editHandlerClass).newInstance();
            m_editHandler.setParameters(params);
        } catch (Exception e) {
            LOG.error(e.getMessage(), e);
        }
    }