Skip to content

vpro/magnolia-context-annotations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

magnolia-context-annotations

Build Status Maven Central javadoc

Provides java annotation for executing in system context

Usage

After installing this module in your magnolia deployment (taking the maven dependency is enough), you can do in stead of

@Override
public String stuff() {
   return MgnlContext.doInSystemContext((MgnlContext.Op<String, Throwable>)
        () -> actualStuff());
}
@Override
@MgnlSystemContext
public String stuff() {
   return actualStuff();
}

It’s a bit like javax.transaction.Transactional

The annotation can also be used at class level, so you can quite easily mark all methods of a complete utility class to be executed in system context.

Installation

<dependency>
  <groupId>nl.vpro</groupId>
  <artifactId>magnolia-context-annotations</artifactId>
  <version>1.3.0</version>
</dependency>

About

Provides java annotation for executing in system context

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages