Search in sources :

Example 61 with Context

use of com.enonic.xp.context.Context in project xp by enonic.

the class ContentAuditLogSupportImpl method delete.

@Override
public void delete(final DeleteContentParams params, final DeleteContentsResult contents) {
    final Context context = ContextBuilder.copyOf(ContextAccessor.current()).build();
    executor.execute(() -> doDelete(params, contents, context));
}
Also used : Context(com.enonic.xp.context.Context)

Example 62 with Context

use of com.enonic.xp.context.Context in project xp by enonic.

the class ContentAuditLogSupportImpl method update.

@Override
public void update(final UpdateMediaParams params, final Content content) {
    final Context context = ContextBuilder.copyOf(ContextAccessor.current()).build();
    executor.execute(() -> doUpdate(params, content, context));
}
Also used : Context(com.enonic.xp.context.Context)

Example 63 with Context

use of com.enonic.xp.context.Context in project xp by enonic.

the class ContentAuditLogSupportImpl method reorderChildren.

@Override
public void reorderChildren(final ReorderChildContentsParams params, final ReorderChildContentsResult result) {
    final Context context = ContextBuilder.copyOf(ContextAccessor.current()).build();
    executor.execute(() -> doReorderChildren(params, result, context));
}
Also used : Context(com.enonic.xp.context.Context)

Example 64 with Context

use of com.enonic.xp.context.Context in project xp by enonic.

the class ContentAuditLogSupportImpl method createContent.

@Override
public void createContent(final CreateContentParams params, final Content content) {
    final Context context = ContextBuilder.copyOf(ContextAccessor.current()).build();
    executor.execute(() -> doCreateContent(params, content, context));
}
Also used : Context(com.enonic.xp.context.Context)

Example 65 with Context

use of com.enonic.xp.context.Context in project xp by enonic.

the class ContentAuditLogSupportImpl method rename.

@Override
public void rename(final RenameContentParams params, final Content content) {
    final Context context = ContextBuilder.copyOf(ContextAccessor.current()).build();
    executor.execute(() -> doRename(params, content, context));
}
Also used : Context(com.enonic.xp.context.Context)

Aggregations

Context (com.enonic.xp.context.Context)101 Test (org.junit.jupiter.api.Test)35 AuthenticationInfo (com.enonic.xp.security.auth.AuthenticationInfo)21 Node (com.enonic.xp.node.Node)16 InternalContext (com.enonic.xp.repo.impl.InternalContext)16 User (com.enonic.xp.security.User)13 Content (com.enonic.xp.content.Content)11 PropertyTree (com.enonic.xp.data.PropertyTree)11 PrincipalKey (com.enonic.xp.security.PrincipalKey)10 Branch (com.enonic.xp.branch.Branch)9 AbstractNodeTest (com.enonic.xp.repo.impl.node.AbstractNodeTest)9 ContextAccessor (com.enonic.xp.context.ContextAccessor)8 NodePath (com.enonic.xp.node.NodePath)8 ContextBuilder (com.enonic.xp.context.ContextBuilder)7 ContentId (com.enonic.xp.content.ContentId)6 CreateNodeParams (com.enonic.xp.node.CreateNodeParams)6 Repository (com.enonic.xp.repository.Repository)6 LogAuditLogParams (com.enonic.xp.audit.LogAuditLogParams)5 ProcessUpdateParams (com.enonic.xp.content.processor.ProcessUpdateParams)5 NodeComparison (com.enonic.xp.node.NodeComparison)5