Search in sources :

Example 26 with Context

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

the class ContentAuditLogSupportImpl method reprocess.

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

Example 27 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 28 with Context

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

the class ContentAuditLogSupportImpl method undoPendingDelete.

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

Example 29 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)

Example 30 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)

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