Package aim.domain.logging

Examples of aim.domain.logging.SimpleAction


    @After("Pointcuts.securityPointcut()")
    public void logSecurityOperation(JoinPoint joinPoint) {
        final String userName = ((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername();
        final PosibleOperations method = PosibleOperations.getMethod(joinPoint.getSignature().getName());

        final SimpleAction action = new SimpleAction(method, userName);
        final String additionalInfo = getAdditionalInfo(method, joinPoint.getArgs());
        if (!additionalInfo.isEmpty()) {
            action.setAdditionalInfo(additionalInfo);
        }
        logService.addLog(action);
    }
View Full Code Here


    @After( "UIPointcuts.loginPointcut()" )
    public void logLoginOperation( JoinPoint joinPoint ) {
        Authentication authenticationInfo = SecurityContextHolder.getContext().getAuthentication();
        if ( authenticationInfo != null && !ROLE_ANONYMOUS.equals( authenticationInfo.getPrincipal() ) ) {
            final String userName = ( ( User ) authenticationInfo.getPrincipal() ).getUsername();
            final SimpleAction action = new SimpleAction( PosibleOperations.getMethod( joinPoint.getSignature().getName() ), userName );
            logService.addLog( action );
        }
    }
View Full Code Here

TOP

Related Classes of aim.domain.logging.SimpleAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.