Adds the base CMIS property definitions common to folders and documents.<p>

@param type the type definition to which the property definitions should be added
178345
private static void addBasePropertyDefinitions(AbstractTypeDefinition type) {

        type.addPropertyDefinition(
            createPropDef(
                PropertyIds.BASE_TYPE_ID,
                "Base Type Id",
                "Base Type Id",
                PropertyType.ID,
                Cardinality.SINGLE,
                Updatability.READONLY,
                false,
                false));

        type.addPropertyDefinition(
            createPropDef(
                PropertyIds.OBJECT_ID,
                "Object Id",
                "Object Id",
                PropertyType.ID,
                Cardinality.SINGLE,
                Updatability.READONLY,
                false,
                false));

        type.addPropertyDefinition(
            createPropDef(
                PropertyIds.OBJECT_TYPE_ID,
                "Type Id",
                "Type Id",
                PropertyType.ID,
                Cardinality.SINGLE,
                Updatability.ONCREATE,
                false,
                true));

        type.addPropertyDefinition(
            createPropDef(
                PropertyIds.NAME,
                "Name",
                "Name",
                PropertyType.STRING,
                Cardinality.SINGLE,
                Updatability.READWRITE,
                false,
                true));

        type.addPropertyDefinition(
            queryableAndOrderable(
                createPropDef(
                    PropertyIds.CREATED_BY,
                    "Created By",
                    "Created By",
                    PropertyType.STRING,
                    Cardinality.SINGLE,
                    Updatability.READONLY,
                    false,
                    false)));

        type.addPropertyDefinition(
            queryableAndOrderable(
                createPropDef(
                    PropertyIds.CREATION_DATE,
                    "Creation Date",
                    "Creation Date",
                    PropertyType.DATETIME,
                    Cardinality.SINGLE,
                    Updatability.READONLY,
                    false,
                    false)));

        type.addPropertyDefinition(
            queryableAndOrderable(
                createPropDef(
                    PropertyIds.LAST_MODIFIED_BY,
                    "Last Modified By",
                    "Last Modified By",
                    PropertyType.STRING,
                    Cardinality.SINGLE,
                    Updatability.READONLY,
                    false,
                    false)));

        type.addPropertyDefinition(
            queryableAndOrderable(
                createPropDef(
                    PropertyIds.LAST_MODIFICATION_DATE,
                    "Last Modification Date",
                    "Last Modification Date",
                    PropertyType.DATETIME,
                    Cardinality.SINGLE,
                    Updatability.READONLY,
                    false,
                    false)));

        type.addPropertyDefinition(
            createPropDef(
                PropertyIds.CHANGE_TOKEN,
                "Change Token",
                "Change Token",
                PropertyType.STRING,
                Cardinality.SINGLE,
                Updatability.READONLY,
                false,
                false));

    }
42717
public static void addPropertyBigInteger(
        CmsCmisTypeManager typeManager,
        PropertiesImpl props,
        String typeId,
        Set<String> filter,
        String id,
        BigInteger value) {

        if (!checkAddProperty(typeManager, props, typeId, filter, id)) {
            return;
        }

        props.addProperty(new PropertyIntegerImpl(id, value));
    }
1243590
private void addSettingsTypes(
        String entityType,
        Map<String, CmsType> types,
        Map<String, CmsXmlContentProperty> settingsConfig,
        List<I_CmsFormatterBean> nestedFormatters) {

        CmsType baseType = types.get(entityType);
        CmsType settingType = new CmsType(SETTING_TYPE_NAME);
        types.put(settingType.getId(), settingType);
        baseType.addAttribute(SETTINGS_CLIENT_ID_ATTRIBUTE, settingType, 1, 1);
        // add main settings first
        for (Entry<String, CmsXmlContentProperty> entry : settingsConfig.entrySet()) {
            boolean nested = false;
            if (nestedFormatters != null) {
                for (I_CmsFormatterBean formatter : nestedFormatters) {
                    if (entry.getKey().startsWith(formatter.getId())) {
                        nested = true;
                        break;
                    }
                }
            }
            if (!nested) {
                baseType.addAttribute(getSettingsAttributeName(entry.getKey()), settingType, 0, 1);
            }
        }
        // add nested formatter settings after
        for (Entry<String, CmsXmlContentProperty> entry : settingsConfig.entrySet()) {
            if (nestedFormatters != null) {
                for (I_CmsFormatterBean formatter : nestedFormatters) {
                    if (entry.getKey().startsWith(formatter.getId())
                        && !HIDDEN_SETTINGS_WIDGET_NAME.equals(entry.getValue().getWidget())) {
                        CmsType parent = types.get(formatter.getId());
                        if (parent == null) {
                            parent = new CmsType(formatter.getId());
                            types.put(parent.getId(), parent);
                            baseType.addAttribute(getSettingsAttributeName(formatter.getId()), parent, 1, 1);
                        }
                        parent.addAttribute(getSettingsAttributeName(entry.getKey()), settingType, 0, 1);
                        break;
                    }
                }
            }
        }
    }
