Search in sources :

Example 81 with CreateContentParams

use of com.enonic.xp.content.CreateContentParams 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

CreateContentParams (com.enonic.xp.content.CreateContentParams)81 Test (org.junit.jupiter.api.Test)66 PropertyTree (com.enonic.xp.data.PropertyTree)63 Content (com.enonic.xp.content.Content)52 GetContentTypeParams (com.enonic.xp.schema.content.GetContentTypeParams)25 PropertySet (com.enonic.xp.data.PropertySet)14 UpdateContentParams (com.enonic.xp.content.UpdateContentParams)11 ContentType (com.enonic.xp.schema.content.ContentType)10 LogAuditLogParams (com.enonic.xp.audit.LogAuditLogParams)9 DeleteContentsResult (com.enonic.xp.content.DeleteContentsResult)9 PublishContentResult (com.enonic.xp.content.PublishContentResult)7 ProcessCreateResult (com.enonic.xp.content.processor.ProcessCreateResult)7 CreateAttachments (com.enonic.xp.attachment.CreateAttachments)6 ExtraData (com.enonic.xp.content.ExtraData)6 ProcessCreateParams (com.enonic.xp.content.processor.ProcessCreateParams)6 Attachments (com.enonic.xp.attachment.Attachments)5 Node (com.enonic.xp.node.Node)5 ByteSource (com.google.common.io.ByteSource)5 CreateAttachment (com.enonic.xp.attachment.CreateAttachment)4 ExtraDatas (com.enonic.xp.content.ExtraDatas)4