Examples of XPlannerProperties


Examples of org.nxplanner.XPlannerProperties

import java.util.Enumeration;
import java.util.Properties;

public class HsqlHelper {
    public static void initializeHsql() {
        Properties properties = new XPlannerProperties().get();
        if (properties.containsKey("xplanner.hsqldb.server.database")) {
            HsqlServer server = new HsqlServer();

            Enumeration keys = properties.keys();
            while (keys.hasMoreElements()) {
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    private ArrayList attachments = new ArrayList();

    /*package scope*/
    EmailMessageImpl() throws MessagingException {
        Properties transportProperties = new Properties();
        transportProperties.put("mail.smtp.host", new XPlannerProperties().get().get("xplanner.mail.smtp.host"));
        Session session = Session.getDefaultInstance(transportProperties, null);
        session.setDebug(log.isDebugEnabled());
        msg = new MimeMessage(session);
        msg.setSentDate(new Date());
    }
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    private static final String NOTIFICATIONS_DISABLED = "nonotify";

    private Collection listeners = Collections.synchronizedList(new ArrayList());

    public IntegrationAction() {
        XPlannerProperties props = new XPlannerProperties();
        String listenersString = (String)props.get().get("xplanner.integration.listeners");
        if (StringUtils.isNotEmpty(listenersString)) {
            String[] listeners = listenersString.split(",");
            for (int i = 0; i < listeners.length; i++) {
                try {
                    addIntegrationListener((IntegrationListener)Class.forName(listeners[i]).newInstance());
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

        Iterator peopleIterator = people.iterator();
        return peopleIterator.hasNext() ? (Person)peopleIterator.next() : null;
    }

    private LoginModule loadLoginModule() throws AuthenticationException {
        XPlannerProperties properties = new XPlannerProperties();
        String loginModuleClassName = properties.getProperty(LOGIN_MODULE_KEY);
        if (loginModuleClassName == null) {
            throw new AuthenticationException("no login module specified.");
        }
        HashMap options = new HashMap();
        Iterator propertyNames = properties.getPropertyNames();
        while (propertyNames.hasNext()) {
            String name = (String)propertyNames.next();
            if (name.startsWith(LOGIN_OPTION_PREFIX)) {
                options.put(name.substring(LOGIN_OPTION_PREFIX.length()),
                        properties.getProperty(name));
            }
        }
        LoginModule loginModule = null;
        try {
            Class loginModuleClass = Class.forName(loginModuleClassName);
            if (javax.security.auth.spi.LoginModule.class.isAssignableFrom(loginModuleClass)) {
                javax.security.auth.spi.LoginModule jaasLoginModule =
                        (javax.security.auth.spi.LoginModule)loginModuleClass.newInstance();
                String principalClassName = properties.getProperty(JAAS_USER_PRINCIPAL_KEY);
                if (principalClassName == null) {
                    throw new AuthenticationException("principal class name is required for JAAS login modules");
                }
                Class jaasPrincipalClass = Class.forName(principalClassName);
                loginModule = new JaasLoginModuleAdapter(jaasLoginModule, jaasPrincipalClass, options);
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

     *
     * This behavior is configurable in xplanner.properties.
     * @return measured effort
     */
    public double getEffort() {
        boolean adjustHoursForPairing = "double".equalsIgnoreCase(new XPlannerProperties()
                .get().getProperty("xplanner.pairprogramming", "single"));
        boolean isPairedEntry = person1Id != 0 && person2Id != 0;
        return (adjustHoursForPairing && isPairedEntry) ? getDuration() * 2 : getDuration();
    }
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    private static void initializeQuartz() throws SchedulerException,
            ParseException, ClassNotFoundException {
        Logger log = Logger.getLogger(XPlannerInitializationPlugin.class);
        StdSchedulerFactory schedulerFactory = new StdSchedulerFactory();
        Properties schedulerProperties = new XPlannerProperties().get();
        schedulerFactory.initialize(schedulerProperties);
        Scheduler jobScheduler = schedulerFactory.getScheduler();
        Enumeration propertyNames = schedulerProperties.propertyNames();
        while (propertyNames.hasMoreElements()) {
            String name = (String)propertyNames.nextElement();
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

                properties.getProperty("hibernate.connection.username"),
                properties.getProperty("hibernate.connection.password"));
    }

    public void init() throws Exception {
        properties = new XPlannerProperties();
    }
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    private ProgressBarTag delegate;
    private static final String HTML_TYPE = "html";
    private static final String IMAGE_TYPE = "image";

    public ProgressBarDelegatorTag() {
        String type = new XPlannerProperties().getProperty("xplanner.progressbar.impl", HTML_TYPE);
        if (StringUtils.equalsIgnoreCase(type, HTML_TYPE)) {
            delegate = new ProgressBarHtmlTag();
        } else if (StringUtils.equalsIgnoreCase(type, IMAGE_TYPE)) {
            delegate = new ProgressBarImageTag();
        } else {
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    public String getProperty() {
        return property;
    }

    private synchronized WikiFormat getFormatter() {
        XPlannerProperties properties = new XPlannerProperties();

        if (formatter == null) {
            // Read formatter class name from properties
            if (properties.get().getProperty("wiki.format") != null) {
                try {
                    formatter = (WikiFormat)Class.forName(properties.get().
                            getProperty("wiki.format")).newInstance();
                } catch (Exception e) {
                    log.error("Cannot instantiate wiki format, using default: ", e);
                    // Fall back to default
                    formatter = new TwikiFormat();
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

            error(errors, errorKey);
        }
    }

    public void reset(ActionMapping mapping, HttpServletRequest request) {
        XPlannerProperties props = new XPlannerProperties();
        reset(mapping, request, props);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.