938971
public void addScriptProperties(Content head) {
        HtmlTree javascript = HtmlTree.SCRIPT(pathToRoot.resolve(DocPaths.JAVASCRIPT).getPath());
        head.addContent(javascript);
        if (configuration.createindex) {
            if (pathToRoot != null && script != null) {
                String ptrPath = pathToRoot.isEmpty() ? "." : pathToRoot.getPath();
                script.addContent(new RawHtml("var pathtoroot = \"" + ptrPath + "/\";loadScripts(document, \'script\');"));
            }
            addJQueryFile(head, DocPaths.JSZIP_MIN);
            addJQueryFile(head, DocPaths.JSZIPUTILS_MIN);
            head.addContent(new RawHtml("<!--[if IE]>"));
            addJQueryFile(head, DocPaths.JSZIPUTILS_IE_MIN);
            head.addContent(new RawHtml("<![endif]-->"));
            addJQueryFile(head, DocPaths.JQUERY_JS_1_10);
            addJQueryFile(head, DocPaths.JQUERY_JS);
        }
    }
32909
private void addProperties(final PropertyDescriptor[] _properties) throws ColumnBuilderException, ClassNotFoundException {
        for (final PropertyDescriptor property : _properties) {
            if (isValidProperty(property)) {
                addColumn(getColumnTitle(property), property.getName(), property.getPropertyType().getName(), getColumnWidth(property));
            }
        }
        setUseFullPageWidth(true);
    }
1096729
protected void addType(final Long _typeId)
    {
        if (!this.types.contains(_typeId)) {
            this.types.add(_typeId);
            setDirty();
        }
    }
759968
private MutableSecondaryTypeDefinition getSecondaryTypeDefinition(final String typeId, final boolean includePropertyDefinitions, final boolean baseType) {

		final TypeDefinitionFactory factory      = TypeDefinitionFactory.newInstance();
		final MutableSecondaryTypeDefinition def = factory.createSecondaryTypeDefinition(CmisVersion.CMIS_1_1, baseType ? null : BaseTypeId.CMIS_SECONDARY.value());

		def.setIsCreatable(false);

		initializeExtendedType(def, typeId);

		if (!includePropertyDefinitions) {
			def.removeAllPropertyDefinitions();
		}

		return def;
	}
1320575
private void addFoldersToSearchIn(final List<String> folders) {

        if (null == folders) {
            return;
        }

        for (String folder : folders) {
            if (!CmsResource.isFolder(folder)) {
                folder += "/";
            }

            m_foldersToSearchIn.add(folder);
        }
    }
794221
public void addRelationToResource(String resourceName, String targetPath, String type) throws CmsException {

        createRelation(resourceName, targetPath, type, false);
    }
227722
public void addDefaultProperty(CmsProperty property) throws CmsConfigurationException {

        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_ADD_DFLT_PROP_2, this, property));
        }

        if (m_frozen) {
            // configuration already frozen
            throw new CmsConfigurationException(
                Messages.get().container(
                    Messages.ERR_CONFIG_FROZEN_3,
                    this.getClass().getName(),
                    getTypeName(),
                    new Integer(getTypeId())));
        }

        m_defaultProperties.add(property);
    }
804593
private Document cmisFolder( CmisObject cmisObject ) {
        Folder folder = (Folder)cmisObject;
        DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.OBJECT, folder.getId()));

        ObjectType objectType = cmisObject.getType();
        if (objectType.isBaseType()) {
            writer.setPrimaryType(NodeType.NT_FOLDER);
        } else {
            writer.setPrimaryType(objectType.getId());
        }

        writer.setParent(folder.getParentId());
        writer.addMixinType(NodeType.MIX_REFERENCEABLE);
        writer.addMixinType(NodeType.MIX_LAST_MODIFIED);

        cmisProperties(folder, writer);
        cmisChildren(folder, writer);

        writer.addMixinType("mode:accessControllable");
        writer.addChild(ObjectId.toString(ObjectId.Type.ACL, folder.getId()), "mode:acl");
        
        // append repository information to the root node
        if (folder.isRootFolder()) {
            writer.addChild(ObjectId.toString(ObjectId.Type.REPOSITORY_INFO, ""), REPOSITORY_INFO_NODE_NAME);
        }
        return writer.document();
    }
