src/main/java/org/fcrepo/audit/InternalAuditor.java
@PostConstruct
    public void register() {
        AUDIT_CONTAINER_LOCATION = System.getProperty(AUDIT_CONTAINER);
        if (AUDIT_CONTAINER_LOCATION != null) {
            LOGGER.info("Initializing: {}, {}", this.getClass().getCanonicalName(), AUDIT_CONTAINER_LOCATION);
            eventBus.register(this);
            if (!AUDIT_CONTAINER_LOCATION.startsWith("/")) {
                AUDIT_CONTAINER_LOCATION = "/" + AUDIT_CONTAINER_LOCATION;
            }
            if (AUDIT_CONTAINER_LOCATION.endsWith("/")) {
                AUDIT_CONTAINER_LOCATION = AUDIT_CONTAINER_LOCATION.substring(0,
                        AUDIT_CONTAINER_LOCATION.length() - 2);
            }
            session = repository.login();
            containerService.findOrCreate(session, AUDIT_CONTAINER_LOCATION);

            LOGGER.debug("Registering audit CND");
            jcrTools.registerNodeTypes(getJcrSession(session), "audit.cnd");

            session.commit();
        } else {
            LOGGER.warn("Cannot Initialize: {}", this.getClass().getCanonicalName());
            LOGGER.warn("System property not found: " + AUDIT_CONTAINER);
        }
    }
/**
     * Register with the EventBus to receive events.
     */
Register with the EventBus to receive events.
Register with the EventBus to receive events .
@PostConstruct
    public void register() {
        AUDIT_CONTAINER_LOCATION = System.getProperty(AUDIT_CONTAINER);
        if (AUDIT_CONTAINER_LOCATION != null) {
            LOGGER.info("Initializing: {}, {}", this.getClass().getCanonicalName(), AUDIT_CONTAINER_LOCATION);
            eventBus.register(this);
            if (!AUDIT_CONTAINER_LOCATION.startsWith("/")) {
                AUDIT_CONTAINER_LOCATION = "/" + AUDIT_CONTAINER_LOCATION;
            }
            if (AUDIT_CONTAINER_LOCATION.endsWith("/")) {
                AUDIT_CONTAINER_LOCATION = AUDIT_CONTAINER_LOCATION.substring(0,
                        AUDIT_CONTAINER_LOCATION.length() - 2);
            }
            session = repository.login();
            containerService.findOrCreate(session, AUDIT_CONTAINER_LOCATION);
            LOGGER.debug("Registering audit CND");
            jcrTools.registerNodeTypes(getJcrSession(session), "audit.cnd");
            session.commit();
        } else {
            LOGGER.warn("Cannot Initialize: {}", this.getClass().getCanonicalName());
            LOGGER.warn("System property not found: " + AUDIT_CONTAINER);
        }
    }
@ PostConstruct public void register ( ) { AUDIT_CONTAINER_LOCATION = System . getProperty ( AUDIT_CONTAINER ) ; if ( AUDIT_CONTAINER_LOCATION != null ) { LOGGER . info ( "Initializing: {}, {}" , this . getClass ( ) . getCanonicalName ( ) , AUDIT_CONTAINER_LOCATION ) ; eventBus . register ( this ) ; if ( ! AUDIT_CONTAINER_LOCATION . startsWith ( "/" ) ) { AUDIT_CONTAINER_LOCATION = "/" + AUDIT_CONTAINER_LOCATION ; } if ( AUDIT_CONTAINER_LOCATION . endsWith ( "/" ) ) { AUDIT_CONTAINER_LOCATION = AUDIT_CONTAINER_LOCATION . substring ( 0 , AUDIT_CONTAINER_LOCATION . length ( ) - 2 ) ; } session = repository . login ( ) ; containerService . findOrCreate ( session , AUDIT_CONTAINER_LOCATION ) ; LOGGER . debug ( "Registering audit CND" ) ; jcrTools . registerNodeTypes ( getJcrSession ( session ) , "audit.cnd" ) ; session . commit ( ) ; } else { LOGGER . warn ( "Cannot Initialize: {}" , this . getClass ( ) . getCanonicalName ( ) ) ; LOGGER . warn ( "System property not found: " + AUDIT_CONTAINER ) ; } }
Register with the EventBus to receive events.
Register with the EventBus to receive events .