Search in sources :

Example 6 with Context

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

the class ContentAuditLogSupportImpl method applyPermissions.

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

Example 7 with Context

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

the class ContentAuditLogSupportImpl method setChildOrder.

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

Example 8 with Context

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

the class ContentAuditLogSupportImpl method unpublishContent.

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

Example 9 with Context

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

the class ContentAuditLogSupportImpl method createMedia.

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

Example 10 with Context

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

the class ContentAuditLogSupportImpl method archive.

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

Aggregations

Context (com.enonic.xp.context.Context)99 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 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 PrincipalKey (com.enonic.xp.security.PrincipalKey)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