86080
public static void addNewMapping(final Class<?> type, final String property, final String mapping) {
        allowedColmns.computeIfAbsent(type, k -> new HashMap<>());
        allowedColmns.get(type).put(property, mapping);
    }
848711
@SuppressWarnings("deprecation")
    private void adjustFolderType(CmsResource siteRootResource) throws CmsLoaderException, CmsException {

        if (OpenCms.getResourceManager().getResourceType(
            CmsResourceTypeFolder.RESOURCE_TYPE_NAME) == OpenCms.getResourceManager().getResourceType(
                siteRootResource)) {

            siteRootResource.setType(
                OpenCms.getResourceManager().getResourceType(
                    CmsResourceTypeFolderSubSitemap.TYPE_SUBSITEMAP).getTypeId());
            m_cms.writeResource(siteRootResource);
        }
    }
94591
public void add(CmsAccessControlEntry entry) {

        CmsPermissionSetCustom p = m_permissions.get(entry.getPrincipal());
        if (p == null) {
            p = new CmsPermissionSetCustom();
            m_permissions.put(entry.getPrincipal(), p);
        }
        p.addPermissions(entry.getPermissions());
    }
592186
public void setType(String type) {
	property.setType(type);
	setDynamicAttribute(null, KeyConstants._type, type);
    }
963297
void addContentDefinition(CmsContentDefinition definition) {

        m_definitions.put(definition.getLocale(), definition);
        m_contentLocales.add(definition.getLocale());
    }
675806
private void init(Window window, CmsResourceTypeApp app) {

        CmsObject rootCms = null;
        try {
            m_cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
            rootCms = OpenCms.initCmsObject(m_cms);
            rootCms.getRequestContext().setSiteRoot("");
        } catch (CmsException e1) {
            m_cms = A_CmsUI.getCmsObject();
            rootCms = m_cms;
        }
        CmsVaadinUtils.readAndLocalizeDesign(this, CmsVaadinUtils.getWpMessagesForCurrentLocale(), null);

        m_typeID.addValidator(new IDValidator());
        m_typeShortName.addValidator(new NameValidator());

        m_parentSchema.setCmsObject(rootCms);
        m_parentFormatter.setCmsObject(rootCms);
        m_bundle.setCmsObject(rootCms);
        m_config.setCmsObject(rootCms);

        m_parentSchema.setRequired(true);
        m_parentFormatter.setRequired(true);
        m_typeID.setRequired(true);
        m_typeDescription.setRequired(true);
        m_typeShortName.setRequired(true);
        m_typeXPathName.setRequired(true);
        m_bundle.setRequired(true);

        m_typeName.setRequired(true);

        m_parentSchema.setRequiredError(CmsVaadinUtils.getMessageText(Messages.GUI_RESOURCETYPE_EDIT_NOT_EMPTY_0));
        m_parentFormatter.setRequiredError(CmsVaadinUtils.getMessageText(Messages.GUI_RESOURCETYPE_EDIT_NOT_EMPTY_0));
        m_typeID.setRequiredError(CmsVaadinUtils.getMessageText(Messages.GUI_RESOURCETYPE_EDIT_NOT_EMPTY_0));
        m_typeDescription.setRequiredError(CmsVaadinUtils.getMessageText(Messages.GUI_RESOURCETYPE_EDIT_NOT_EMPTY_0));
        m_typeShortName.setRequiredError(CmsVaadinUtils.getMessageText(Messages.GUI_RESOURCETYPE_EDIT_NOT_EMPTY_0));
        m_typeXPathName.setRequiredError(CmsVaadinUtils.getMessageText(Messages.GUI_RESOURCETYPE_EDIT_NOT_EMPTY_0));
        m_bundle.setRequiredError(CmsVaadinUtils.getMessageText(Messages.GUI_RESOURCETYPE_EDIT_NOT_EMPTY_0));

        m_typeName.setRequiredError(CmsVaadinUtils.getMessageText(Messages.GUI_RESOURCETYPE_EDIT_NOT_EMPTY_0));

        m_typeID.setValue(String.valueOf(getFreeId()));
        m_ok.addClickListener(e -> submit(window, app));
        m_cancel.addClickListener(e -> window.close());

    }