
com.mtvnet.boxspring.scheduling.quartz.SimpleTriggerBean Maven / Gradle / Ivy
The newest version!
/**
* Copyright (c) 2009, MTV Networks. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the Apache License Version 2.0 is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
*/
package com.mtvnet.boxspring.scheduling.quartz;
import java.text.ParseException;
import org.springframework.beans.factory.InitializingBean;
import com.mtvnet.boxspring.path.Path;
import com.mtvnet.boxspring.path.PathAware;
/**
* For use with BoxSpring, this class sets the name of the trigger based on the
* full bean path instead of the simple bean name.
*/
public class SimpleTriggerBean extends org.springframework.scheduling.quartz.SimpleTriggerBean
implements InitializingBean, PathAware {
/**
* The Path to this bean
*/
private Path path;
/**
* Sets the name of the trigger to the Path, if not already set, then calls
* super.
*
* @throws ParseException
*/
public void afterPropertiesSet() throws ParseException {
if (getName() == null) {
setName(path.toString());
}
super.afterPropertiesSet();
}
public void setPath(Path path) {
this.path = path;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy