org.broadleafcommerce.common.extensibility.context.merge.LateStageRemoveBeanPostProcessor Maven / Gradle / Ivy
/*
* #%L
* BroadleafCommerce Common Libraries
* %%
* Copyright (C) 2009 - 2014 Broadleaf Commerce
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package org.broadleafcommerce.common.extensibility.context.merge;
import org.springframework.core.Ordered;
/**
* Use this merge processor for collection member removal duties that should take place later in the Spring startup lifecycle.
* This would include items that should be removed after the initialization of the persistence layer, like beans
* that rely on EntityManager injection in some way. This is the most commonly used merge processor. Less
* commonly used is the {@link org.broadleafcommerce.common.extensibility.context.merge.EarlyStageRemoveBeanPostProcessor}. See {@link org.broadleafcommerce.common.extensibility.context.merge.AbstractRemoveBeanPostProcessor} for
* usage information.
*
* @see org.broadleafcommerce.common.extensibility.context.merge.AbstractRemoveBeanPostProcessor
* @author Jeff Fischer
*/
public class LateStageRemoveBeanPostProcessor extends AbstractRemoveBeanPostProcessor implements Ordered {
protected int order = Integer.MAX_VALUE;
/**
* The regular ordering for this post processor in relation to other post processors. The default
* value is Integer.MAX_VALUE.
*/
@Override
public int getOrder() {
return order;
}
/**
* The regular ordering for this post processor in relation to other post processors. The default
* value is Integer.MAX_VALUE.
*
* @param order the regular ordering
*/
public void setOrder(int order) {
this.order = order;
}
}