Search in sources :

Example 56 with ContentType

use of com.enonic.xp.schema.content.ContentType in project xp by enonic.

the class HtmlAreaContentProcessor method processCreate.

@Override
public ProcessCreateResult processCreate(final ProcessCreateParams params) {
    final CreateContentParams createContentParams = params.getCreateContentParams();
    final ContentIds.Builder processedIds = ContentIds.create();
    final ContentType contentType = contentTypeService.getByName(GetContentTypeParams.from(createContentParams.getType()));
    processContentData(createContentParams.getData(), contentType, processedIds);
    processExtraData(createContentParams.getExtraDatas(), processedIds);
    return new ProcessCreateResult(CreateContentParams.create(createContentParams).addProcessedIds(processedIds.build()).build());
}
Also used : ContentType(com.enonic.xp.schema.content.ContentType) CreateContentParams(com.enonic.xp.content.CreateContentParams) ContentIds(com.enonic.xp.content.ContentIds) ProcessCreateResult(com.enonic.xp.content.processor.ProcessCreateResult)

Aggregations

ContentType (com.enonic.xp.schema.content.ContentType)56 Test (org.junit.jupiter.api.Test)35 GetContentTypeParams (com.enonic.xp.schema.content.GetContentTypeParams)28 Content (com.enonic.xp.content.Content)12 CreateContentParams (com.enonic.xp.content.CreateContentParams)10 ValidationErrors (com.enonic.xp.content.ValidationErrors)9 Form (com.enonic.xp.form.Form)8 PropertyTree (com.enonic.xp.data.PropertyTree)7 Input (com.enonic.xp.form.Input)7 FormItem (com.enonic.xp.form.FormItem)6 FieldSet (com.enonic.xp.form.FieldSet)5 FormItemSet (com.enonic.xp.form.FormItemSet)5 ContentTypes (com.enonic.xp.schema.content.ContentTypes)5 AbstractSchemaTest (com.enonic.xp.core.impl.schema.AbstractSchemaTest)4 EditableSite (com.enonic.xp.content.EditableSite)3 PropertySet (com.enonic.xp.data.PropertySet)3 FormOptionSet (com.enonic.xp.form.FormOptionSet)3 FormOptionSetOption (com.enonic.xp.form.FormOptionSetOption)3 XData (com.enonic.xp.schema.xdata.XData)3 ApplicationKey (com.enonic.xp.app.ApplicationKey)2