/** * Create a {@link SubscriptionMapper} instance or return the one which exists for the {@link MailboxSession} already * * @param session * @return mapper */ @Override public SubscriptionMapper getSubscriptionMapper(MailboxSession session) throws SubscriptionException { SubscriptionMapper mapper = (SubscriptionMapper) session.getAttributes().get(SUBSCRIPTIONMAPPER); if (mapper == null) { mapper = createSubscriptionMapper(session); session.getAttributes().put(SUBSCRIPTIONMAPPER, mapper); } return mapper; }