public final String getName() { checkInitialized(); return this.name; }
/** * <p> * Sets a new order for the message resolver. * </p> * * @param order the new order */ public void setOrder(final Integer order) { checkNotInitialized(); this.order = order; }
public final synchronized void initialize() { if (!isInitialized()) { if (this.name == null) { this.name = this.getClass().getName(); } logger.info("[THYMELEAF] INITIALIZING MESSAGE RESOLVER: " + this.name); initializeSpecific(); this.initialized = true; logger.info("[THYMELEAF] MESSAGE RESOLVER INITIALIZED OK"); } }
/** * <p> * Check the message resolver is initialized, and throw an exception if it is not. * </p> * <p> * Calling this method allows to protect calls to methods that need the message * resolver to be already initialized. * </p> */ protected final void checkInitialized() { if (!isInitialized()) { throw new NotInitializedException("Message Resolver has not been initialized"); } }
/** * <p> * Check the message resolver is not initialized, and throw an exception if it is. * </p> * <p> * Calling this method allows to protect calls to methods that change the configuration, * ensuring the message resolver has not been initialized yet. * </p> */ protected final void checkNotInitialized() { if (isInitialized()) { throw new AlreadyInitializedException( "Cannot modify message resolver when it has already been initialized"); } }
/** * <p> * Sets a name for this message resolver. * </p> * * @param name the new name */ public void setName(final String name) { checkNotInitialized(); this.name = name; }
public final Integer getOrder() { checkInitialized(); return this.order; }