magnolia-context-annotations

Provided annotations (guice interpreted) to do things in magnolia system context

License

License

GroupId

GroupId

nl.vpro
ArtifactId

ArtifactId

magnolia-context-annotations
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

magnolia-context-annotations
Provided annotations (guice interpreted) to do things in magnolia system context
Project URL

Project URL

https://github.com/vpro/magnolia-context-annotations
Source Code Management

Source Code Management

https://github.com/vpro/magnolia-context-annotations

Download magnolia-context-annotations

How to add to project

<!-- https://jarcasting.com/artifacts/nl.vpro/magnolia-context-annotations/ -->
<dependency>
    <groupId>nl.vpro</groupId>
    <artifactId>magnolia-context-annotations</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/nl.vpro/magnolia-context-annotations/
implementation 'nl.vpro:magnolia-context-annotations:1.3.0'
// https://jarcasting.com/artifacts/nl.vpro/magnolia-context-annotations/
implementation ("nl.vpro:magnolia-context-annotations:1.3.0")
'nl.vpro:magnolia-context-annotations:jar:1.3.0'
<dependency org="nl.vpro" name="magnolia-context-annotations" rev="1.3.0">
  <artifact name="magnolia-context-annotations" type="jar" />
</dependency>
@Grapes(
@Grab(group='nl.vpro', module='magnolia-context-annotations', version='1.3.0')
)
libraryDependencies += "nl.vpro" % "magnolia-context-annotations" % "1.3.0"
[nl.vpro/magnolia-context-annotations "1.3.0"]

Dependencies

compile (5)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.25
info.magnolia » magnolia-core jar 6.2.6
org.projectlombok : lombok jar 1.18.18
javax.servlet : javax.servlet-api jar 4.0.1
info.magnolia.site » magnolia-site Optional jar 1.4.1

provided (1)

Group / Artifact Type Version
javax.servlet.jsp : jsp-api jar 2.2

test (5)

Group / Artifact Type Version
org.slf4j : slf4j-log4j12 jar 1.7.25
org.junit.jupiter : junit-jupiter jar 5.7.0
org.mockito : mockito-core jar 3.8.0
org.assertj : assertj-core jar 3.19.0
info.magnolia » magnolia-core jar 6.2.6

Project Modules

There are no modules declared in this project.

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.2.0</version>
</dependency>
nl.vpro

VPRO

Versions

Version
1.3.0
1.2.0
1.1.0
1.0.0