Ich habe folgende Methdoe:
@Produces
@Current
@Angemeldet
public Principal getCurrentUser()
{
if (this.userPrincipal == null)
{
HttpServletRequest request = getServletRequest();
this.userPrincipal = request.getUserPrincipal();
if (this.logger.isDebugEnabled())
{
this.logger.debug("userPrincipal: " + this.userPrincipal);
}
if (this.userPrincipal != null)
{
String userId = this.userPrincipal.getName();
if (!isAnonymous(userId))
{
this.effectiveUserPrincipal = this.userPrincipal;
}
}
}
return this.effectiveUserPrincipal;
}
@Current und @Angemeldet sind glaube ich Qualifier. Kann mir jemand sagen wofür die sind? Was macht die @Produces Annotation in dieser Methode?